Repository navigation
tooling(pin): register the seven ported hook files, each at its own upstream ref - #9255
Merged
Merged
Conversation
…pstream ref `scripts/upstream-port-pin.json` carried four entries; the seven remaining ported `.claude/hooks/**` files were unregistered, so an edit to any of them was invisible to `check-upstream-port-parity`. Each new entry names the upstream ref its digest was taken from, per file: the ref at which this repo's copy already tracks upstream. Every difference is declared as an exact text pair with a one-sentence reason. No hook byte moves and the pin schema is unchanged. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCLBsUgfykL74aU716rzVK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8696
Registers the seven remaining ported
.claude/hooks/**files inscripts/upstream-port-pin.json, per file rather than as one batch. All seven took outcome (A) — registered at their ownref, with every difference declared as an exact text pair carrying a one-sentencewhy. None needed outcome (B), so there is no "not pinned, because …" row below.⛔ No
.claude/**byte moves:--resyncwas never run,--rewrite-governed-filewas never passed, and the pin schema is untouched. The diff is the ledger file plus a changeset.Per-file outcome
Ref column shows the short sha; each entry carries the full 40-character sha, as
validatePinrequires. "pairs" is the declared divergence count for that entry. The last column is what the same measurement gives at upstreamorigin/maintoday (c2520416cblob for every one of these paths), which is the alternative ref considered..claude/hooks/guard-main-checkout.shc2520416c.claude/hooks/guard-main-checkout-bash.sh924f0fed1.claude/hooks/guard-main-checkout-bash.selftest.sh924f0fed1.claude/hooks/guard-shared-stash.sh2b9f5810b.claude/hooks/guard-shared-stash.selftest.sh2b9f5810b.claude/hooks/guard-tree-enum.shc074c57e4.claude/hooks/guard-tree-enum.selftest.shc074c57e4objectui#7953's blocker is gone as the card says: two of these (
guard-tree-enum.shand its self-test) did not exist upstream at the ledger-wide ref that card was measured against, and they are now pinned atc074c57e4, the commit that created them upstream.How the ref was chosen, per file
The rule applied, stated so it can be argued with rather than inferred: take the newest upstream ref whose content this copy already tracks. A ref newer than that adds pairs that are upstream work this repo has not ported; a ref older than that adds pairs that hide upstream work this copy already has. Both directions were measured; the last table column is the newer-ref side of that measurement.
The operational reason the newest-ref default was not taken blindly:
--resyncapplies the declared pairs FORWARD onto the new upstream text. A pair that declares "upstream has a paragraph we do not" therefore teaches every future re-sync to delete that paragraph again, permanently. At the chosen ref those regions are simply not pairs, and a later re-sync brings them across.The rule also moves the other way, and did for one file.
guard-shared-stash.selftest.shreaches its smallest set (7 pairs) at9f2280163, but that ref predates a fix this copy HAS — the whole backslash matrix collapses into one 39-line pair that reads as objectui-only work and hides the fact that upstream has an equivalent.2b9f5810bcosts 10 more pairs and is the honest one: there the pairs are between two versions of the same section, including the case-matrix rows each repo carries and the other does not.For
guard-main-checkout.shthe rule lands on upstreamorigin/main's own blob, and that entry has 2 pairs and zero executable lines.Verdict lines, before and after
origin/maine7173d9db,node scripts/check-upstream-port-parity.mjs, exit 0:This branch, same command, exit 0:
Every one of the seven new entries prints its own
✓ … byte-identical to objectstack-ai/objectstack@REF:PATH modulo N declared divergence(s).line.The gate's self-test, run first as
lint.ymlruns it, exit 0:✓ check-upstream-port-parity self-test: 58 cases pass — ….What the new entries make visible
The point of a ledger row is that it can be read. Three of the new pairs say out loud that this copy is behind upstream, and they are labelled that way in their
whyrather than dressed as decisions:guard-shared-stash.sh— upstream's recovery-by-scrollback paragraph, and the fourth alternative in both the header list and the printed remedy (commit the fix first, then take it out with a path-scoped checkout).guard-shared-stash.selftest.sh— upstream's&&twin and itsgit -Ctwin of the escaped-quote block case.Acting on those means editing
.claude/**, which this card forbids; they are now ledger rows instead of nothing.Acceptance notes
Out-of-scope observations, noted rather than filed (neither is a reproducible defect, a declared-contract breach, nor a metadata trap):
.github/workflows/lint.ymlline 307 still reads "Ported from objectstackscripts/check-bash32-floor.mjs… and deliberately NOT registered inscripts/upstream-port-pin.json— that ledger carries ONE globalupstream.ref". Both halves have been false since objectui#8288 retired the field and objectui#8694 registered the file; objectui#8694 remains open as the card whose PR left the comment behind.scripts/check-bash32-floor.mjs's "## Why this port is not YET pinned" section says "It is still NOT registered". Same staleness, same taker; that file is itself a pinned port, so repairing it is a divergence-declaring edit rather than a free one.Neither is touched here: this PR's diff is the ledger plus a changeset, and widening it would put a governed-adjacent workflow edit into a PR whose whole claim is that it moved no ported byte.
Local verification
node scripts/check-upstream-port-parity.mjs --self-test→ exit 0, 58 cases.node scripts/check-upstream-port-parity.mjs→ exit 0, 11 of 11 green.node scripts/check-control-bytes.mjs→ exit 0, 7441 tracked text files scanned.node scripts/check-changeset-presence.mjs→ exit 0;node scripts/check-changeset-claims.mjs→ exit 0.node scripts/check-governed-queue-guard.mjs --teston both changed paths →NOT GOVERNED, 2 paths against 5 surfaces.pnpm exec vitest run scripts/__tests__/upstream-port-parity-wiring.test.ts→Test Files 1 passed (1),Tests 12 passed (12). This is the gate's own wiring suite and the only suite in the tree that reads the pin file; it asserts coverage, the per-entryref, and that no pinned path falls insidelint.yml's ignore set — the last one being what a new entry could have broken.All of the above were run on
7394d3df7, this branch's head after the final commit, against a clean working tree. The repo-wide farm is CI's run, not this seat's.Drafted by an automated developer session; the session reference is
session_01MCLBsUgfykL74aU716rzVK, written here as prose because footer blocks are rewritten on this platform.Generated by Claude Code
Generated by Claude Code