Skip to content

feat: EDGAR 10-K → fiber fragment adapter (SP-ADAPT-TREE-001, real edition)#321

Merged
mdheller merged 1 commit into
mainfrom
feat/edgar-fiber-adapter
Jul 5, 2026
Merged

feat: EDGAR 10-K → fiber fragment adapter (SP-ADAPT-TREE-001, real edition)#321
mdheller merged 1 commit into
mainfrom
feat/edgar-fiber-adapter

Conversation

@mdheller

@mdheller mdheller commented Jul 5, 2026

Copy link
Copy Markdown
Member

What

Moves fibered retrieval from fixtures onto real documents. edgar_fiber_adapter.py fetches a company's latest 10-K from EDGAR (data.sec.gov submissions → primary doc), extracts its Item-level table of contents (the tree descend navigates), and emits a Crystal Atlas fragment fiber_projection.project consumes: document root ⊑ Item sections, registrant anchored under Item 1 to the real filing URL. No model, no datastore.

Proof — it runs on a REAL filing

The committed fixture edgar_aapl_10k.fragment.json is Apple's actual latest 10-K (17 real items, anchored to the real sec.gov URL), and the test descends its real table of contents to "Item 1A — Risk Factors" with the keyword navigator — no network in the suite.

Honest scope

The Item extractor is a heuristic over filing HTML (strip tags → match Item N. Title, dedup) — it recovers the standard Part I–IV items, not a production parser (exhibits/XBRL R-files out of scope). It emits only what the filing structurally states — no ownership %s or subsidiary edges are invented. Cross-fiber ownership (Exhibit 21 → GLEIF → E_R edge, which enables /multi-hop) is the documented follow-up. Network lives only in the fetch path; parsing + fragment emission are pure and offline-tested.

Tests (+3, full suite 301 green)

extract_items on a compact HTML fixture · to_fragment anchors the registrant under Item 1 · the real Apple fragment projects and descend navigates it. Stdlib-only (urllib); the live fetch path is exercised by the CLI (--cik 320193).

Unblocks the --model eval: point the real Claude scorer at these real fragments (needs the key, which the CI env lacks).

…-001, real edition)

Moves fibered retrieval from fixtures onto REAL documents. edgar_fiber_adapter.py
fetches a company's latest 10-K from EDGAR (data.sec.gov submissions -> primary doc),
extracts its Item-level table of contents (the tree descend navigates), and emits a
Crystal Atlas fragment fiber_projection.project consumes: document root ⊑ Item sections,
registrant anchored under Item 1 to the real filing URL. No model, no datastore.

Honest scope: the Item extractor is a heuristic over filing HTML (strip tags -> match
'Item N. Title', dedup) — recovers the standard Part I-IV items, not a production parser
(exhibits/XBRL out of scope). It emits ONLY what the filing structurally states; no
ownership %s or subsidiary edges invented — cross-fiber ownership (Exhibit 21 -> GLEIF ->
E_R) is the documented follow-up. Network only in fetch; parsing is pure + offline-testable.

Proof: the committed fixture edgar_aapl_10k.fragment.json is Apple's ACTUAL latest 10-K
(17 real items, anchored to the real sec.gov URL), and the test descends its real table of
contents to 'Item 1A - Risk Factors' with the keyword navigator — no network in the suite.

Tests (+3, full suite 303 green): extract_items on a compact HTML fixture; to_fragment
anchors the registrant under Item 1; the real Apple fragment projects and descend navigates
it. Stdlib-only (urllib); live fetch exercised by the CLI.
@mdheller mdheller merged commit a2e18eb into main Jul 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant