molecule-core/workspace-server/internal/orgtoken
Molecule AI SDK Lead cd1d678cd3 fix(orgtoken): restore flexible regex in TestList_NewestFirst
The PR #1683 fix to TestList used a literal column-name regex that
doesn't match the actual List() query. sqlmock uses regex matching:
- Actual query uses COALESCE(name,'') wrappers
- Literal 'name' doesn't match 'COALESCE(name,'')'
- Also missing WHERE clause and LIMIT

Revert to the flexible pattern used on main (SELECT id, prefix.*)
with explicit LIMIT allowance — proven working on main branch.

TestValidate_HappyPath 3-column fix is kept.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 17:34:30 +00:00
..
tokens_test.go fix(orgtoken): restore flexible regex in TestList_NewestFirst 2026-04-23 17:34:30 +00:00
tokens.go fix(orgtoken): cast org_id to text in COALESCE to prevent 500 2026-04-22 17:18:56 -07:00