Skip to content

fix(updater): a missing historical, performance or distributions worksheet keeps the published fund - #98

Merged
daggerok merged 1 commit into
mainfrom
fix/worksheet-guard
Oct 26, 2026
Merged

daggerok merged 1 commit into
mainfrom
fix/worksheet-guard

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What changed

  • ISH-1 (review 2026-10-24, HIGH): only the Holdings worksheet was guarded. If the provider renamed or dropped a worksheet of the fund download:
    • no Historical sheet -> every history page was written empty and the old pages were deleted
    • no Performance sheet -> all returns null, still labelled official
    • no Distributions sheet -> distribution rows emptied
  • worksheetsProblem() rejects such a download when the published meta.json has history rows, official returns (officialReturns.asOfDate) or distribution rows: the fund keeps its previous complete state and counts as failed, like a holdings guard rejection. A fund that never published them (new fund, metal trust without distributions) passes
  • README: the fund-level consistency paragraph names the three worksheets
  • The array-row page format of PR 97 is unchanged

Not in this PR

Checks

  • bun test: 37 pass, 0 fail; the new pipeline 3 test fails on the old code for each worksheet separately (Historical, Performance, Distributions)
  • bun build --target=bun scripts/update-data.ts --outfile=/dev/null, bun build --target=bun src/main.tsx --outfile=/dev/null
  • .claude/tools/etfs/tc/check.sh: same 53 lines as main (pre-existing ide-mode baseline), no new errors
  • check-readme.ts: ok; git diff --check: clean
  • Full real run with the new guard: 482 funds, 1 updated (IDU, fresh data, discarded), 481 unchanged, 0 failed, so no live fund trips it today; api/ restored

…sheet keeps the published fund

ISH-1: only the holdings sheet was guarded. A missing or renamed Historical sheet wrote every history page empty
and deleted the old ones, a missing Performance sheet published null returns still labelled official, and a
missing Distributions sheet emptied the distribution rows. worksheetsProblem() rejects a download whose
worksheet is empty where the published meta.json has history rows, official returns or distribution rows: the
fund keeps its previous complete state and counts as failed. A fund that never published them passes.
@daggerok
daggerok merged commit 98eb04f into main Oct 26, 2026
1 check passed
@daggerok
daggerok deleted the fix/worksheet-guard branch October 26, 2026 05:43
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