Skip to content

pins bump: the write half of the one-rev-everywhere gate - #65

Merged
lann merged 1 commit into
mainfrom
pins-bump
Aug 7, 2026
Merged

pins bump: the write half of the one-rev-everywhere gate#65
lann merged 1 commit into
mainfrom
pins-bump

Conversation

@lann

@lann lann commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #60 (umbrella #14).

component-test pins bump <rev> [--cargo-toml …]… [--package-json …]… [--workflow …]… rewrites the declared pins in place:

  • Cargo.toml: rev = "<40-hex>" on git-dependency lines naming a component-test-* crate (name-anchored, single-line dep form — what every consumer uses); reports the crate names for the cargo update -p follow-up.
  • package.json: bounded 40-hex runs on lines naming @polymorph/component-test-js (same boundary rule as the check half — integrity strings survive).
  • Workflows: @<40-hex> on lines containing polymorph-test/actions/ (a uses: ref embeds the repo path by construction, so a rename edits those lines regardless); the consumers' grep-guard regex text is untouched (asserted by test).

Deliberately not done: lockfile edits. The command prints the follow-ups (cargo update -p …, npm install/pnpm install, then the pins check with --expect <rev>) — regeneration belongs to the package managers, verification to the existing gate. A named file with no matching pin site is an error, not a skip.

Verified: unit tests for each rewriter + boundary/no-op/final-newline cases; end-to-end run against a three-file fixture.

Bumping the pin is a documented manual procedure in every consumer,
touching ~5 sites per repo: the Cargo.toml rev, the JS facade's
github: spec, and every actions/*@<rev> literal in workflows.
`pins bump <rev>` rewrites the declared pins in place — anchored the
same way the check half reads them (crate/package names; the
repository path for workflow refs, which a rename must edit anyway) —
and prints the lockfile-regeneration follow-ups it deliberately does
not run. Lockfiles stay owned by cargo/npm/pnpm; `pins` remains the
verifier.

The 40-hex replacement reuses collect_revs' boundary rule, so
integrity strings and the consumers' grep-guard regex text survive.

Fixes #60.
@lann
lann merged commit 5c4262d into main Aug 7, 2026
2 checks passed
@lann
lann deleted the pins-bump branch August 7, 2026 04:08
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.

pins --bump: mechanical multi-site pin bump for consumers

1 participant