fix: report row stats for multi-table --table too - #62
Merged
Conversation
The 'N rows extracted' completeness note is a documented guarantee agents
rely on instead of verifying, but the multi-table branch skipped rowStats
entirely — stderr went completely silent. Aggregate across tables
('2 tables, 200 rows extracted'), counting a row as empty only for fields
its own table has.
Closes #61
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
N rows extractedcompleteness note in the multi-table--tablebranch, aggregated:ax: note: 2 tables, 200 rows extracted, no empty fields--wherereporting now aggregatesbeforeWhereacross tables as wellWhy
Closes #61.
rowStats()was only called when exactly one table matched; with two or more, stderr went completely silent — while the agent context explicitly teaches "treat that note as the completeness check — no extra verification probes needed". A guarantee that silently stops applying is the worst kind of gap. Reproduced with the issue's fixture and withtable.wikitableon the Wikipedia GDP page (2 tables, cache-note only).The multi-table output shape (
[{headers, rows}, …]) is unchanged — only the stats survive it now.Tests
One new CLI test covering: single-table note unchanged (no
tables,prefix), aggregated multi-table counts, per-table empty-field attribution, and--whereacross tables.bun test: 159 pass intest/,tsc --noEmitandoxfmt --checkclean.🤖 Generated with Claude Code