Skip to content

Pin @policyengine/calibration-tree 0.1.6 - #328

Merged
anth-volk merged 2 commits into
mainfrom
claude/pin-calibration-tree-0.1.6
Nov 27, 2026
Merged

anth-volk merged 2 commits into
mainfrom
claude/pin-calibration-tree-0.1.6

Conversation

@anth-volk

@anth-volk anth-volk commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #327. Tracker task 5a · 7a of "1. Collector/Emitter", which depends on 5a · 7 (#326, merged).

Why

#326 merged with @policyengine/calibration-tree still pinned at 0.1.5. To read a version 2 run's artifacts/reform_validation.json copy, it added local stand-in types for that file name. 0.1.6 is on npm, released by PolicyEngine/microcosm-collector#84 (5a · 6), and names the file among a run's copied files.

What changes

  • frontend/package.json pins 0.1.6, and frontend/bun.lock follows.
  • frontend/lib/microcosm/stored-staging.ts drops CopiedFileName and its copiedFile cast. It reads record.files by the package's StagingRunFileName, which now names artifacts/reform_validation.json. Its comments no longer describe a difference from the package's Hugging Face reader: 0.1.6's reader also reads a structured run's declared reform validation from artifacts/, with the same digest check.
  • frontend/lib/microcosm/test-support/fake-collector-store.ts drops FakeStagingRunFileName.
  • The version 2 run tests drop the casts they needed under 0.1.5.

What the Staging page shows doesn't change. Under 0.1.5, the reader already read the new copy through its local type. 0.1.6 keeps the copied-files index at schema version 1.

What else 0.1.6 changes, and whether the dashboard uses it

Changed or added in the package between 0.1.5 and 0.1.6:

  • staging-run-files.ts: the new file name, stagingReformValidationFileName, and loadCopiedStagingRun's reform validation choice. The dashboard uses only the type and the file-name list.
  • staging-artifact.ts: the Hugging Face reader reads declared build and release manifests and reform validation. The dashboard doesn't call these readers; it reads only the collector's copies.
  • calibration-tree-source-files.ts adds storeCalibrationTreeSourceFile, which stores a build's source-file copies, and now imports put from @vercel/blob.
    • The dashboard imports readCalibrationTreeSourceJson, calibrationTreeSourceFilePath and the CalibrationTreeSourceFile type from this module, in the collector store reader and the fake collector store. These exports are unchanged.
    • The package's Blob module, which the dashboard already loads, already imported put.
  • calibration-tree-publication.ts and the new calibration-tree-source-copies.ts, which use it. The dashboard imports neither.
  • staging-run-files-command.ts, which only the collector runs.

Tests

Red-green:

  • c3c3c4a adds a test that the pinned package lists artifacts/reform_validation.json among a run's copied files (STAGING_RUN_FILE_NAMES, isStagingRunFileName). Run by name on 0.1.5, it failed on its assertion.
  • 4da995a pins 0.1.6 and removes the stand-in types. tsc --noEmit passes. The tests were not re-run locally after it; CI runs them.

Review

  • Round 1 (calibration-diagnostics-328-review-round1-2026-11-27.md, at 4da995a): 0 high, 0 medium, 1 low.
    • Low: this description said the dashboard imports nothing from calibration-tree-source-files.ts. Corrected above; no code change.
    • It compared the 0.1.5 and 0.1.6 tarballs and found every function the dashboard uses unchanged. It confirmed that the lockfile's integrity matches the registry, and ran the test file red at c3c3c4a and green at 4da995a, and the package pin tests.
    • Code-quality points not applied:
      • The stored reader keeps its own rule for which reform validation copy to read, although 0.1.6 exports one (stagingReformValidationFileName). The two differ only for a run with version 2 or 3 events but no readable run manifest or progress. Adopting the package's rule changes reader behavior, which is beyond this task.
      • The new test fits the package pin test module better. It stays where it is, to keep the red-green commits as reviewed.
      • A version 2 run's tree built before 0.1.6 has no copies of the declared build and release manifests. No such run declares them: UK runs declare none, and no US version 2 run exists yet.
  • No further rounds: no code changed after round 1.

Bugs left: none.

What the merge waits for

Nothing else: 5a · 7 is merged and 0.1.6 is on npm. It waits only for review and for Anthony marking it ready and merging it.

🤖 Generated with Claude Code

anth-volk and others added 2 commits November 27, 2026 22:12
@policyengine/calibration-tree 0.1.6 lists artifacts/reform_validation.json
among a staging run's copied files (STAGING_RUN_FILE_NAMES). The dashboard
still pins 0.1.5, which doesn't, so the test fails on its assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.1.6 names artifacts/reform_validation.json among a staging run's copied
files and reads a structured run's declared reform validation from
artifacts/, as the collector now copies it. The stored staging reader and
the fake collector store drop their local stand-in types for that name, the
reader's comments no longer describe a difference from the package's
Hugging Face reader, and the version 2 run tests drop their casts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
calibration-diagnostics Ready Ready Preview Nov 27, 2026 6:14pm UTC

Request Review

@anth-volk
anth-volk marked this pull request as ready for review November 27, 2026 18:49
@anth-volk
anth-volk merged commit 1e5e147 into main Nov 27, 2026
5 checks passed
@anth-volk
anth-volk deleted the claude/pin-calibration-tree-0.1.6 branch November 27, 2026 18:49

This branch was successfully deployed

1 active deployment
Preview — 4da995a4 Deployed Nov 27, 2026 by vercel[bot]
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.

Pin @policyengine/calibration-tree 0.1.6

1 participant