docs(examples): record the FEMA bare-$ fields and which path a fetch took - #298
Conversation
…took Two follow-ups to #280, deliberately left out of it so that PR could ship without paying another review round for a section that was already true but incomplete. Closes #288. The FEMA finding. 26 of the form's 124 non-blank lines are a bare $ and nothing else: every amount field comes back as a naked dollar sign with its label stripped, and no line in the file carries a currency amount attached to a label. It is the plainest artefact in the corpus. A table with a repeated header still reads as a table, so a reader can talk themselves out of caring; a column of 26 dollar signs cannot be read as anything but broken. And it is a form, the category where a label and its field are related only by position on the page. It also sharpens what the section already said about the checks. contains: checks have the same shape as _table_count: contains:AMOUNTS CLAIMED passes because that heading survives at line 9, and says nothing about the 26 unlabelled fields beneath it. A harness that checks facts and order will not tell you your tables are wrong, and one that checks a heading is present will not tell you the fields under it are gone. Each check answers a narrower question than the claim it is used to back. The provenance field. retrieval recorded "publisher" for both a clean first attempt and a curl fallback after a 403, so a fetch that needed the fallback read exactly like one that did not. It now records publisher-after-403-via-curl, which describes the route rather than the outcome. Why that fallback exists is worth writing down beside it, because nobody debugging a 403 would guess the direction: fema.gov refuses a request carrying a Chrome user-agent and serves plain curl, so the retry works BECAUSE it drops the browser user-agent the first attempt sends. Tested from one network only, which says nothing about what a browser on a home connection sees. No artifact changes and nothing re-run. The committed run predates the finer value and records "publisher" for all four, which is true of all four -- FEMA's arrived through the curl retry. The bytes are pinned and correct; backfilling the record would mean editing a recorded artifact to say something the run did not say. Every number checked against the recorded output rather than retyped: 26 bare $ lines of 124 non-blank, AMOUNTS CLAIMED at line 9. verify-run 65 of 65, pytest 34, ruff clean.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change distinguishes FEMA curl fallback retrievals from direct publisher downloads. The README documents the fallback sequence, bare-dollar conversion output, formatting changes, and limits of the evaluation checks. ChangesFEMA document-to-markdown example
Suggested reviewers: Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The documentation and retrieval classification are consistent with the recorded artifacts and observed evaluation behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Two follow-ups to #280, deliberately left out of it so that PR could ship without paying another review round for a section that was already true but incomplete. Closes #288.
Documentation and one forward-looking field. No artifact changed, nothing re-run, no recorded number moved.
The FEMA form loses its labels entirely
26 of the form's 124 non-blank lines are a bare
$and nothing else. Every amount field comes back as a naked dollar sign with its label stripped, and no line in the file carries a currency amount attached to a label.The README's "What the conversion gets wrong" section already covered the table behaviour — spanning headers expanded across every cell, stacked tables welded into one, cells collapsed to space-joined values — plus code-block flattening, hyphen closing and the FEMA heading-to-field separation. All true, and all about tables.
This one is the plainest thing in the corpus. A table with a repeated header still reads as a table, so a reader can talk themselves out of caring. A column of 26 dollar signs cannot be read as anything but broken. And it is a form — the category where a label and its field are related only by position on the page, and so the hardest case for any converter.
It also sharpens what the section says about the checks
contains:checks have the same shape as_table_count:contains:AMOUNTS CLAIMEDpasses, because that heading survives at line 9Both true of the same recorded run, which scored 25 of 25. A harness that checks facts and order will not tell you your tables are wrong, and one that checks a heading is present will not tell you the fields under it are gone. Each check answers a narrower question than the claim it is used to back.
retrievalnow records the route, not just the outcomeretrievalrecordedpublisherfor both a clean first attempt and acurlfallback after a 403, so a fetch that needed the fallback read exactly like one that did not. It now recordspublisher-after-403-via-curl.Why that fallback exists is written beside it, because nobody debugging a 403 would guess the direction:
fema.govrefuses a request carrying a Chrome user-agent and serves plaincurl. The retry works because it drops the browser user-agent the first attempt sends — a WAF apparently reading "Chrome from a datacenter" as a scraper and "curl" as an honest tool.Tested from one network only. That says nothing about what a real browser on a home connection sees, and "the FEMA link is broken" would be more than the evidence supports.
Not backfilled, deliberately
The committed run predates the finer value and records
publisherfor all four, which is true of all four — FEMA's arrived through thecurlretry. The bytes are pinned and correct. Backfilling would mean editing a recorded artifact to say something the run did not say, which is the defect #280 exists to remove.Checks
Every number checked against the recorded output rather than retyped — 26 bare
$lines of 124 non-blank,AMOUNTS CLAIMEDat line 9.verify-run65 of 65 ·pytest34 passed ·ruffclean.Summary by CodeRabbit
Documentation
Bug Fixes