Skip to content

refactor: extract shared fetchAndStoreSubmission helper; fix invalid empty date in BootstrapSubmissionsTask - #63

Merged
sroussey merged 2 commits into
bootstrapfrom
copilot/sub-pr-62
Mar 2, 2026
Merged

refactor: extract shared fetchAndStoreSubmission helper; fix invalid empty date in BootstrapSubmissionsTask#63
sroussey merged 2 commits into
bootstrapfrom
copilot/sub-pr-62

Conversation

Copilot AI commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

BootstrapSubmissionsTask passed date: "" per CIK, which fails TypeOptionalSecDate format validation (requires YYYY-MM-DD when present). Additionally, fetchAndStoreSubmission was duplicated across BootstrapSubmissionsTask and UpdateAllSubmissionsTask, risking drift in error handling and concurrency behavior.

Changes

  • New src/task/submissions/fetchAndStoreSubmission.ts — extracts the shared pipeline helper with date?: string (optional), consolidating fetch+store+error-recording logic in one place
  • BootstrapSubmissionsTask — imports shared helper; drops date from wf.run() inputs entirely since no date is available at bootstrap time
  • UpdateAllSubmissionsTask — imports shared helper; removes local duplicate and unused pipe import
// Before: invalid empty string injected per CIK
await wf.run({
  cik: unprocessedCiks,
  date: unprocessedCiks.map(() => ""),  // fails sec-date format validation
});

// After: date omitted; shared helper accepts date?: string
await wf.run({
  cik: unprocessedCiks,
});

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…pty date in BootstrapSubmissionsTask

Co-authored-by: sroussey <127349+sroussey@users.noreply.github.com>
Copilot AI changed the title [WIP] Add BootstrapSubmissions command for processing SEC submissions refactor: extract shared fetchAndStoreSubmission helper; fix invalid empty date in BootstrapSubmissionsTask Mar 2, 2026
@sroussey
sroussey marked this pull request as ready for review March 2, 2026 18:49
@sroussey
sroussey merged commit c725dc9 into bootstrap Mar 2, 2026
1 of 2 checks passed
@sroussey
sroussey deleted the copilot/sub-pr-62 branch March 2, 2026 18:50
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