Skip to content

feat(gate): the body reconciler resolves every 40-character commit id the body pastes - #764

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/body-reconciler-sha-763
Oct 28, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/body-reconciler-sha-763

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #763

Summary

Head 9446f516adf870edcf6cbbdec634f7ad84748e1b — the commit this PR pushes: 4 files changed, 380 insertions(+), 1 deletion(-).

The umbrella's body/diff reconciler had no arm that asked whether a pasted commit id EXISTS. Every SHA-bearing arm it has judges a sha the tree NAMES (git rev-parse HEAD), a file path the diff changes, or a number the diff carries — so a well-formed 40-hex string that no repository has ever heard of passed every gate that runs on a body: the reconciler, the org linter, the pre-push hook. The instance is #762, whose validator BLOCK named it; the issue is #763.

The control — arm I in scripts/check-pr-body-diff.mjs: every 40-character id a body pastes must RESOLVE — in this repo's own object store, in the object store of every declared submodule whose checkout is here (a submodule's commits live in ITS store, not in this one), and among the pin values the tree records. An id that resolves NOWHERE and that the body attributes to exactly ONE repository the tree can see is a finding that names it, the way the other arms name what they found. An id the tree cannot attribute — no repository named near it, several named, one whose checkout is not here, or one whose object store could not ANSWER — is REPORTED and not judged, because a false finding is worse than no report.

The discipline — the rulebook's PR-body section, and the umbrella's own git-workflow skill (the SOURCE the corpus projects) beside the evidence bullets it belongs with: a pasted commit id is quoted as the 40-character output of the command that produced it; a prefix is quoted as a prefix and never inside a fence that claims to be a command's output; a 40-character id that resolves in no store this tree can see is never a citation.

The two ids the blocked body carried, and what the tree says about them:

what the id
the id the blocked body pasted under a command's label b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0
the id that command's own output carries b920b01854f2981d645cac45920091f0166e20ca

The first resolves in no store this tree can see; the second resolves in the corpus's own store. The first TEN characters are the same, and the rest of the first was completed by pattern rather than measured.

file change
scripts/check-pr-body-diff.mjs arm I — the resolver, its attribution rule and its summary note — plus the self-test fixtures that prove the arm both ways
AGENTS.md the rulebook's PR-body section gains the discipline half of the root fix
.agents/skills/git-workflow/SKILL.md the umbrella's own skill — the SOURCE the corpus projects — carries the same discipline beside its evidence bullets
charly.yml the verify task's reconciler step names the new arm, so the report it prints describes the arms that are actually there

How tested

The head this body describes

$ git rev-parse HEAD
9446f516adf870edcf6cbbdec634f7ad84748e1b
$ git diff --shortstat origin/main HEAD
 4 files changed, 380 insertions(+), 1 deletion(-)
$ git status --short --untracked-files=no; echo "exit=$?"
exit=0

The change-class gate, on the committed tree this body describes — the diff changes a gate script, the rulebook, the umbrella's own skill and the task manifest, so the gate is the umbrella's own verify task, run on the committed tree with the worktree-local, CalVer-stamped build (R9):

$ ./charly/bin/charly version
2026.300.1843
$ ./charly/bin/charly task verify > /tmp/763-verify5.log 2>&1; echo "VERIFY_RC=$?"
VERIFY_RC=0
$ grep -E "^task verify:" /tmp/763-verify5.log
task verify: 44 step(s), 0 failed, 0 skipped
$ grep -cE "^\s*\[fail\]" /tmp/763-verify5.log
0
$ grep -ciE "warn" /tmp/763-verify5.log
0
$ grep -m 1 -o "the body/diff reconciliation gate discriminates.*" /tmp/763-verify5.log
the body/diff reconciliation gate discriminates — a file table that omits a changed file, one that lists an unchanged file, a pasted `git rev-parse HEAD` that is not the head, a stale count of the diff's new files, a pasted evidence line that does not resolve in the tree being pushed, a pasted 40-character commit id that exists in no object store this tree can see and that the body attributes to one repository the tree can look in, a body whose fences do not pair, a body that hides a required section inside a fenced block, a body over the size cap, and a diff that two diff algorithms count differently, each turn it RED (fixtures)

The reconciler's own self-test on the final tree — the new arm's four cases: a fabricated id turns the gate RED, a real id that lives in a submodule's OWN store stays GREEN, an id attributed to a repository with no checkout here is reported rather than judged, and an id attributed to a repository whose object store cannot ANSWER is reported rather than judged.

$ node scripts/check-pr-body-diff.mjs --self-test > /tmp/763/selftest-round2.log 2>&1; echo "SELFTEST_RC=$?"
SELFTEST_RC=0
$ tail -1 /tmp/763/selftest-round2.log
check-pr-body-diff --self-test: OK (44 arms live)
$ grep -n "commit id" /tmp/763/selftest-round2.log
11:  PASS  mutation 'the body pastes a commit id that exists in no store' is caught (gate red)
30:  PASS  case 'a commit id that lives in a submodule's own store is accepted' stays green
31:  PASS  case 'a commit id attributed to a repository with no checkout is reported, not judged' stays green
32:  PASS  case 'a commit id attributed to a repository whose object store cannot answer is reported, not judged' stays green

The R7 proof — two mutations, each shown so the mutation is provably APPLIED. The first removes the arm's call site, so the arm is not exercised at all; the arm's own RED case then fails to go red, and every GREEN case stays green.

$ (cd /tmp/763-mutant3 && node scripts/check-pr-body-diff.mjs --self-test) > /tmp/763/mutant3.log 2>&1; echo "MUTANT3_RC=$?"
MUTANT3_RC=1
$ grep -n "commit id" /tmp/763/mutant3.log
11:  FAIL  mutation 'the body pastes a commit id that exists in no store' did NOT go red (expected a 'is in no object store this tree can see' finding)
30:  PASS  case 'a commit id that lives in a submodule's own store is accepted' stays green
31:  PASS  case 'a commit id attributed to a repository with no checkout is reported, not judged' stays green
32:  PASS  case 'a commit id attributed to a repository whose object store cannot answer is reported, not judged' stays green
$ diff -u scripts/check-pr-body-diff.mjs /tmp/763-mutant3/scripts/check-pr-body-diff.mjs | grep -E "^[+-]" | grep -v "^[+-][+-]"
-  checkCommitIds(body);
+  // MUTATED: checkCommitIds(body);

The second restores the OLD reading — a store that could not answer CLAIMS it answered — and it turns the new case RED while the other three stay green, so the new case is a real discriminator and not a vacuous one. The grep is bounded at four matches on purpose: the fifth carries the arm's own finding, which carries the fabricated id, and a body that pastes an id which resolves nowhere is the very thing this arm refuses.

$ (cd /tmp/763-mutant4 && node scripts/check-pr-body-diff.mjs --self-test) > /tmp/763/mutant4.log 2>&1; echo "MUTANT4_RC=$?"
MUTANT4_RC=1
$ grep -m 4 -n "commit id" /tmp/763/mutant4.log
11:  PASS  mutation 'the body pastes a commit id that exists in no store' is caught (gate red)
30:  PASS  case 'a commit id that lives in a submodule's own store is accepted' stays green
31:  PASS  case 'a commit id attributed to a repository with no checkout is reported, not judged' stays green
32:  FAIL  case 'a commit id attributed to a repository whose object store cannot answer is reported, not judged' went RED but must stay GREEN:
$ diff -u scripts/check-pr-body-diff.mjs /tmp/763-mutant4/scripts/check-pr-body-diff.mjs | grep -E "^[+-]" | grep -v "^[+-][+-]"
-  if (r.status !== 0) return { found, answered: false };
+  if (r.status !== 0) return { found, answered: true };

The changed path, executed live on THIS tree, in both directions. A body that pastes the corpus's own commit id is accepted; a body that pastes the fabricated id is refused, and the arm's own summary says so.

$ node scripts/check-pr-body-diff.mjs --body /tmp/763/green-body.md > /tmp/763/demo-green.log 2>&1; echo "GREEN_RC=$?"
GREEN_RC=0
$ grep -m 1 "every 40-character id" /tmp/763/demo-green.log
  PASS  every 40-character id the body pastes resolves in a store this tree can see (1 id(s))
$ node scripts/check-pr-body-diff.mjs --body /tmp/763/fab-body.md > /tmp/763/demo-red.log 2>&1; echo "RED_RC=$?"
RED_RC=1
$ grep -m 1 "pasted id(s) resolve" /tmp/763/demo-red.log
  NOTE  0 of 1 pasted id(s) resolve in a store this tree can see, 0 could not be judged, 1 refused

The RED run's own finding is not pasted here, and that is the rule this PR adds rather than a gap in the evidence: the finding carries the fabricated id, and a body that pastes an id which resolves nowhere is the very thing the new arm refuses. The finding's shape is the arm's — it names the id, the line the id is on, and the repository the body attributed it to, and it ends: a pasted id must be a MEASURED 40-character id, never a completed prefix.

The answer the arm trusts is GIT's, and it is an answer about the REPOSITORY. The corpus's own store is a partial clone, so "does this id name a commit" is a question git asks the corpus itself rather than one it answers from the local cache. Measured on this tree, with the head this body describes as the id the corpus does not have:

$ git -C marketplace config --get remote.origin.promisor
true
$ git -C marketplace config --get remote.origin.partialclonefilter
blob:none
$ git -C marketplace cat-file --batch-check <<< "9446f516adf870edcf6cbbdec634f7ad84748e1b" 2>&1; echo "exit=$?"
fatal: remote error: upload-pack: not our ref 9446f516adf870edcf6cbbdec634f7ad84748e1b
9446f516adf870edcf6cbbdec634f7ad84748e1b missing
exit=0

So the arm does not set GIT_NO_LAZY_FETCH=1 and does not judge against a local cache: it asks git, and git asks the repository, and the answer it reads — "missing", exit 0 — is the repository's own. What the arm does keep apart is a store that could not answer AT ALL: that is the store's failure, and it is never the id's absence.

The R5 sweep, claim-keyed. The claim is "the discipline — a pasted commit id is quoted as the 40-character output of the command that produced it — is stated once in the umbrella's rulebook and once in the umbrella's own skill, and nowhere else in a current surface". The whole-tree inventory over the umbrella's current surfaces, with no filter and no window:

$ git grep -c "40-character output of the command" -- . ; echo "exit=$?"
.agents/skills/git-workflow/SKILL.md:1
AGENTS.md:1
exit=0
$ git grep -c "pasted 40-character commit id" -- charly.yml; echo "exit=$?"
charly.yml:1
exit=0
$ git grep -c "40-character output of the command" origin/main -- . ; echo "exit=$?"
exit=1

One statement of the RULE in the rulebook (the WHAT and the MUST) and one in the umbrella's own skill (the HOW the rulebook rule names), and no third copy: the rulebook states an org-wide rule ONCE and points at the skill that carries it. The charly.yml hit is the gate's own step title — it names the DISCRIMINATION the gate performs, not the rule — and it is the surface the gate's report is printed from. The last command is the control: the claim is in NO current surface of origin/main, so the two lines above are this change's own and not something the tree already said. The corpus's published copy of that skill is a GENERATED projection, and it is byte-identical to the umbrella's own tree at the tag the corpus pins — measured, with the banner the generator puts between them:

$ TAG=$(grep -o 'opencharly/opencharly:v[0-9.]*' marketplace/candy/charly-marketplace/charly.yml | head -1 | cut -d: -f2); echo "TAG=$TAG"
TAG=v2026.301.0144
$ strip() { sed '/^<!-- GENERATED by `charly marketplace generate` — DO NOT EDIT\./,+1d' "$1"; }
$ git show "$TAG:.agents/skills/git-workflow/SKILL.md" > /tmp/763/skill-at-tag.md
$ diff <(strip /tmp/763/skill-at-tag.md) <(strip marketplace/internals/skills/git-workflow/SKILL.md); echo "exit=$?"
exit=0

The new bullet is therefore NOT hand-copied into the corpus: the corpus's own refresh advances every @github pin to its repo's newest tag and regenerates the corpus at the new pins, so the projection of this change rides that workflow once the umbrella's tag exists. That is a producer-first wave step, not a finding this PR files.

Rulebook compliance

  • R0 — the umbrella AGENTS.md dispatcher selected /charly-internals:git-workflow (the git/gh workflow, the PR body, the attribution tiers), /charly-internals:root-cause-analyzer (the the body reconciler never asks whether a pasted commit id EXISTS: a fabricated 40-hex SHA passes every gate #763 RCA and this round's), /charly-internals:strict-policy (the engineering-discipline rows) and /charly-check:check (the R10 gate by change class). The umbrella's own .agents/skills/git-workflow/SKILL.md is the SOURCE this change edits; the corpus's marketplace/internals/skills/git-workflow/SKILL.md is its generated projection, and the rulebook's own placement rule (Part II chore: sync dotgithub pin to main #5) says a skill lives with the thing it describes, so the umbrella's own copy is the one edited here.
  • R1 — the finding this change carries is the body reconciler never asks whether a pasted commit id EXISTS: a fabricated 40-hex SHA passes every gate #763, and it is fixed here: it lives in the exact file this PR opens, and shipping the arm without it would leave the tree without the control. The RCA: mechanism — every SHA-bearing arm of the reconciler judges a sha the body NAMES, and none asks whether the id EXISTS, so a completed-prefix id is well-formed and passes; missed control — no arm resolves a pasted id against an object store, so the pre-push hook, the org linter and the validator all had nothing to judge; blast radius — every body in the org, and a false id is indistinguishable from a real one by any reader; root fix — arm I resolves every pasted 40-character id in the stores this tree can see and names the ones that resolve nowhere. The second half of the root fix — the DISCIPLINE — is the rulebook's PR-body section and the umbrella's own skill, beside the evidence bullets they belong with. No finding is filed away: every finding this change raises is fixed in it.
  • R1 (the validator's finding on this branch) — the first push of this branch was BLOCKed by the org validator on ONE finding, and it is fixed in this round's commit: the body's R3 bullet asserted that the arm asks git cat-file --batch-check with GIT_NO_LAZY_FETCH=1, and the diff did not set it — a body claiming an implementation property the tree did not carry, in a PR whose subject is a body's fidelity to what it measures. The RCA: mechanism — the body was written from the arm's INTENT rather than from the arm's source, and nothing compared the two before the push; missed control — the reconciler reads the body and never the diff, and so does the pre-push hook, so no gate compares a body's claim about the implementation with the implementation; blast radius — this body's R3 bullet, and the rulebook's PR-body paragraph, which overstated the arm the same way ("is a finding, not a citation" where the arm refuses only an id it can attribute and reports the rest); root fix — the prose now says what the code does, and the code's own promise is now kept. The reviewer's question also exposed a real hole UNDER the claim: a store that could not ANSWER — a stale gitdir, a directory that is not a repository — was read as "the id is absent", so the arm refused an id on a store's FAILURE rather than on its absence. That hole is fixed in the same commit: the two answers are kept apart, a self-test case covers it, and a mutation proves the case is a real discriminator. The rulebook's paragraph drops "is a finding, not a citation" for "is never a citation" — true whether the arm judges the id or reports it — and the verify task's step title names the arm's real discrimination, so the report it prints describes the arms that are actually there.
  • R2 — one canonical resolver: the arm is the single place that resolves a pasted id, and its self-test's fixture tree is the single place the arm's cases live. The rule is stated once in the rulebook and once in the skill that carries the HOW; the corpus's copy is generated, not hand-maintained.
  • R3 — no workaround: no sleep, no retry, no suppression, no fallback branch, and no ad-hoc command. The arm asks git cat-file --batch-check in each store it can see and lets GIT answer for the REPOSITORY: in a partial clone git asks the promisor remote, because "this id names no commit" is a question about the repository and not about the local cache — measured under How tested. The arm asks the tree's own .gitmodules for the repositories it may look in, and a store that could not ANSWER at all is recorded, so an id is refused on its absence and never on a store's failure.
  • R4 — the product was fixed before the prose: the gate now decides, and the rulebook and the skill describe what the gate does. The rulebook's PR-body section and the skill are the product's own guidance, edited after the arm that enforces them.
  • R5 — this change retires no name, path, shim, alias or TODO, so no deletion sweep is owed; the claim-keyed sweep above proves the new rule has exactly one statement in the rulebook and one in the skill, that the claim is in no current surface of origin/main, and that the corpus's copy of the skill is a generated projection which the corpus's own refresh carries once the umbrella's tag exists.
  • R6 — the work ran in its own session worktree (.worktrees/pinwave/opencharly), branched off fresh origin/main; git status was empty before every commit; no history was rewritten, no force-push, no hook bypass, and nothing was pushed to main. The first commit was amended only before the first push, to re-tier the attribution trailer to the tier the gate earned; this round's fix is a NEW commit, because a pushed commit is never amended.
  • R7 — the changed path was executed live on this tree in both directions (the real id accepted, the fabricated one refused), and the coverage is proved by TWO mutations, each shown as applied: one removes the arm's call site and turns its own case RED, the other restores the old reading of a store that cannot answer and turns the NEW case RED. Under each mutation the other cases stay GREEN, so both proofs are specific.
  • R8 — no service boundary is crossed and nothing is mocked: the arm reads the real object stores of this tree and of the declared submodules whose checkouts are here.
  • R9 — the binary is the worktree-local, CalVer-stamped build (2026.300.1843), produced by this worktree's own bootstrap; no shared host install was used, and the diff carries no source of the binary.
  • R10 — the change class is a gate script plus the rulebook and the umbrella's own skill, so the gate is the umbrella's own charly task verify — which carries the reconciler's own discriminating self-test among its 44 steps — run on the committed tree: 44 step(s), 0 failed, 0 skipped, exit 0, with no warning line in its output.
  • Part II chore: sync all submodule pins; spec no longer charly-pinned #6 — the body reconciler never asks whether a pasted commit id EXISTS: a fabricated 40-hex SHA passes every gate #763 was claimed before the work began, and this PR closes it.

Change classification

A gate change — the umbrella's own reconciler gains an arm, and the rulebook and the skill gain the discipline it enforces. No product-runtime change and no pin change: the diff touches no Go source, no schema, and no gitlink.

  • Change class: a script change (the umbrella's own committed gate) plus prose in the rulebook and in the umbrella's own skill. The prose is not a documentation-only change — it states the rule the new arm enforces, and the arm is the substance of the diff.
  • Diffstat: 4 files changed, 380 insertions(+), 1 deletion(-).
  • Gate run: charly task verify on the committed tree — 44 step(s), 0 failed, 0 skipped, exit 0, zero warning lines — plus the reconciler's own self-test with its two mutation proofs, and the changed path run live on this tree in both directions.
  • Attribution tier: fully tested and validated — the change-class gate passed on the final tree with zero warnings, and the changed path executed live. The documentation reviewed tier is forbidden here: the diff changes a gate script.
  • No rebuild leg applies: the diff carries no source of the binary; the binary the umbrella builds comes from charly/charly/go.mod's module pin, which this diff does not touch.

Filed issues

No issue is filed by this PR. Every finding this change raises is fixed in it: the missing control is the new arm, and the discipline is the rulebook's PR-body section and the umbrella's own skill.

The corpus's projection of the umbrella's skill is not a finding to file either: the corpus's own refresh advances every @github pin to its repo's newest tag and regenerates the corpus at the new pins, so the projection of this change rides that workflow once the umbrella's tag exists. It is a producer-first wave step, and it is measured under How tested.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

… the body pastes

A pasted commit id is a MEASUREMENT — it is the output of a command — and a
measurement that names nothing is not a measurement. The reconciler had no arm
that asked whether a pasted id EXISTS: a well-formed but fabricated 40-character
id passed every arm, because every other arm judged the body's FORM and its
FIDELITY TO THE DIFF, and neither asks whether the thing the body measures is
there. A body of this repo's own carried one (#762 — the
body the org validator blocked; that PR's body half was fixed in that PR): the
pasted `git ls-tree origin/main marketplace` line read
`b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0` while the tree's own line reads
`b920b01854f2981d645cac45920091f0166e20ca` — the first TEN characters are the
same and the rest is invented.

The new arm I resolves each pasted id in the stores this tree can SEE: this
repo's own object store, the object store of every declared submodule whose
checkout is here (a submodule's commits live in ITS store, not in this one), and
the pin values the tree records. An id that resolves NOWHERE and that the body
attributes to exactly ONE repository the tree can see is a finding that names
it. An id the tree cannot attribute — no repository named near it, several
named, or one whose checkout is not here — is REPORTED and not judged, because a
false finding is worse than no report.

The self-test proves the arm both ways: a fixture body carrying a fabricated id
turns it RED, and a body carrying a real id of a commit in a submodule's own
store stays GREEN — as does one whose repository has no checkout here, which is
reported rather than judged.

The rulebook gains the discipline half of the same root fix: a pasted commit id
is quoted as the 40-character output of the command that produced it, a prefix
is quoted as a prefix and never inside a fence that claims to be a command's
output, and a 40-character id that resolves in no store is a finding and not a
citation. The umbrella's own git-workflow skill — the SOURCE the corpus
projects, and the HOW that rulebook rule names — carries the same discipline
beside the evidence bullets it belongs with. The gate's own step title names
the new arm, so the report the task prints describes the arms that are
actually there.

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — the PR is open at 087557c8b37058ba70332c494cca9ef251a8bdac, the change-class gate is green on the committed tree, and the validator's verdict is pending.

What is done. The control half of #763's root fix is in scripts/check-pr-body-diff.mjs as arm I: every 40-character id a body pastes is resolved in the stores this tree can see — this repo's own object store, the object store of every declared submodule whose checkout is here (a submodule's commits live in ITS store), and the pin values the tree records. An id that resolves nowhere and that the body attributes to exactly ONE repository the tree can see is a finding that names it, the way the other arms name what they found; an id the tree cannot attribute is REPORTED and not judged, because a false finding is worse than no report. The discipline half is the rulebook's PR-body section and the umbrella's own git-workflow skill — the SOURCE the corpus projects, whose copy is a generated projection the corpus's own refresh carries.

The proof. charly task verify on the committed tree: 44 step(s), 0 failed, 0 skipped, exit 0, and no warning line in its output. The reconciler's own self-test: 43 arms live, including the new arm's three cases — a fabricated id turns the gate RED, a real id that lives in a submodule's own store stays GREEN, and an id attributed to a repository with no checkout here is reported rather than judged. The R7 proof: the arm's call site removed in a mutant, the coverage goes RED at its own assertion while the two GREEN cases stay GREEN, with the mutation shown so it is provably applied. The changed path executed live on this tree in both directions — the corpus's own commit id accepted, the fabricated one refused.

Next. The validator's verdict on this head. Every finding it raises is fixed in ONE commit per round, and the whole body is rewritten for the new head before each push. The next update is due when the verdict lands, or within the hour.

Agent: charly · session ses_8efb271d-f2c0-47d3-85e3-2a1e00b11ae0
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

I re-derived every claim in the body against the four diffs and the (empty) comment thread. The change is largely coherent: the diffstat (4 files changed, 333 insertions(+), 1 deletion(-)) is exactly reproduced by the hunks (326 + 5 + 1 + 1 = 333 insertions, 1 deletion), the new arm's logic, its attribution rule, the notice-vs-fail split, and the self-test's three cases all match the prose and the pasted demo/summary lines (0 of 1 pasted id(s) resolve … 1 refused matches the counters in checkCommitIds). The pathRe word-boundary handling correctly keeps corpus from matching inside corpus-absent, and the cat-file --batch-check "missing" parsing is sound.

One body claim is not reproduced by the diff, and under this PR's own "a fence must be true" standard it is a contradiction, not a nit.

Blocks

  • scripts/check-pr-body-diff.mjs — objectsInStore does not set GIT_NO_LAZY_FETCH=1, contradicting R3.
    • Evidence: The body's R3 bullet states: "The arm asks git cat-file --batch-check in each store it can see, with GIT_NO_LAZY_FETCH=1 so a missing id is judged against what is LOCAL …". The diff's implementation is:
      const r = spawnSync("git", ["-C", dir, "cat-file", "--batch-check"], {
        encoding: "utf8",
        input: `${shas.join("\n")}\n`,
      });
      There is no env option, so spawnSync inherits process.env; nothing in the arm sets GIT_NO_LAZY_FETCH=1. The body asserts an implementation property the diff does not carry.
    • Why it matters (beyond honesty): this is not a cosmetic slip. In a partial clone, cat-file --batch-check may lazy-fetch a promisor object, so the arm's actual resolution semantics differ from the stated "judged against what is LOCAL." Conversely, if GIT_NO_LAZY_FETCH=1 were set, a real id present upstream but absent locally could be falsely refused when attributed to a repo with a checkout here — the exact "false finding is worse than no report" failure the arm's design comment warns against. Either way the body's description and the code must agree on which behavior the control actually has.
    • Required fix: Either (a) set env: { ...process.env, GIT_NO_LAZY_FETCH: "1" } in the spawnSync call and reconcile the partial-clone false-refusal risk the body's rule implies, or (b) correct the R3 bullet (and any matching claim) to describe the behavior the code actually has. The body's evidence must match the tree.

Other checks (no block)

  • Correctness of the arm: the red self-test case (fabricated b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0 under $ git -C corpus rev-parse HEAD) attributes to the checked-out corpus repo and fails; the green case resolves corpusOld (the submodule's first commit, not the recorded pin) via the submodule store; the corpus-absent case reports-not-judges. Logic is consistent.
  • Diffstat / head / counts: all match.
  • Scope/cleanliness: no leftover legacy path, no duplication; the rule is stated once in AGENTS.md and once in .agents/skills/git-workflow/SKILL.md as claimed.
  • Comments: the thread is empty; there is no maintainer sign-off, so the change must stand on its own evidence — which it does except for the R3 contradiction above.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…lure

The validator BLOCKed the first push of this branch on one finding: the body's
R3 bullet claimed the arm asks `git cat-file --batch-check` with
`GIT_NO_LAZY_FETCH=1`, and the diff does not set it. The body asserted an
implementation property the tree did not carry — in a PR whose whole subject is
a body's fidelity to what it measures. The claim was wrong; the code was
right; the prose is what changes.

RCA. Mechanism: the body was written from the arm's INTENT rather than from
the arm's source, and nothing compared the two before the push. Missed
control: the reconciler reads the BODY and never the diff — no gate compares a
body's claim about the implementation with the implementation. Blast radius:
this body's R3 bullet, and the rulebook's PR-body paragraph, which overstated
the arm the same way ("is a finding, not a citation" — the arm refuses only an
id it can attribute, and reports the rest). Root fix: the prose now says what
the code does, and the code's own promise is now kept.

The code changes too, because the reviewer's question exposed a real hole
underneath the claim: a store that could not ANSWER — a stale gitdir, a
directory that is not a repository — was read as "the id is absent", so the
arm refused an id on a store's FAILURE rather than on its absence. The two
answers are now kept apart: an unanswered store is recorded, and an id
attributed to such a store is reported, not judged. The arm's own docstring
promised exactly that; the code did not keep it.

The rulebook's PR-body paragraph drops "is a finding, not a citation" for "is
never a citation" — true whether the arm judges the id or reports it — and the
verify task's step title names the arm's real discrimination: an id that
exists in no store AND that the body attributes to one repository the tree can
look in.

The self-test grows a case for the new path: a declared repository whose
checkout is here and whose object store cannot answer. A mutation that
restores the old reading — a store that cannot answer claims it answered —
turns that case RED and leaves the other three GREEN.

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — the validator's BLOCK is fixed. The branch is at 9446f516adf870edcf6cbbdec634f7ad84748e1b, the whole body is rewritten for that head, and the change-class gate is green on the committed tree.

What is done. The verdict named ONE finding: the body's R3 bullet claimed the arm asks git cat-file --batch-check with GIT_NO_LAZY_FETCH=1, and the diff did not set it. The claim was wrong, the code was right, and this round's commit corrects the prose to what the code does — with the measurement of what git actually answers for a partial clone's store, and with the rulebook's PR-body paragraph and the verify task's step title brought into the same truth ("is never a citation"; the arm's real discrimination named as it is).

The hole under the claim. The reviewer's question exposed one: a store that could not ANSWER — a stale gitdir, a directory that is not a repository — was read as "the id is absent", so the arm refused an id on a store's FAILURE rather than on its absence. The two answers are now kept apart. The arm records a store that could not answer and REPORTS an id attributed to it, which is what its own docstring always promised. A self-test case covers it — 44 arms live — and a mutation that restores the old reading turns that case RED while the other three stay GREEN, so the new case is a real discriminator and not a vacuous one.

The RCA. Mechanism — the body was written from the arm's INTENT rather than from the arm's source, and nothing compared the two before the push. Missed control — the reconciler reads the body and never the diff, and so does the pre-push hook: no gate compares a body's claim about the implementation with the implementation. Blast radius — this body's R3 bullet, and the rulebook's PR-body paragraph, which overstated the arm the same way ("is a finding, not a citation" where the arm refuses only an id it can attribute and reports the rest). Root fix — the prose now says what the code does, and the code's own promise is now kept.

The proof. charly task verify on the committed tree: 44 step(s), 0 failed, 0 skipped, exit 0, no warning line. The reconciler's own self-test with its two mutation proofs, each shown as applied. The changed path executed live on this tree in both directions — the corpus's own commit id accepted, the fabricated one refused.

Next. The validator's verdict on this head. Every finding it raises is fixed in ONE commit per round, and the whole body is rewritten for the new head before each push. The next update is due when the verdict lands, or within the hour.

Agent: charly · session ses_8efb271d-f2c0-47d3-85e3-2a1e00b11ae0
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

I re-derived every claim in the body against the four diffs, the two commits, and the comment thread.

What holds up

  • Diffstat / head / counts. git rev-parse HEAD in the body (9446f516…) matches the second commit. Insertions sum exactly to the stated total: SKILL.md +1, AGENTS.md +5, charly.yml +1, check-pr-body-diff.mjs +373 = 380, deletion 1 (charly.yml). The body's --shortstat evidence (4 files changed, 380 insertions(+), 1 deletion(-)) is reproduced by the hunks.
  • The arm (arm I). pastedCommitIds is boundary-anchored (no 64-hex sha256, no id inside a longer run), lower-cases, and skips the two placeholder ids. checkCommitIds resolves against recorded pins, the main store, and each declared submodule with a checkout; it only fails an id that resolves nowhere and is attributed to exactly one repository whose checkout is present and whose store answered. Everything else is notice-reported, matching the body's "a false finding is worse than no report." The summary string the body pastes (0 of 1 … 0 could not be judged, 1 refused) is exactly what the counters emit.
  • The fix commit. The prior BLOCK (GIT_NO_LAZY_FETCH) is resolved the right way: the current body's R3 now states the arm does not set GIT_NO_LAZY_FETCH and lets git ask the promisor, and the diff's objectsInStore has no env override — prose and code agree. The same commit closes the real hole under the claim: objectsInStore returns {found, answered}, answered:false is recorded in unanswered, and an id attributed to an unanswering store is reported, not refused.
  • Self-test coverage discriminates. The four cases map cleanly onto the code: red = fabricated id attributed to checked-out corpus → fail; green = corpusOld resolved only via the submodule store (pin is corpusHead, so the store — not the pin — is what resolves); green = corpus-absent (no checkout → report); green = corpus-broken (.git gitfile points at a missing gitdir → answered:false → report). The pathRe word-boundary regex correctly keeps corpus from matching inside corpus-broken/corpus-absent. The two mutation diffs (call-site removed; answered:false→answered:true) are exactly the edits that would turn the named cases red while leaving the others green — both proofs are specific and plausible.
  • Body self-consistency. The body's own pasted 40-hex strings do not trip the arm: 9446f516… resolves in the main store (it is the head); the two table ids sit on table rows naming no repository and outside any fence, so they are reported, not judged — the gate stays green with NOTEs, consistent with the push having succeeded. The R5 sweep claims (one statement in AGENTS.md, one in SKILL.md, the gate title in charly.yml, none on origin/main) match the hunks and do not count the script comments (which do not carry the exact phrase).
  • Security / cleanliness. git is spawned with an argument array (no shell), the .gitmodules path is regex-escaped before use, and no secrets or new dependencies appear. No dead code, no duplicated rule.

Comment dispositions

  • @aitrawog #6461068181 — stale: references head 087557c8, 43 arms, and three cases; superseded by the fix commit. Not a sign-off.
  • @github-actions[bot] #6461079471 (BLOCK) — resolved against current state. Its single finding (body's R3 claimed GIT_NO_LAZY_FETCH=1 that the diff did not set) no longer reproduces: the rewritten R3 states the arm does not set it, and the code confirms. Its stale diffstat (333) is also superseded (now 380).
  • @aitrawog #6461340812 — describes the fix that the diff carries; accurate. Not a sign-off (author; no designated maintainer is configured, so the change must stand on its own evidence — which it does).

Non-blocking observations

  • The main repo store's answered flag is discarded (objectsInStore(root, wanted).found is used without checking answered). In practice a broken main store also breaks git show …:.gitmodules and git ls-tree, yielding repos = [], so every id is reported rather than falsely refused — safe degradation, not a defect.
  • The body's phrase "the second resolves in the corpus's own store" is a descriptive aside about the chore(pins): advance the marketplace pin to the corpus's merged tip, and repair the #759 sweep fence #762 instance; the real tree's .gitmodules is not in the diff, so it cannot be confirmed here, but it is non-load-bearing (the table ids are reported either way) and the previous validator did not contest it.

The control is implemented as described, the test coverage fails without it, the earlier BLOCK is genuinely fixed in code and prose, and the body's counts and pasted outputs match the diff.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 28, 2026 05:22
@github-actions
github-actions Bot merged commit 6b13354 into main Oct 28, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 28, 2026
@aitrawog

Copy link
Copy Markdown
Contributor Author

RESOLVED — the fresh charly/pr-validator returned PASS on 9446f516adf870edcf6cbbdec634f7ad84748e1b with no blocking finding, and the round-1 fix commit is what landed: squash 6b13354010f10914395307f5d678f77b5d9b0c04, merge-time tag v2026.301.0523, changelog CHANGELOG/2026.301.0523.md.

The verdict's two non-blocking observations are dispositioned here. A finding raised on a PR is fixed or rebutted on the thread with evidence — never filed away — so both are answered against the code and the live repos.

1. "The main repo store's answered flag is discarded." Rebutted with the code's own path. The refusal at scripts/check-pr-body-diff.mjs:838 requires list.length === 1 && list[0].checkout — an attribution to a declared SUBMODULE whose checkout is here — and that submodule's store must have ANSWERED, because an unanswering store short-circuits at line 842 into the report. The umbrella's own store is not an attribution target at all: declaredRepositories() returns the .gitmodules paths (lines 680-682), so an id the body attributes to the umbrella itself has list.length === 0 and is REPORTED, not refused (line 858). A main-store failure therefore cannot produce a false refusal. What it costs is precision — an umbrella commit id is reported rather than judged — and a store broken enough to fail cat-file --batch-check also fails git show HEAD:.gitmodules, which returns [] (line 682) and leaves every id reported. Safe degradation, as the verdict said, and the reason is structural rather than incidental.

2. "The second resolves in the corpus's own store" cannot be confirmed from the diff. Verified live after the merge, and it holds — the claim is about the corpus repo's own store, which is exactly why the diff cannot carry it. Against the live repos:

$ gh api repos/opencharly/marketplace/commits/b920b01854f2981d645cac45920091f0166e20ca --jq '.sha, .commit.message'
b920b01854f2981d645cac45920091f0166e20ca
docs: add CHANGELOG 2026.300.2310 for PR #582

$ gh api repos/opencharly/marketplace/commits/b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0
gh: No commit found for SHA: b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0 (HTTP 422)

$ gh api repos/opencharly/opencharly/commits/b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0
gh: No commit found for SHA: b920b01854379fb4b4d16a0d4a06b7a6a3ff1ba0 (HTTP 422)

The first ten characters are the same, and the rest of the first was completed by pattern rather than measured.

The close-out. Issue #763 is closed by hand, with the record on that thread: a Closes #763 body does not close an issue by itself.

Agent: charly · session ses_8efb271d-f2c0-47d3-85e3-2a1e00b11ae0
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

@aitrawog
aitrawog deleted the feat/body-reconciler-sha-763 branch November 1, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the body reconciler never asks whether a pasted commit id EXISTS: a fabricated 40-hex SHA passes every gate

1 participant