fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution - #13945

Merged
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family
Aug 31, 2026
Merged

fix(pm): governed-merge sweep family — origin identity, per-repo windows, sweep-code provenance, precondition attribution#13945
os-sam merged 4 commits into
mainfrom
claude/issue-13307-governed-merges-family

Conversation

@claude

@claudeclaudeBot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes#13307
Fixes#13423
Fixes#13424
Fixes#13836

Family dispatch: four defects, one file (scripts/pm/check-governed-merges.mjs), one fix discipline — every status measured, loud, attributable, self-tested. Per-member commits, in the family-index order; combined acceptance demonstrated in ONE run (below). Dev session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 (os-dev subagent seat under the dispatching skills PM).

The answer the reopen demanded, in words: is the reachability probe gated on --repo-root?

NO — and it never was. In the landed fix (a40ab8d) the probe runs in the sweep loop for every repo whose checkout resolved, discovered conventionally or overridden, in every window mode; nothing keys it on --repo-root.

What actually happened to the two post-fix runs that still printed the cloud false green (16:5xZ and 19:0xZ on 2026-08-30): they executed a PRE-FIX copy of this script. Measured evidence: the row text they quoted ends with the phrase "if that tip predates your last fetch, run git fetch origin main there". That render string exists in the parent commit 9268aec's quiet-row template and was REMOVED by a40ab8d, which replaced it with the MEASURED-zero / unmeasured-zero split (the only remaining occurrences in a40ab8d are docblock prose quoting the old hedge). A sweep invoked as node scripts/pm/check-governed-merges.mjs from the shared checkout runs whatever version that tree's switched-around HEAD happens to hold, and nothing in the output said which — so a pre-fix reading was attributed to the landed fix.

That un-attributability is the real residual defect, and it is what the #13307 commit fixes: the sweep header now prints a sweep code: line — the executing tree's HEAD plus this file's own blob id, a loud mismatch warning when the running bytes are not the copy HEAD records, and a stated UNKNOWN when the reads fail. Attribution, not prevention: a stale tree prints a stale sha, truthfully, and the reading becomes checkable. (Also in --json as sweepCode.)

Leg 4, the decisive one — the sweep against the real /home/user/cloud configuration

This container held no /home/user/cloud (measured; the premise note on the card records the same). Per the dispatch's stated reading of leg 4's intent, the configuration was reconstructed at the conventional discovery path and removed after the run: a local git clone at /home/user/cloud, history fabricated to mimic the stale snapshot (one commit dated 2026-08-29T09:10:31Z, refs/remotes/origin/main pointing at it), origin set to the REAL https://github.com/objectstack-ai/cloud URL — whose git channel failure is live in this container (measured immediately before the run: git ls-remote --exit-code against that URL exits 128, fatal: could not read Username for github.com: terminal prompts disabled — the wire-level refusal shape this container's credential state produces for that repo; the API channel being back does not change it, and per the card: honesty first, an API probe is optional and never a substitute). No --repo-root cloud= was passed. The transient clone was deleted immediately after the run so no sibling seat can mistake it for a real checkout.

The combined single run — all member controls in the SAME invocation (family-index acceptance)

Run from the committed worktree at head c62a787 (tree clean), objectui freshened first:

node scripts/pm/check-governed-merges.mjs \
--since-ref objectui=b84dc1854922c266850d6e573daf3ad59cbd0623 \
--repo-root objectos=SCRATCH/objectos-localorigin

(SCRATCH is the session scratchpad; that fixture is a git repo whose declared origin is the local path /srv/mirrors/objectos — a spelling slugFromRemote cannot parse. No objectstack pin. No cloud override.)

Exit code: 2 (INCOMPLETE — non-zero as required). Output highlights, verbatim:

governed-merges sweep: 7 governed merge(s) since 2026-08-31T02:59:06.000Z across 1/4 governed repo(s)
scanned 47 mainline commit(s); 7 API lookup(s).
sweep code: HEAD c62a787 — the running file byte-matches that tree's copy (blob b62a544b98).
window: TOPOLOGICAL — ...
✓ audited objectstack-ai/objectui — tip 592acafbe @ 2026-08-31T15:41:56+00:00; 47 mainline commit(s) in window; window topological from b84dc1854; remote origin/main reached at origin, tip 592acafbe matches this mirror
⚠️ UNAUDITED objectstack-ai/objectstack — [history-horizon] cannot audit the whole window on origin/main — this clone is shallow and its oldest visible commit ... sits INSIDE the window. ...
⚠️ UNAUDITED objectstack-ai/cloud — [unreachable-remote] NOT MEASURED: the remote 'origin' could not be reached from /home/user/cloud (fatal: could not read Username for ... terminal prompts disabled). ⛔ A local tip is NOT evidence the remote was consulted ...
⚠️ UNAUDITED objectstack-ai/objectos — [unparseable-origin] NOT MEASURED: the checkout at ... has origin '/srv/mirrors/objectos', which does not parse to a github.com owner/name slug — nothing proves this checkout is objectstack-ai/objectos ...
...
⚠️ sweep INCOMPLETE — 3 governed repo(s) unaudited (objectstack-ai/objectstack: history-horizon, objectstack-ai/cloud: unreachable-remote, objectstack-ai/objectos: unparseable-origin). ...

Member controls, all in this one run:

Per-member deliverables

#13423 — the slug-parse hole (commit "refuse to audit a governed repo whose origin parses to no GitHub slug")

The guard if (seen.slug and seen.slug differs) only fired when a slug WAS parsed. Now a null slug refuses with a NOT MEASURED row naming the declared origin, and audited is reachable only through a parsed slug strictly equal to the governed one. Identity is read from the RAW configured origin URL (git config --get remote.origin.url) rather than git remote get-url origin, which applies insteadOf rewrites first (measured: with a rewrite in force, get-url answers the rewrite target — a filesystem path — while the raw config still names github.com). The declared URL is the identity claim; transport (ls-remote) still resolves rewrites exactly as git does.

Enumeration (the required answer): how many other "parse failure leads to a success branch" shapes existed in resolveRepoCheckouts? Two entry points, one shape, and zero after the fix:

  1. slugFromRemote returning null on an unparseable URL — the card's case; fell through to audited.
  2. probeCheckout's inner catch (no origin remote at all, or unreadable config) returning exists true, slug null — the same fall-through, second entry point. Both now refuse with distinct stated reasons (unparseable URL vs no origin remote).
  3. For completeness: a probe answering null/undefined coerces to exists false and always refused (safe direction, not a member of the class); slugFromRemote itself has no partial-success shape (full match or null).

After the fix the enumeration is zero by construction: audited is the single fall-through and requires a parsed, matching slug. Non-vacuity control: pure pins for both null-slug shapes, plus an end-to-end sweep over a real clone keeping its local-path origin — refused, where the base tree audited it (reproduced on base before the first edit).

#13424 — per-repo window resolution (commit "resolve every --since-ref in its own repo's checkout, never only in self")

resolveWindow now takes resolveRefDate(ref, repoId): a pin resolves in the repo it names, a bare ref across every governed checkout, oldest resolved date wins (unchanged conservative choice), and the hard failure survives only when no named ref resolves in ANY repo it names — with the per-repo semantics stated in the error text so the constraint is declared, not incidental. Checkout resolution moved ahead of window resolution so the resolver knows each repo's path (re-run in the re-exec'd child; a handful of local git reads, paid twice by design).

Enumeration (the required answer): which other places resolve multi-repo input in the self checkout only? After the fix, grep -n "git(selfRoot" over the file returns zero call sites. Reviewed each remaining selfRoot use: the self repo's own checkout path (single-repo input by definition), siblingDir derivation, and the --root flag. topologicalBaseIn was already per-repo (resolves in repo.path); --repo-root overrides are per-repo by construction; attribution is keyed by each entry's own repo slug. The window's fallback-date derivation was the only instance.

Non-vacuity: base-tree control reproduced before the first edit (--since-ref objectui=TIP exits 1 does not resolve to a commit while the ref resolves in objectui); after the fix the identical shape reports (combined run above), the self-test pins the pure semantics (sibling-only pin resolves; a self-only resolver control still errors; a pinned ref is asked ONLY of its own repo — call-recording pin), and an end-to-end fixture sweep pins the sibling-pin invocation at exit 0.

#13307 — sweep-code provenance (commit "print which sweep code ran, so a stale-script run is attributable")

Covered above. Constraints honoured: cloud stays in GOVERNED_REPOS (zone-1 ruling; the docblock still forbids dropping it); the maintainer question "is cloud still in platform scope" remains open and unanswered in code; no --unshallow or --shallow-since was run on any shared checkout (the reconstruction was a fresh transient clone, deleted after the run).

#13836 — precondition attribution + the flip root-caused (commit "attribute every unaudited row to the precondition that failed, and pin the shallow-clone path")

