Skip to content

feat(updater): closed funds skip fetch and guard, guard rejection is failed, test groups of at most five - #96

Merged
daggerok merged 1 commit into
mainfrom
feat/closed-funds-guard-policy
Oct 26, 2026
Merged

daggerok merged 1 commit into
mainfrom
feat/closed-funds-guard-policy

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What changed

  • Shared holdings-guard block re-applied with apply-holdings-guard.ts (adds ClosedFund, closedFund, markClosedFunds, withoutClosedFunds)
  • Q1 closed funds: CLOSED_FUNDS (empty - the candidates UAE and BILT still trade, no liquidation 497 on SEC and both fund pages are live). In main():
    • withoutClosedFunds wraps catalogEligible (after the catalog and TICKERS filters, before selectUpdateBatch spends MAX_FETCHES and before any request)
    • markClosedFunds wraps the index rows right before index.json is built
    • the unknown-TICKERS check accepts a closed fund whose row is published even when the live catalog dropped it
    • the vanished-fund cleanup never prunes a closed fund: its row and directory stay
  • Q2 one reporting policy: already compliant, no behaviour change. A guard rejection throws inside updateFund, so it is reported failed (fund line, summary tally, RunSummary.failed); a new fund without a result falls back to buildCatalogRow (dataFile null, full metrics keys with returnsBasis). The pipeline test a fund never fetched successfully ... now also covers a new fund whose holdings the guard rejects and a following good run that publishes both catalog-only funds in full
  • Q12: test groups split to at most five tests (controls 8 -> 4+4, parsing 6 -> 3+3, pipeline 13 -> 5+4+4)

Why

open-items etfs Q1, Q2, Q12: one policy for closed funds and guard failures in all 29 brands, same shape as daggerok/Schwab#73

Checks run

  • bun test: 36 pass, 0 fail, 301 expect() calls (35/274 before the change; the split kept 36/301)
  • New test a closed fund is never fetched or reported failed ... fails when any of the four wiring points is reverted (withoutClosedFunds, markClosedFunds, TICKERS check, pruning exemption)
  • Gates: bun test with the workflow env, bun build of the updater and src/main.tsx, git diff --check, hub check-scripts/workflow/readme/pages, exec bit, tc/check.sh adds no IDE errors vs origin/main
  • Real run TICKERS=IBTQ REQUEST_SLEEP=0 bun scripts/update-data.ts: 1 unchanged, 0 failed. Same run with IBTQ temporarily in CLOSED_FUNDS: [ closed ] IBTQ, 0 failed, index.json diff only the closed marks plus generatedAt. No data committed

…failed, test groups of at most five

- open-items etfs Q1: CLOSED_FUNDS (empty; UAE and BILT still trade) with the shared
  closedFund, withoutClosedFunds and markClosedFunds; a closed fund is never fetched,
  guarded, reported or pruned, and TICKERS accepts it while its row is published
- open-items etfs Q2: already compliant (guard rejection is failed, a new fund that is
  rejected or never answered gets a catalog-only row); the pipeline test now proves it
- open-items etfs Q12: test groups split to at most five tests each
@daggerok
daggerok merged commit e27fdc0 into main Oct 26, 2026
1 check passed
@daggerok
daggerok deleted the feat/closed-funds-guard-policy branch October 26, 2026 04:54
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