You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two deferred findings from the SPAC redemption (§4c) review (PR #166) both hinge on one empirical, currently-unverified assumption: that 8-K filings are effectively always HTML, never structured edgarSubmission XML. Form_8_K.parse only populates form8K.formData when it detects edgarSubmission in the first 500 chars of the fetched body; for an HTML primary doc (and for the full-submission .txt, which starts with <SEC-HEADER>) it returns {}.
If that assumption holds, both findings below are non-issues. If real SPAC 8-Ks do arrive as edgarSubmission XML with a populated formData, they become real (if narrow) bugs. This issue is to check the data and decide.
Finding #1 — escalation gate vs. processForm8K trigger set disagree
Fetch escalation (src/task/forms/ProcessAccessionDocFormTask.ts) decides whether to pull the full .txt using hasRedemptionTriggerItem(items) — filing-metadata items only.
processForm8K (src/sec/forms/miscellaneous-filings/Form_8_K.storage.ts) derives its trigger set from extractItemCodes(items, form8K) — metadata items +form8K.formData.items.item (XML).
A trigger item (5.07/2.01/8.01) present only in the XML, not in metadata, would skip escalation → fullSubmissionText undefined → redemption extraction silently not attempted (no dead-letter).
Only reachable if form8K.formData.items can carry an item the submissions-API items field omits — i.e. only if XML 8-Ks exist and their item lists can diverge from metadata.
Finding #2 — full-.txt escalation drops XML periodOfReport
On escalation, Form_8_K.parse sees the .txt (<SEC-HEADER>…) → returns {}, so effectiveReportDate = form8K.formData?.periodOfReport || report_date || null loses the XML periodOfReport.
Regression vs. a primary-doc fetch only exists if the primary doc would have parsed to a populated formData (i.e. it's edgarSubmission XML) and metadata report_date is null (best-effort path). Then a §4a milestone event_date degrades to filing_date.
Again gated on XML 8-Ks actually existing.
Investigation
Sample real 8-Ks across a range of filers/dates (and specifically known SPACs) and check how many parse to a non-emptyform8K (i.e. the body contains edgarSubmission). A quick probe: fetch primary docs for a batch of 8-K accessions and count Object.keys(Form_8_K.parse("8-K", body)).length > 0.
If XML 8-Ks effectively don't exist (or never diverge from metadata): close as not-an-issue; optionally add a one-line code comment noting metadata items/report_date are authoritative for 8-Ks.
Background
Two deferred findings from the SPAC redemption (§4c) review (PR #166) both hinge on one empirical, currently-unverified assumption: that 8-K filings are effectively always HTML, never structured
edgarSubmissionXML.Form_8_K.parseonly populatesform8K.formDatawhen it detectsedgarSubmissionin the first 500 chars of the fetched body; for an HTML primary doc (and for the full-submission.txt, which starts with<SEC-HEADER>) it returns{}.If that assumption holds, both findings below are non-issues. If real SPAC 8-Ks do arrive as
edgarSubmissionXML with a populatedformData, they become real (if narrow) bugs. This issue is to check the data and decide.Finding #1 — escalation gate vs.
processForm8Ktrigger set disagreesrc/task/forms/ProcessAccessionDocFormTask.ts) decides whether to pull the full.txtusinghasRedemptionTriggerItem(items)— filing-metadata items only.processForm8K(src/sec/forms/miscellaneous-filings/Form_8_K.storage.ts) derives its trigger set fromextractItemCodes(items, form8K)— metadata items +form8K.formData.items.item(XML).5.07/2.01/8.01) present only in the XML, not in metadata, would skip escalation →fullSubmissionTextundefined → redemption extraction silently not attempted (no dead-letter).Only reachable if
form8K.formData.itemscan carry an item the submissions-APIitemsfield omits — i.e. only if XML 8-Ks exist and their item lists can diverge from metadata.Finding #2 — full-
.txtescalation drops XMLperiodOfReportForm_8_K.parsesees the.txt(<SEC-HEADER>…) → returns{}, soeffectiveReportDate = form8K.formData?.periodOfReport || report_date || nullloses the XMLperiodOfReport.formData(i.e. it'sedgarSubmissionXML) and metadatareport_dateis null (best-effort path). Then a §4a milestoneevent_datedegrades tofiling_date.Again gated on XML 8-Ks actually existing.
Investigation
form8K(i.e. the body containsedgarSubmission). A quick probe: fetch primary docs for a batch of 8-K accessions and countObject.keys(Form_8_K.parse("8-K", body)).length > 0.formData.items.itemever contains a trigger item absent from the submissions-APIitemsfield (Finding chore(deps): bump bun-types from 1.2.14 to 1.2.15 #1), and whetherformData.periodOfReportis present while metadatareport_dateis null (Finding chore(deps): bump @sroussey/parse-address from 2.4.0 to 2.4.2 #2).Outcome
items/report_dateare authoritative for 8-Ks..txtfor form metadata even when escalating), with fixtures.Context: PR #166; deferred-findings discussion in that review.
🤖 Generated with Claude Code