Root cause, by enumeration plus reproduction — and the card's first suspect is falsified. For a repo pinned topologically (its anchor resolving), the only preconditions evaluated per run that can change with ZERO local writes are the freshness leg's: the remote probe and the tip-identity comparison. The shallow-boundary-connectivity hypothesis is structurally unreachable in that mode: the #9902 horizon guard runs only where a DATE window is in force (the if (!base) branch), the anchor resolves from the object store (an upstream push moves neither), and enumeration reads the local graph. The flip is the freshness-by-identity leg failing closed on a busy remote — run 2's honest answer, in the safe direction (#4690), as often as the remote moves. Reproduced in --self-test on real fixtures: the same argv audits (exit 0, a true zero), the remote receives ONE push, the identical invocation refuses BEHIND — nothing local touched the mirror. (Which freshness sub-branch fired in the production run-2 — BEHIND vs a probe timeout — is exactly what its footer could not say; both now print attributably.)

The fix (triage's order): every unaudited row carries a machine-readable precondition category — no-checkout, unparseable-origin, wrong-origin, unreachable-remote, remote-tip-unreadable, local-tip-unreadable, stale-mirror, unprobeable-ref, history-horizon, ref-unreadable — printed on the row, per-repo in the INCOMPLETE footer and in the all-refused exit-1 message, and in --json. Two footers minutes apart now differ by a stated reason, never only by a slug list. (An unresolvable pin is deliberately NOT one of these: by the #12633 route-B ruling it falls back to the date window and the row says so via the fell-back note.)

Shallow-clone self-test (the defect only shows on shallow clones): real fixtures over the file transport with backdated seed commits — a depth-2 clone whose floor predates the window audits and names its floor; a depth-1 clone whose floor sits inside the window refuses with [history-horizon] named; and the flip reproduction above.

Verification

Generated by Claude Code


Generated by Claude Code

…tHub slug
An unparseable origin (filesystem path, SSH shorthand, no origin remote at
all) used to slip the wrong-origin guard — `if (seen.slug && ...)` — and
fall through to `status: 'audited'` under the governed name with no evidence
of identity. The checkout now refuses with a NOT MEASURED row naming the
declared origin and the remedy; `audited` is reachable only through a
parsed, matching slug. Identity is read from the RAW configured origin URL
(`git config --get remote.origin.url`), never `remote get-url`, which
applies insteadOf transport rewrites first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…only in self
The topological window's fallback-date derivation resolved every named
--since-ref in the self checkout (objectstack) only and errored hard when
none resolved there, so a sweep pinning only sibling-repo tips exited 1
`does not resolve to a commit` on refs that resolve perfectly in their own
repositories. resolveWindow now takes resolveRefDate(ref, repoId): an
<id>=<ref> pin resolves in that repo's own checkout, a bare ref in every
governed checkout, and the hard failure survives only where it is honest —
no named ref resolves in ANY repo it names. Checkout resolution moves ahead
of window resolution so the per-repo resolver knows each repo's path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…table
The reachability probe was never gated on --repo-root — it runs for every
resolved checkout in every window mode. The post-fix runs that still printed
the cloud false green quoted a row text ('if that tip predates your last
fetch...') that exists only in the pre-fix render: they executed a PRE-FIX
copy of this script from a stale tree, and nothing in the output said which
version ran. The sweep header now prints 'sweep code:' — the executing
tree's HEAD plus this file's own blob id, with a loud mismatch line when the
running bytes are not the copy HEAD records, and a stated UNKNOWN when the
reads fail. Attribution, not prevention: a stale tree prints a stale sha,
truthfully, and the reading becomes checkable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
…d, and pin the shallow-clone path
Two identical invocations minutes apart flipped objectui between audited
(12 entries) and unaudited (zero), and the footers differed only by a slug
list. Root cause by enumeration plus reproduction: for a topologically
pinned repo the only per-run preconditions that can change with zero local
writes are the freshness leg's — the shallow-boundary-connectivity
hypothesis is structurally unreachable in that mode (the horizon guard runs
only under a date window; the anchor resolves from the object store; the
enumeration reads the local graph). The flip is the freshness leg failing
closed on a busy remote — the safe direction — and what it owed was
attribution: every unaudited row now carries a machine-readable
precondition category, printed on the row, per-repo in the INCOMPLETE
footer and the all-refused failure, and in --json. Self-test adds the
shallow-clone path in both directions (deep-enough audits naming its
floor; floor-inside-window refuses, precondition named) and reproduces the
flip on real fixtures: the same argv audits, the remote takes one push, it
refuses BEHIND.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment