Repository navigation
fix(grounding): retain comma-grouped document integers - #2135
Conversation
Signed-off-by: Steven Huang <134844631+remote-controlled-man@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
he-yufeng
left a comment
There was a problem hiding this comment.
I checked this against the issue and against the narrower evidence.py-only attempt in #2139.
This is the better fix. The numeric scanner already classifies a grouped integer as marked when it preserves the grouping token, so the figure takes the existing measured-evidence path instead of adding another admission rule at ingest. The tests cover the plain-text table shape, the Markdown control, source binding, generated artifacts, and the cases that must stay excluded.
Verification on 022f1b6a2c05dcdac81fde1d8caec14bc7204c23: the complete grounding suite passes 1329 with 8 existing skips, ci_private_files_gate.py and git diff --check pass, and CI is green on all ten checks.
A five-digit bare integer a source document states ('股东总数 76175') is a
stated figure, not layout: it enters the evidence ledger and grounds the
quoted table cell, closing the residual boundary left when #2135 retained
comma-grouped integers only. Years, page numbers and four-digit headcounts
('员工总数 3400') keep their existing exclusion.
Fixes #2126 (reopened)
Summary
165,200.Why
Refs #2126. The numeric value was parsed correctly, but its thousands-grouping marker was discarded. An integer copied from a plain PDF text line was therefore classified as bare and omitted from document evidence, so a correctly sourced answer table could be rejected.
This corrects the shared scanner classification: comma-grouped integers in answer prose also receive the existing declaration, streaming and release checks. Unmarked integers in running prose, structural dates, source binding, generated-document exclusions and evidence limits keep their existing behavior.
Test Plan
ci_private_files_gate.py,ci_grep_gates.sh, andgit diff --checkpass.Scope and risk
The change is in the shared grounding scanner, discussed in #2126. It changes numeric classification without adding evidence sources or changing broker, credential or network behavior. Roll back with
git revert 022f1b6.