Skip to content

fix: make decode_table_values robust to dictionary quirks - #76

Merged
vrtornisiello merged 14 commits into
stagingfrom
fix/decode-table-values-tool
Oct 5, 2026
Merged

vrtornisiello merged 14 commits into
stagingfrom
fix/decode-table-values-tool

Conversation

@vrtornisiello

Copy link
Copy Markdown
Collaborator
  • Match column names with TRIM, since some dictionaries store them with stray whitespace (e.g. Censo Escolar's "tipo_situacao_funcionamento "), which made the lookup return no entries.
  • Reject the dataset's own dictionary table as the target, instead of silently returning an empty list.
  • Return an explicit error when no dictionary entries match, instead of an empty list the agent cannot act on.

vrtornisiello and others added 14 commits March 13, 2026 13:21
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging
chore: sync main with staging- #73
- Match column names with TRIM, since some dictionaries store them with
  stray whitespace (e.g. Censo Escolar's "tipo_situacao_funcionamento "),
  which made the lookup return no entries.
- Reject the dataset's own dictionary table as the target, instead of
  silently returning an empty list.
- Return an explicit error when no dictionary entries match, instead of
  an empty list the agent cannot act on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover both whitespace cases in the column-name test: a stored name with
stray whitespace matched by the model's trimmed name, and a passed name
with whitespace. The mock now returns a row so the success path is
exercised. Assert the full error message when the dictionary table is
passed as the target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vrtornisiello
vrtornisiello merged commit a2b9c9a into staging Oct 5, 2026
1 check passed
@vrtornisiello
vrtornisiello deleted the fix/decode-table-values-tool branch October 5, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant