Skip to content

fix(gate): verify dependency pins against the local package version, not only npmjs - #327

Merged
gtrabanco merged 1 commit into
mainfrom
fix/pins-verify-against-local-package
Oct 27, 2026
Merged

gtrabanco merged 1 commit into
mainfrom
fix/pins-verify-against-local-package

Conversation

@gtrabanco

Copy link
Copy Markdown
Owner

Closes the registry-vs-local bind in the version-parity gate's --pins half.

The defect

The gate compared pins only against npmjs, so the pin lifecycle was unsolvable: after every crate publish, all open PRs go red until a fix(deps) chase lands (live today: #325), and a pin bumped ahead of the registry passed without being verified against anything — it could point at a version that will never exist.

The rule

For every exact pin whose target has a local sibling package under packages/, the pin must equal the local package version — the one this merge publishes. Offline-deterministic: holds even when the registry is unreachable (a network blip still degrades, never fails, a matching pin — AC3). The registry rule keeps precedence (a pin behind the published latest fails even when it matches local — rebase instead). Same gate-rejection vocabulary (dependency-pin-drift), no new kind.

Test-first

7 new tests; 4 red before the implementation (same-PR release pass, same-PR coupling fail, never-exists fail, offline fail). Root suite 929/929, package suite 471/471.

Note

This PR's own --pins check is red until #325 merges (its checkout still pins 0.4.0) — the fixed gate correctly rejecting a stale pin is the fix working. Rebase after #325 and it goes green.

AGENTS.md §Packages updated to the new rule.

Automated written using a AI

…not only npmjs

The registry half of the version-parity gate only compared pins against
npmjs, which made the pin lifecycle an unsolvable bind: after every crate
publish, all open PRs go red until a fix(deps) chase lands, and a pin
bumped ahead of the registry passed without being verified against
anything (it could point at a version that will never exist).

Rule now: for every exact pin whose target has a local sibling package
under packages/, the pin must equal the LOCAL package version — the one
the merge publishes. Offline-deterministic (holds even when the registry
is unreachable; a network blip still degrades, never fails, a matching
pin — AC3). Registry rule keeps precedence (a pin behind the published
latest fails even when it matches local — rebase instead). Same
gate-rejection vocabulary (dependency-pin-drift), no new kind.

Red-first: 7 new tests, 4 failed before the implementation.
Automated written using a AI
@gtrabanco
gtrabanco merged commit 48fb6bc into main Oct 27, 2026
2 of 3 checks passed
@gtrabanco
gtrabanco deleted the fix/pins-verify-against-local-package branch October 27, 2026 14:16
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