Repository navigation
fix(documents): end an 8-K's last item at the signature statement when there is no SIGNATURES heading - #1393
Merged
Merged
Conversation
…n there is no SIGNATURES heading test_eightk_with_no_signature_header failed in the post-merge network job after #1386 (gh-1370 whitespace collapse). Bisected to da38745, but it is not a regression: on c5bfcff Item 9.01 already contained the whole signature block. The test passed only because the hard-wrapped "Pursuant to the\nrequirements" did not match its substring. #1370 collapsed the wrap and exposed it. Strategy 5c in pattern_section_extractor: for 8-K/8-K/A, when Strategy 5b found no bare SIGNATURES line, the first ParagraphNode after the last Item header whose whitespace-normalized text matches the prescribed opening ("Pursuant to the requirements of the Securities Exchange Act of 1934 ... caused this report|amendment to be signed") becomes the terminal header, labelled SIGNATURES so later stages treat it exactly like a real one. "After the last Item header" keeps the cover page's "Pursuant to Section 13 or 15(d)" line from ever ending an item. Measured on 90 8-Ks (12 fixtures + 78 sampled from 2010Q2/2018Q3/2024Q1), with and without the change: 3 changed, each a pure truncation of the last item by exactly its signature block, which moves to a `signatures` section (80 of 90 already have one). Nothing else moved. 2 filings still carry the block because it sits inside a table; filed as edgartools-6qmq. The test now compares whitespace-normalized text and asserts where the item ends, so it cannot pass by accident again; it fails without the fix. Section network regression files (60, one per call): 559 passed, 0 failed. tests/documents + company_reports + meta fast: 869 passed. 8-K test files including network: 21 + 31 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dgunning
enabled auto-merge (squash)
October 1, 2026 19:42
…udit #1393 changed only tests/company_reports/test_eightK.py, whose 21 tests are all network-marked. `-m fast` deselected every one, the output held no "passed", and check_offline_audit.py took that for a run that produced no result: exit 2, so the required test-fast job failed in 77 s, before the fast suite ran. Any PR editing only network test files would hit it. nothing_to_audit() recognizes "N deselected" with no passed/failed/error count as a clean result. The "produced no result" guard still catches collection errors and empty runs. The real case now prints "nothing to audit" and exits 0; a fast file (test_vcr_interception_guard.py) still audits normally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Pushed 6183ed7. The first run failed in the offline-audit step, not in this fix. |
Merged
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.
What this changes
This fixes the red network job on main:
tests/company_reports/test_eightK.py::test_eightk_with_no_signature_header.Root cause. Bisecting points to da38745 (#1386, the gh-1370 whitespace collapse), but that commit isn't the regression. On the commit before it (c5bfcff), AmeriServ's Item 9.01 already contained the whole signature block. The test passed only because the hard-wrapped
"Pursuant to the\nrequirements"didn't match its substring. #1370 collapsed the wrap and exposed it.Fix. Strategy 5c in
pattern_section_extractorhandles 8-K / 8-K/A filings with no bare SIGNATURES line. The first paragraph after the last Item header that opens with the prescribed sentence ("Pursuant to the requirements of the Securities Exchange Act of 1934 … caused this report to be signed") becomes the terminal header. It's labelledSIGNATURES, so later stages treat it like a real one. Requiring it to come after the last Item header keeps the cover page's "Pursuant to Section 13 or 15(d)" line from ever ending an item.The test now compares whitespace-normalized text and asserts where the item ends, so it can't pass by accident again. It fails without the fix.
Verification
signaturessection (80 of the 90 already have one). Nothing else moved.tests/documents,tests/company_reportsandtests/meta: 869 passed.Known gap, not fixed here: 2 sampled filings keep the block because their SIGNATURES heading and statement sit inside a table. Filed as bead edgartools-6qmq.
🤖 Generated with Claude Code