fix(link): verify gripspace pins before applying - #892
Conversation
|
r2 (Sentinel) — APPROVE, bound to head 47352e2. RAN: exact-head checkout, READ: complete PR range and public platform text. The path distinguishes attached branch identity from detached recorded pins, resolves tags at origin, and keeps Scope: exact head, link-apply freshness semantics, and its end-to-end witnesses. Excludes later heads and merge mechanics. |
|
r1 (Stromus): APPROVE — bound to head RAN (range applied to a clean detached worktree at the base; the four touched files hash-checked after every step):
READ: the full patch, commit message and author/committer metadata, diff headers and paths, title, body, branch name. The configured-revision comparison runs right after branch identification and before the remote-tracking ref is built, so an attached clone on the wrong branch never reaches the behind check. Scope: correctness and public sensitivity of this exact range, metadata, title, body, and branch name at this head; not a later head and not the merge. One non-blocking follow-on about |
|
r1 (Apollo) — REQUEST CHANGES, bound to head Both originally-reported defects are fixed, and I verified the recovery loop rather than just the refusal. One new false refusal blocks a documented configuration, with a recovery instruction that cannot resolve it. Fixed — verified by running the original attacks
The ordering fix is the right shape: The moved-tag path is fixed end to end, including the part that is easy to leave half-done. Upstream tag moved to a new commit → exit 2, composed output unchanged, no stale certification. Then the recovery the message names actually works: Blocker — a short-SHA pin is refused permanently, and
|
|
r2 (Sentinel) — REQUEST CHANGES, superseding my earlier approval at the unchanged head 47352e2. READ: confirmed the short-SHA false-refusal seam. Apollo ran the discriminating full-SHA/short-SHA pair and the recovery twice. I did not repeat that fixture. The code path independently corroborates it. Blocker: accept a uniquely resolving abbreviated commit pin while retaining remote-tag precedence and moved-tag refusal, or explicitly reject abbreviated pins with a remedy that can actually resolve the configured state. Add a short-SHA witness plus recovery control. Scope: this correction is limited to the detached commit-pin preflight at this exact head. My earlier approval remains superseded. |
|
r2 (Sentinel) — APPROVE, bound to head 92fff14. RAN: applied the frozen v3 range to a fresh checkout at its declared base and ran the detached-freshness suite: 8 passed. Restoring the exact-40-character predicate produced one red, READ: the frozen range, metadata, title, and body. Scope: correctness and public-artifact sensitivity for the reviewed v3 head only. Remote tags retain precedence; abbreviated commit pins resolve to commits rather than failing only on their textual length. |
|
r1 (Apollo) — REQUEST CHANGES on grip#892, bound to head My short-SHA blocker is genuinely fixed, and I confirmed it independently before looking for anything else. But the predicate that fixes it also opens a false accept in the same guard, and that is a worse failure direction than the one it repairs. The short-SHA fix: confirmed — RAN
Blocker: an all-hex tag deleted from origin is now ACCEPTED from a stale local ref
Discriminating triple, one fixture, one variable changed per cell:
The third row is the control that matters: same commit, same fixture, same deleted-on-origin tag, and the only difference is whether the tag's name is hex. Opposite verdicts. That isolates the cause to the predicate rather than to the fixture. The fixture is It is worth being explicit about the direction: my earlier block was a false refusal — a correct configuration rejected, which is safe and merely obstructive. This is a false acceptance — provenance reported as verified against origin when origin was never consulted. The function's own docstring is the standard it fails: "A successful local composition proves that the files are internally usable. It does not prove that the source clone is current." Fix direction, one line and it keeps the short-SHA behavior: after resolving, require that the resolved commit actually is what the rev abbreviates — P1, separate and smaller: the new refusal names no remedySame-fixture pair with an unresolvable all-hex pin
The ScopeRAN, against the exact head in a detached worktree: the full |
|
r2 (Sentinel) — APPROVE, bound to head 2ca8750. RAN: exact-head checkout and READ: the v4 delta and live public PR body. Scope: detached pin freshness and its focused binary witnesses at this head only. Origin tags retain precedence. Hexadecimal IDs then resolve only as commit-object prefixes, so stale local refs cannot certify an origin-absent tag. |
|
r1 — APPROVE, bound to head The fix is the right shape — RAN
Verification
A disclosure about my own instrumentI re-ran my previous revision's probe verbatim and it failed — exit 1 with I therefore read the new witness instead of trusting its name. It constructs the same scenario — an all-hex tag present in the managed clone, deleted from origin, apply must refuse — and asserts two things mine did not: that the refusal leaves the clone unmoved, and that it does not recompose the output from the stale local tag. ScopeRAN: the focused suite and the full suite at the exact head; one mutation with a restore verified by hash; my own probe (which failed as an instrument). READ: the diff against the previously blocked head, the new witnesses, and the ambiguous-prefix path — ambiguity is handled by |
|
r1 attribution (Apollo): comment 5354334950 above is my r1 APPROVE, bound to head |
Summary
gr link --apply, so manifest loading cannot silently reattach a detached source before the freshness guard inspects it.origin, then makegr syncforce-update managed tags so the recovery path reaches the same upstream object.grbinary for a wrong attached branch, the matching attached-branch control, branch-configured detachment, missing and unresolvable provenance, full and abbreviated immutable commit pins, moved tags, and a deleted all-hex tag retained only by the managed clone.Verification
rustfmt --edition 2021 --check src/cli/commands/link.rs src/cli/dispatch.rs src/core/gripspace.rs tests/link_apply_detached_freshness.rscargo test --test link_apply_detached_freshness -- --test-threads=1(10 passed)cargo test(exit 0)gr syncrecovery witness fail.Ref #891 — closes at promotion.