Repository navigation
Conversation
- publish_dashboard uploads the bytes it validated and hashed, instead of copying the source path again (#293). - freeze_snapshot.py and freeze_adds0928.py read the dashboard payload with load_dashboard_json (strict UTF-8, no NaN or Infinity), as the publisher does; freeze_snapshot checks it before replacing the frozen run (#292). - Tests: a source replaced mid-publish still uploads the validated bytes; both freeze gates refuse a payload with NaN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fixes from review round 1: - publish_dashboard refuses an asset name that isn't a single file name (POSIX or Windows separators, a drive, "", ".", "..", NUL) before any write or gh call. The base's same-file copy refused one such case; the staged write would have overwritten the source. - The staged-bytes test stages under its tmp_path. - freeze_preflight restores sys.path, pandas' future.infer_string and OPENBLAS_NUM_THREADS after each test; a new test checks all three. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix from review round 2: freeze_snapshot's main() now calls remove_stale_artifacts() after freeze_run() returns and before freeze_committed_artifacts() copies the new CSVs. A dashboard that the strict parser rejects (NaN under a matching pin) no longer leaves the snapshot without its top-level US CSVs or its other run directories. freeze_run() writes only under runs/<RUN_LABEL>, which the cleanup keeps. The NaN rejection test now runs main() against a temporary snapshot directory and checks that the CSVs, the older run directories and the previous payload survive. The call-order tests expect the new order. This is part 1 of #315. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #293 and #292, two follow-ups from the round-2 review of #281, and part 1 of #315.
publish_dashboardnow stages the exact bytes it validated and hashed (raw), instead of copying the source path again. If an export replaced the source between the two reads, the release used to get bytes nothing had checked.scripts/freeze_snapshot.pyandscripts/freeze_adds0928.pynow parse the dashboard payload withload_dashboard_json(strict UTF-8, noNaNorInfinity), so every gate reads it the way the publisher does.freeze_snapshot.freeze_runalso checks the payload before it replaces the existing frozen run directory.freeze_snapshot.main()now removes stale artifacts only afterfreeze_run()succeeds. The strict parser can now reject a hash-pinned payload insidefreeze_run(); with the old order, that rejection left the snapshot without its top-level US CSVs while the manifest still named them.publish_dashboardrefuses an asset name that isn't a single file name (separators, a drive,"",.,.., NUL) before any write orghcall. The new tests stage undertmp_path, and thefreeze_preflightfixture restoressys.path, pandas'future.infer_stringandOPENBLAS_NUM_THREADS.Tests:
test_upload_rejects_invalid_asset_namesandtest_freeze_preflight_restores_process_statecover the review fixes.test_upload_uses_validated_bytes_when_source_is_replacedswaps the source file mid-publish and checks that the uploaded bytes and the pointer's sha256 and size match the validated payload.test_freeze_run_rejects_nonstandard_dashboard_jsonandtest_freeze_rejects_nonstandard_dashboard_jsongive each freezer a hash-matched payload containingNaNand expectPublishError. The first now runsfreeze_snapshot.main()against a temporary snapshot directory and checks that the previous frozen run, the top-level US CSVs and the older run directories are left intact.Codex lanes (GPT-6.2 Sol) wrote the patch and its two fix commits, and Claude read each against the PR head before applying it. The tests were not run locally; CI runs
pytest -m "not slow".ruff checkandruff format --checkpass on the changed files.🤖 Generated with Claude Code