Skip to content

feat: add SHA-256 checksums to pack release metadata#4

Merged
breferrari merged 1 commit into
mainfrom
feat/pack-checksums
Mar 25, 2026
Merged

feat: add SHA-256 checksums to pack release metadata#4
breferrari merged 1 commit into
mainfrom
feat/pack-checksums

Conversation

@breferrari

Copy link
Copy Markdown
Contributor

Summary

  • generate.py now computes SHA-256 checksums over the canonical JSON of each version's files map
  • Each packs/{name}.json version entry includes a "checksum": "sha256:{hex}" field
  • Canonical form: json.dumps(files, sort_keys=True, separators=(',', ':')) — matches the Rust client exactly

Companion to breferrari/weave#240.

Test plan

  • generate.py runs successfully on all 13 packs
  • Each version entry in packs/*.json now includes a checksum field
  • Cross-language validation: Python and Rust produce identical hashes for the same input

Compute and emit a sha256: prefixed checksum for each pack version's
files map. The canonical form is compact JSON with sorted keys,
matching the weave client's checksum::compute() function.

Companion to breferrari/weave#240.
@breferrari breferrari self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 08:39
@breferrari
breferrari merged commit 092086f into main Mar 25, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-version SHA-256 checksums to the registry’s pack release metadata, enabling clients (e.g., the Rust weave client) to validate pack contents deterministically.

Changes:

  • Add checksum computation to scripts/generate.py based on canonical JSON serialization of each version’s files map.
  • Include a checksum: "sha256:{hex}" field in each generated pack version entry.
  • Regenerate packs/*.json outputs to include the new checksum field.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
scripts/generate.py Introduces compute_checksum() and emits a checksum field per version during generation.
packs/brave-search.json Generated output updated to include checksum for the version entry.
packs/docs-writer.json Generated output updated to include checksum for the version entry.
packs/fetch.json Generated output updated to include checksum for the version entry.
packs/filesystem.json Generated output updated to include checksum for the version entry.
packs/git-tools.json Generated output updated to include checksum for the version entry.
packs/github.json Generated output updated to include checksum for the version entry.
packs/memory.json Generated output updated to include checksum for the version entry.
packs/postgres.json Generated output updated to include checksum for the version entry.
packs/python-dev.json Generated output updated to include checksum for the version entry.
packs/rust-dev.json Generated output updated to include checksum for the version entry.
packs/sequential-thinking.json Generated output updated to include checksum for the version entry.
packs/sqlite.json Generated output updated to include checksum for the version entry.
packs/web-dev.json Generated output updated to include checksum for the version entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packs/web-dev.json
Comment on lines +24 to +25
"dependencies": {},
"checksum": "sha256:86f6936a2a799d0e835c4c29748aad00674bc89369e03ed049e083ee3645bb9a"

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to 24
"dependencies": {},
"checksum": "sha256:c1da7192c923c801df32afde883028d309c8de41ea735ce275f79eed56b5ffe4"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/git-tools.json
Comment on lines +23 to 25
"dependencies": {},
"checksum": "sha256:e43a5227785e95058bb21f2c3983ee2b2e7c9056005ef41a0ca59a5d041de120"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/fetch.json
Comment on lines +23 to 25
"dependencies": {},
"checksum": "sha256:7b3a9703a2c11bc08c149ae7442462f65e4aea73c0a0d200476ef45d94dab11c"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/brave-search.json
Comment on lines +22 to 24
"dependencies": {},
"checksum": "sha256:233a4c209f0fec43bb5c618a0ab25bd063a407132e948b2f66962a803d24133a"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/docs-writer.json
Comment on lines +24 to 26
"dependencies": {},
"checksum": "sha256:27c04b551c876abea94fdb48a3d3985c10339eacfe0f9f9a088b3cb20011c45e"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/rust-dev.json
Comment on lines +24 to +25
"dependencies": {},
"checksum": "sha256:94767227fa0402e052cb06c07a309001d47657b30ab7d0104798e17a9588f931"

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/postgres.json
Comment on lines +23 to 25
"dependencies": {},
"checksum": "sha256:21fe8d2b695b39ddd1bfbea11af8067afda2d069f041c1a4a9bcfa306766046c"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/memory.json
Comment on lines +22 to 24
"dependencies": {},
"checksum": "sha256:7bf489e44de1ca60bac9fc51fbf5764a209391e8ea7259966ed1fc3eee7150ab"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
Comment thread packs/filesystem.json
Comment on lines +23 to 25
"dependencies": {},
"checksum": "sha256:167c89ccd2355ce79fb9d8fc1df447c07368d97ebc093364456c3367c681b153"
}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repository docs state that packs/*.json are generated artifacts and should not be edited in PRs; CI regenerates them on merge. Consider dropping changes to this file (and other packs/*.json) from the PR and letting the publish workflow commit regenerated outputs after merge.

Copilot uses AI. Check for mistakes.
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.

2 participants