Skip to content

fix(release): count lockfile changes only when the published crate's dependencies change - #60

Merged
zoeyrose merged 2 commits into
mainfrom
fix/lockfile-version-gate
Oct 18, 2026
Merged

zoeyrose merged 2 commits into
mainfrom
fix/lockfile-version-gate

Conversation

@zoeyrose

Copy link
Copy Markdown
Member

Summary

tools/crate_prepare.py check-version treated every Cargo.lock diff as a change to the published atrinik-protocol package. That blocks #57 (sha2 0.11.0 → 0.11.1), even though the only sha2 user is the unpublished, dev-only tools/rendezvous-conformance member. The published atrinik-protocol-0.2.0.crate ships a trimmed Cargo.lock that contains no sha2 or hmac.

Implementation / behavior

  • When Cargo.lock changes, compare the locked graph reachable from each published crate at the base and the candidate. Only a difference in that graph, or in the lockfile format version, now counts as changed package content.
  • The walk follows every workspace edge of the crate, including dev-dependencies and optional features enabled by other members, so it can only over-approximate what Cargo writes into the packaged lock.
  • Ambiguous or unresolvable dependency references, or a published crate missing from the lock, fail closed.
  • Unchanged: Cargo.toml, toolchain, crate path and .cargo/ changes still count unconditionally. Release preparation still compares complete packaged content with the owning archive, so a missed change would stop preparation rather than publish different bytes at an owned version.
  • README: one sentence describing the lockfile rule next to the local check-version command.

No generated files, crate versions, publication policy or packaged data changed.

Validation

  • New tests:
    • a dev-only sha2 update in an unpublished member passes at an unchanged version;
    • a transitive dependency update, a new dependency edge and a lockfile format change in the published graph each still fail without a version bump;
    • ambiguous or missing references fail closed.
  • All 103 protocol Python tests, the release policy checker and git diff --check pass locally.
  • Against the real repository, with chore(deps): bump sha2 from 0.11.0 to 0.11.1 #57's Cargo.lock diff applied to current main:
    • the new gate passes, and the previous gate fails with package content changed without reviewed version bump;
    • changing the prost checksum, which is in the published graph, still fails.
  • The graph computed from main's workspace lock is identical, entry for entry, to the 37-package Cargo.lock inside the published atrinik-protocol-0.2.0.crate.
  • Protocol validation remains the acceptance gate.

Limitations / follow-up

After this merges, @dependabot rebase on #57 should let it pass without a crate version bump. seraphinastudios/tilewright-renderer carries a separate copy of this gate. Its sha2 update really does change packaged content and was handled with a version bump there.

🤖 Generated with Claude Code

…dependencies change

The version gate treated every Cargo.lock diff as a change to the
published atrinik-protocol package. Cargo trims a packaged crate's
Cargo.lock to the graph reachable from that crate, so an update confined
to an unpublished workspace member, such as sha2 for the dev-only
rendezvous-conformance tool, cannot change packaged content.

For a Cargo.lock change, compare the locked graph reachable from each
published crate at the base and the candidate. The walk follows every
workspace edge, including dev-dependencies and features enabled by other
members, so it can only over-approximate the packaged lock. Unresolvable
or ambiguous references fail closed. Manifest, toolchain, crate-path and
cargo configuration changes still count unconditionally, and release
preparation still compares complete packaged content with the owning
archive.

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

Copy link
Copy Markdown
Member Author

@codex review

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T08:18:16.200627Z c901264 Manual request
🔒 Security Review ✅ Completed 2026-10-18T08:41:42.366601Z c901264 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb63a07bb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/crate_prepare.py Resolved
Cargo can carry top-level Cargo.lock sections such as [metadata] into a
packaged lock. Compare every top-level section other than the package
list verbatim, so a lockfile-only edit there still requires a version
bump before release preparation.

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

Copy link
Copy Markdown
Member Author

Codex round 1:

  • P2 "Include preserved lockfile metadata in the comparison" (tools/crate_prepare.py): fixed in c901264. All top-level lockfile sections other than the package list are now compared, and a test covers it.

@zoeyrose

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: c901264b3a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@zoeyrose

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: c901264b3a

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@zoeyrose
zoeyrose marked this pull request as ready for review October 18, 2026 08:42
@zoeyrose zoeyrose self-assigned this Oct 18, 2026
@zoeyrose
zoeyrose merged commit 6876f2e into main Oct 18, 2026
9 checks passed
@zoeyrose
zoeyrose deleted the fix/lockfile-version-gate branch October 18, 2026 16:59
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