Skip to content

Automate the contract pin and block non-main sendbox pins - #5

Merged
mbianchidev merged 1 commit into
mainfrom
contract-pin-automation
Nov 15, 2026
Merged

mbianchidev merged 1 commit into
mainfrom
contract-pin-automation

Conversation

@mbianchidev

Copy link
Copy Markdown
Collaborator

Keeps the contract pin on sendbox main automatically, and stops a PR from merging while it still tracks a sendbox branch.

Changes

  • Dependabot now updates sendbox-governance and sendbox-security together as one group (sendbox-contract), in a single daily PR. Before, only sendbox-governance was listed.
  • Auto-merge is enabled when the Dependabot PR updates nothing but those two crates. It used to require the update list to be exactly sendbox-governance. Branch protection still waits for all required CI jobs.
  • scripts/check-contract-pin.sh fails unless every sendbox-* crate in Cargo.lock is locked to a sendbox main commit:
    • Cargo.toml must use branch = "main", with no rev or tag.
    • Local path patches fail too.
    • CI runs it as the last step of the required "Format, lint, and test (SQLite)" job. A PR that tracks a sendbox branch during review still gets every other result, but cannot merge. Branch protection settings are unchanged.
  • Docs: docs/contract.md, docs/development.md, CONTRIBUTING.md.

Validation

  • shellcheck and actionlint pass.
  • The script passes on main, and fails on a branch pin, a rev pin, and a lockfile with no source (path patch).
  • The auto-merge scope check gives:
    • sendbox-governance, sendbox-security → merge
    • sendbox-governance → merge
    • sendbox-governance, serde → skip
    • empty → skip
  • cargo update -p sendbox-governance --precise <sha> --dry-run moves all three SendBox crates together.

…pins

- Dependabot groups sendbox-governance and sendbox-security into one daily
  pull request; auto-merge accepts it when it updates only those crates.
- scripts/check-contract-pin.sh fails unless every SendBox crate is locked
  to a sendbox main commit (no branch, rev, tag, or path pins). CI runs it
  as the last step of the required SQLite job.
- Document the flow in contract, development, and contributing docs.
@mbianchidev
mbianchidev marked this pull request as ready for review November 15, 2026 19:33
@mbianchidev
mbianchidev merged commit 8f54326 into main Nov 15, 2026
4 checks passed
@mbianchidev
mbianchidev deleted the contract-pin-automation branch November 15, 2026 19:33
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