Repository navigation
ci(flow): commit artifact paths only; pin their hashes at release - #1342
Merged
Merged
Conversation
public-artifacts.json pinned the SHA-256 of every public data/config file, so each pull request that edited claims.yaml, verification.json or a fixture rewrote the same hash rows, and parallel pull requests conflicted on them. The committed file is now the reviewed path list (schema 2). Pull requests and main still fail on any unlisted or missing artifact path, and every open-core path, signature and license check is unchanged. The release workflow runs --stamp-release-inventory on the exact commit it builds, which rewrites the list as schema 1 (path + SHA-256), and then validates the wheel and sdist with --validate-dist-dir. Archives that embed the unstamped list are refused. release-package.yml did not run the flow archive checks at all before this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-on-prs # Conflicts: # packages/flow/public-artifacts.json
…ed list in archive tests The archive tests built their stamped inventory by walking packages/flow, so a symlink another test left under runs/ failed them (flow core unit shard 3/4). They now hash the committed path list directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-on-prs # Conflicts: # packages/flow/public-artifacts.json
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.
Why
packages/flow/public-artifacts.jsonpinned the SHA-256 of every public data or configuration file. Any pull request that editedclaims.yaml,docs/verification.jsonor a fixture rewrote the same hash rows. Two such pull requests always conflicted, and when git merged them cleanly the hashes on the merge commit were wrong anyway.Since 2026-10-17, 70 commits on PR branches touched this file. 28 of them were merges from
mainand 6 were inventory refreshes. Each one was a push that reran the full PR pipeline (about 40 jobs).What changes
--write-public-artifact-inventorywrites a sorted path list. Editing a listed file no longer touches the inventory. Adding, removing or renaming an artifact still requires a one-line edit to the list.release-package.yml(packageflow) runs--stamp-release-inventory. That command first validates the tree against the reviewed list, then rewrites the list as schema 1 (path + SHA-256), as before. Afterpython -m build, it runs--validate-dist-dir. The stamp hashes only the reviewed paths, so a file that appears only at build time is still flagged as unregistered in the archive check.require_hashes=True).What stays exactly as strict
python scripts/check_release_consistency.pystill fails on any unlisted or missing artifact path, untracked listed paths, symlinks, private path segments, private-corpus content signatures, repository-only evaluation paths and the bounded lending evidence shape. Only the hash comparison moved to the release.This also adds a check.
release-package.ymldid not run flow's archive boundary checks before;python -m buildoutput went straight to PyPI. It now runs--validate-dist-dir, which checks the license, the open-core boundary and artifact provenance.Verified
main's inventory.--stamp-release-inventory,python -m build packages/flow,--validate-dist-dir ../../dist): pass. The stamped rows are identical to the hashed rows onmaintoday.tests/test_release_contract.pyandtests/test_source_policy_binding.py: 81 passed.packages/privacy/tests/test_release_config.py: passed. Ruff and mypy are clean.Savings
Each avoided conflict saves one push and one full PR pipeline rerun (about 40 jobs). From the counts above, that was around 30 reruns over two days.
One-time cost: open PRs that edit
public-artifacts.jsonwill conflict once with this change. To resolve, takemain's file and runpython scripts/check_release_consistency.py --write-public-artifact-inventory.No changes to
packages.yml,desktop-release.ymlormain.yml; the Desktop 0.21.0 release does not depend on anything here.🤖 Generated with Claude Code