Skip to content

Fix Form 8-K metadata always loaded and add accession_number index#69

Merged
sroussey merged 2 commits intoclaude/add-8k-support-0jEUcfrom
copilot/sub-pr-68
Mar 8, 2026
Merged

Fix Form 8-K metadata always loaded and add accession_number index#69
sroussey merged 2 commits intoclaude/add-8k-support-0jEUcfrom
copilot/sub-pr-68

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

filing_date, items, and report_date were only populated when cik/form/fileName were absent. In the main pipeline all three are supplied, so 8-K events were stored with empty/undefined metadata. Additionally, getEventsByAccession() queried on { cik, accession_number } with no supporting index.

Changes

  • ProcessAccessionDocFormTask.ts: Unconditionally fetch the filing record to populate filing_date, items, report_date, and file_number; input-provided cik/form/fileName still take precedence via explicit guards
// Before — metadata only loaded when inputs were missing
if (!cik || !form || !fileName) {
  const filing = ...;
  filing_date = filing.filing_date;   // skipped in main pipeline
  items = filing.items;               // skipped — 8-K events stored with no item codes
  ...
}

// After — always loaded
const filing = ...;
if (!cik) cik = filing.cik;
filing_date = filing.filing_date;
items = filing.items;
...
  • DefaultDI.ts / TestingDI.ts: Add ["cik", "accession_number"] index to form_8k_events storage so getEventsByAccession() is index-backed rather than a full scan

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sroussey <127349+sroussey@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Form 8-K parsing and event storage infrastructure Fix Form 8-K metadata always loaded and add accession_number index Mar 7, 2026
@sroussey sroussey marked this pull request as ready for review March 8, 2026 00:02
@sroussey sroussey merged commit 4d5eed1 into claude/add-8k-support-0jEUc Mar 8, 2026
@sroussey sroussey deleted the copilot/sub-pr-68 branch March 8, 2026 00:02
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.

2 participants