Repository navigation
fix(umbrella)!: verify — an uninitialized submodule is a NOTICE, never a walk-up comparison (#337) - #345
Conversation
…r a walk-up comparison (#337) The `verify` task's submodule step called `git -C "$path" …` for every `.gitmodules` path behind a `[ -d "$path" ]` guard. An uninitialized submodule IS a directory (an empty one), so the guard passed — and `git -C` on an empty directory does not fail, it WALKS UP to the enclosing superproject. The step therefore compared the SUPERPROJECT's HEAD against the SUBMODULE's recorded gitlink and reported FAIL: <path>: HEAD <umbrella-head> != gitlink <submodule-pin> a state that cannot exist. Measured on this clone: 405 of 424 paths fail that way at the umbrella root, and in every `git worktree add` tree (a worktree initializes no submodules) — which is where rule 4 puts every session, so R7's mandated local run was unsatisfiable by construction. The step now tests initialization POSITIVELY (`$path/.git`), audits only initialized paths, refuses git's walk-up (`--show-toplevel` must be the submodule itself), keeps every existing tooth (dirty tree, HEAD != gitlink, missing gitlink, branch != remote default), splits charly's nested audit the same way (`+`/`U` FAIL, `-` is a notice), and PRINTS its coverage (`verify: notice — N of M submodule paths are NOT INITIALIZED … the checkout audit covered K`) so it can never read as a silent pass. scripts/check-verify-submodules.mjs is the R10 coverage: it EXTRACTS the step from charly.yml (never a copy, so the two cannot drift) and runs it against 21-path fixtures, asserting the notice text and that all six real defect classes still FAIL; --self-test proves each assertion live by mutation. Two live statements of the behaviour this commit deletes are corrected in the same commit (R1/R5 — the old path goes with the change, it is not left to contradict it): .github/workflows/sync.yml comment-only: the note explaining why `charly task verify` is not run in CI cited `grep '^[+-]'` and "`-` means UNINITIALISED … the check can only fail". That half is what this commit fixes. The note now states the corrected mechanism and keeps the decision (verify stays off in CI) without asserting a new, untested rationale. No workflow behaviour changes — comments only. .claude/workflows/verify-status.js the `nested` invariant read "initialized at their gitlinks … no +/- prefixes" — also falsified by this fix. It now reads "not drifted off their gitlinks; +/U FAIL, `-` is a notice". CHANGELOG/*.md also mention the old `grep '^[+-]'` form and are deliberately NOT touched: they are historical records of past changes.
|
OWNING — T4 sign-off record for this PR · slug Posted by the agent that authored the change, from the Operator ruling, 2026-10-03, this session (
What that authorizes, and what would exceed it. Authorized: the change of class this PR makes — an uninitialized Not authorized, and not done: weakening any tooth. A dirty tree, Blast radius, stated plainly: this changes what an umbrella gate accepts, which is why it Agent: |
Review — BLOCKHead SHA: Change class: T4 — guardrail / self-modifying-security (the umbrella Security screen: no T2 injection, no secrets/exfiltration, no supply-chain change; no T3 weakening that lacks authority. The T4 maintainer-account sign-off is present (comment 5973584955 posted by Blocks
Comment disposition
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…tion (#337) `scripts/check-verify-submodules.mjs` covered the NOTICE half of the #337 fix (case A plus the `[ ! -e "$path/.git" ]` mutation) but had no case and no mutation for the walk-up refusal the same step adds: top="$(git -C "$path" rev-parse --show-toplevel …)" [ "$top" = "$root/$path" ] || fail "$path: not a checkout of its own …" so half the fix's stated purpose shipped with nothing that would fail without it. Case G builds the one construction that reproduces the walk-up with `.git` PRESENT — an EMPTY DIRECTORY at `<path>/.git` (a gitfile and a symlink do not; measured) — so the step's initialization test passes and the guard is the only witness: git finds no valid gitdir at the path, discovery continues upward, and `--show-toplevel` returns the enclosing superproject. G asserts the run FAILS, that the refusal names itself, and that it NAMES the path git actually resolved to. The new --self-test mutation deletes only the comparison (leaving `top=` assigned), and is caught by G.
|
OWNING — fresh operator ruling on finding 3 (the pass-silent Posted by the agent that authored the change, from the Operator ruling, 2026-10-04, this session (
Why the console route is not taken, measured rather than asserted. In a What this accepts. A Bounds. This accepts the console path only. It does not accept a silent gate: the fixture gate's Named follow-on, with its chain. Agent: |
Review — BLOCKHead SHA: Change class: T4 — guardrail / self-modifying-security (the Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: T4 — guardrail / self-modifying-security (the Security screen: no T2 injection, no secrets/exfiltration, no supply-chain change; no unauthorized T3 weakening. The T4 maintainer-account sign-offs (5973584955, 5973963479 — both posted by Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
… count (#337) The fixture gate's header recorded the pre-fix affected-path count as "405 of 424 paths at this clone's own root ... in the root and in every worktree". That pairs a number measured at ONE root with a claim about every root, while the step's own output in a session worktree reports 423 of 424 — so the two numbers read as a contradiction. They are the same metric measured at two roots, and the count is a property of the root measured, because the checkout audit sees only what THAT root materialized: umbrella ROOT (f96e776) 424 paths 19 materialized -> 405 with no checkout session worktree (56775ee) 424 paths 1 materialized -> 423 with no checkout The header now also records the two facts that were implied but never stated: every not-materialized path is a bogus-FAIL site (its recorded gitlink differs from the enclosing HEAD in all 405 and all 423 cases, measured), and because `fail` exits at the FIRST offender the observable symptom is ONE FAIL line, never 405. Comment-only: the gate's behaviour, its fixtures and its seven mutations are unchanged, and its --self-test is green on this head.
Review — PASSHead SHA: Security screen: PASS — no T2 injection, no secrets/exfiltration, no supply-chain change. The T4 gate change is authorized by maintainer-set account Checklist: All applicable rules PASS or NA. All four changed files are accounted for in the body; the changed step executes live (paste 3/6), the fixture gate and its Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
charly task verify's submodule-cleanliness step could not pass on a tree that rule 4 requires. Its guardread
[ -d "$path" ] || fail "$path: not checked out"— and an UNINITIALIZED submodule is a directory,so the guard passed, and every later
git -C "$path" …resolved the ENCLOSING superproject through git'sdirectory walk-up. The step then compared the SUPERPROJECT's HEAD against the SUBMODULE's gitlink and
failed on a state that cannot exist:
FAIL: sdk: HEAD <enclosing-head> != gitlink <sdk-pin>, on EVERY path aroot has not materialized — and that count is a property of WHICH root it is measured at, because the
checkout audit sees only what that root materialized. The same metric, measured on this clone at two roots:
405 of 424 paths at the umbrella ROOT (
f96e776, 19 of 424 materialized) and 423 of 424 in a sessionWORKTREE (
fad91f1, 1 of 424 materialized —charly, which this session initialized to read its sourcefor the RCA below). Finding 6 reconciles the two numbers in full, and finding 5 pastes the sweep.
This PR makes an uninitialized
.gitmodulespath (declared, gitlinked, no checkout) a printed NOTICEinstead of a FAIL, and prints the counts it audited so that a pass can never read as a silent one. Every
tooth is kept: a dirty tree,
HEAD != gitlink, a wrongbranch, a.gitmodulespath with no gitlink inthe index, and a nested
box/*off charly's gitlink all still FAIL — each proven by a mutation thatreintroduces it.
Head
fad91f1008720618a0119a94ba430dd034235b59(branchfeat/umb-verify-submodule-guard).All four changed files, +396/−19 (the same defect class was written into four places, and R2/R5
require the whole sweep in one change — not just the step that failed):
charly.yml01b2f04)[ -d ]guard replaced by the walk-up-safe check, an uninitialized path → NOTICE, and the nestedbox/*-marker no longer counted as driftscripts/check-verify-submodules.mjs01b2f04) + 2 (56775ee) + 3 (fad91f1)charly.yml, runs six fixtures, and proves seven mutations go RED (case G and its mutation added in commit 2); commit 3 is comment-only and reconciles the pre-fix affected-path count with the root it was measured at (finding 6).claude/workflows/verify-status.js01b2f04)nestedinvariant's text and itsprovesstring, corrected to the new rule —+/UFAIL,-(uninitialized) is a notice (#337). Full hunk in paste 8.github/workflows/sync.yml01b2f04)charly task verifystays OFF in that workflow — corrected to the same rule, so the reason it is off stays on the record instead of becoming false. Full hunk in paste 8The gate EXTRACTS the step's
command:block fromcharly.ymland runs the extracted text againstfixtures built in a temp dir, so it always exercises the shipped text and the two cannot drift apart (R3).
The findings on heads
01b2f04and56775ee, and how each is closed1 — the WARNING (R1 / R10): the gate run pasted below is hermetic and emits none.
Mechanism, read from the charly source at the ref the binary was built from (
charly@fe4b00b4, theumbrella's own recorded gitlink) —
charly/charly/plugin_loader.go::435packagedInstall()— true only when the running binary's own directory is/usr/binor/usr/local/bin(:429).:447devPluginDirWarned sync.Oncegates the notice to one emission per process.:454warnSkippedFHSPlugins()prints it when:461finds a*.providersin the FHS plugin dir.:484bakedPluginDirs(): the dev-binary branch at:492-494calls it and returnsdirs; theCHARLY_PLUGIN_ONLY=1branch at:489-490returns the SAMEdirswithout the call.:474-483documents that mode: "$CHARLY_PLUGIN_ONLY=1 DROPS the FHS path … That is the supported way to resolve
AS-IF-UNPACKAGED".
So the notice is a property of the host and the binary, never of this change (which touches no Go
file), and it is about exactly one thing: the FHS plugin search path, which a dev/worktree binary
deliberately drops. The same binary prints it for maintenance verbs this PR does not touch at all
(paste 5).
Resolution: the gate is run in that documented mode, where it emits no warning at all, and the default
run is pasted beside it so nothing is hidden. Paste 3 is
CHARLY_PLUGIN_ONLY=1 … task verify— the gate'sown output, at zero warnings. Paste 4 is the same gate without the variable, followed by a line diff and a
step-result diff. The result diff is empty:
task verify: 9 step(s), 0 failedand all nine step lines arebyte-identical. The only line in the whole output that is a property of the mode is the WARNING — and
paste 4 measures that the remaining movement in that diff (the order and the label of the three plugin
announcement lines) is run-to-run nondeterminism that occurs in BOTH modes: two runs of the same mode on
this same tree differ from each other the same way. This is not a suppression and not an allowlist: no
filter, no redirect, no normalized log — the mode simply makes the run independent of whatever the host
has under
/usr/lib/charly/plugins, which is the condition a session worktree should be judged under. Iam not asking anyone to take an out-of-tree list on trust.
2 — the walk-up refusal had no test (R10 / B12). Now it has both, in commit 2. Case G builds the one
construction that reproduces the walk-up while
.gitis PRESENT: an EMPTY DIRECTORY at<path>/.git.The step's initialization test therefore sees a
.git, and the--show-toplevelguard is the onlywitness: git finds no valid gitdir at the path, discovery continues upward, and
--show-toplevelreturnsthe enclosing superproject's root. G asserts the run FAILS, that the refusal names itself, and that it
NAMES the path git actually resolved to. The added
--self-testmutation deletes only the comparison(leaving
top=assigned and unused), so the step proceeds into a superproject comparison — and case Gcatches it by no longer naming the walk-up. Measured while building it: a gitfile at
<path>/.gitand asymlink do not reproduce the walk-up; the empty-directory
.gitdoes.3 — the pass-silent console notice (R2 / B14(b)). Closed by the fresh maintainer-account ruling
recorded on this thread — comment
5973963479, posted2026-10-03T22:07:29Zby accountaitrawog(inthis project's maintainer set; the posting account is the gate). It explicitly accepts the non-silent
record being the committed fixture gate rather than the terminal, and names the console line as a
follow-on once the charly pin adopts plugin-task
>= v0.2026276.1230. The measured reason the consoleroute is not taken now — the only in-tree channel that renders free text on a pass is a
verb:that setsMessage, andverb:git-submodules'sstatusmode on the current pin still prints a FALSE table (seeopencharly/charly#777) — and the unblock chain (charly#777→ its fix → charly tag → umbrellatask sync→ an umbrella PR adds the console step) are stated there. Nothing is pretended otherwise.4 — "a worktree initializes no submodules" contradicted the paste (R1). That claim was wrong as
written; it is replaced by the measured statement.
git worktree addalone materializes no submodule — inTHIS session's worktree exactly ONE path is initialized, and it is
charly, because this session rangit -C <umb337-worktree> submodule update --init charlywhile reading the charly source for this RCA.charly's own reflog records it (clone: from https://github.com/opencharly/charly.git, thencheckout: moving from main to fe4b00b4…, both at 2026-10-03 22:40:12 +0200),charly/.gitis a gitfilenaming
.git/worktrees/umb337/modules/charly, andgit -C charly rev-parse HEADequals the umbrella'srecorded gitlink for
charly— so that one checkout is at its gitlink. The step's own run agrees:1 checkout(s) at their gitlinks; 423 not initialized, and charly's nested half printing6 of charly's nested submodules are NOT INITIALIZEDis itself evidence that charly is checked out there,since its nested audit executed. Paste 6.
5 — R5 / B14(d): the sweep's executed output, and every hit accounted for (3rd verdict, block 1). The
claim rested on a summarized hit list, not on the command's output. The command and its real output are
now pasted in full in the R5 bullet below:
git grep -n "submodule status"at the final head, 39 lines,no elision, every one of them classified. The classification is the whole point, so it is stated there
rather than here: 3 hits are the defect (all fixed in this PR), 31 are
CHANGELOG/history, and theremaining 5 carry no
^[+-]classification at all.6 — Rule 4: the two counts are the same metric at two roots (3rd verdict, block 2). The Summary and the
gate's header said "405 of 424 paths at this clone's own root"; paste 6, the step on the SAME clone but in
a session worktree, says "423 of 424". Both are true, and the verdict's premise — that they are the same
root — is the one thing that is not: paste 6 is the WORKTREE. Measured on both roots at once:
.gitmodulespathsf96e776fad91f1charly)Both columns are the ONE metric the step prints —
.gitmodulespaths with no checkout — and the stepitself names it that way in both cases. Neither number is a count of printed FAILs: the last column shows
that in every case (405 and 423 alike) the path's recorded gitlink differs from the enclosing root's
HEAD, so every one of them is a bogus-FAIL site — but the pre-fix
failexits at the FIRST offender, sothe observable symptom was always exactly ONE
FAIL:line. That is why the two totals are 405 and 423 andthe failures are 1.
The gate's own header carried the same imprecision — it paired the root's 405 with the phrase "in the root
and in every worktree" — so commit 3 corrects the header to state the metric, both roots and their
counts, and the one-FAIL-line fact. It is a comment-only change inside the fixture gate this PR adds; no
behaviour, fixture or mutation changes, and its
--self-testis green on the final head (paste 2). TheSummary's number is corrected above to match.
How tested
Everything below is from the committed head,
fad91f1008720618a0119a94ba430dd034235b59, on a clean tree(paste 7). In every command,
$BINis the session's own build of the charly binary:That is the binary R9 requires — the session worktree's own build, from the charly worktree whose HEAD is
fe4b00b4, the umbrella's recordedcharlygitlink. The umb337 worktree itself has nocharly/bin/charly(its
charly/is an uninitialized submodule), which is why the absolute path is used.1 — the fixture gate (the step reports, and every tooth holds).
2 — its self-test: each assertion goes RED on a mutation of the shipped step.
3 — the R7 gate on the final tree, in the documented hermetic mode: ZERO warnings.
Nine steps, zero failed, zero warnings on the gate's own output.
4 — the same gate WITHOUT the variable, then the two diffs against paste 3.
Both commands above are pasted verbatim: the whole-output
diffexits 1 with exactly one hunk, andthe result-line
diffprints nothing (exit 0) — thetask verify:line and the nine[pass]lines arebyte-identical between the two runs.
The whole-output diff is two facts, and neither is a suppressed line. The first is the WARNING, which only
the default run has and which paste 5 shows is a property of the host and this dev/worktree binary, not of
the change. The second is the LABEL of one plugin announcement:
github.com/opencharly/plugin-example-structkind/candy/plugin-example-structkindin one run, the bare
plugin-example-structkindin the other — the same plugin, the same path, the samebuild stamp
9e499e845f220ae9, only the display name differs. That label and the order of the threeannouncement lines are run-to-run nondeterminism of the plugin block, in BOTH modes: on this same tree the
two HERMETIC runs printed the block in two different label forms and the two DEFAULT runs printed it in two
different orders. What does not move, in any run: the three build stamps (
c44db74c3a0bcaea,9e499e845f220ae9,f932c2ea1cf155ae), thetask verify: 9 step(s), 0 failedline, and all nine stepresults — the step-line diff above is empty.
One measured caveat, stated so nothing is hidden: on the FIRST default run of this session's warm-up the
metadata cache was cold and that run additionally printed
charly: fetching git metadata for N repo(s) (first run — may take a moment).../charly: git metadata cached.pairs, one per step that resolvespinned refs (183, 6, 18, 1, 15, 6 repos). Those lines are the host cache warming, not a property of the mode
or of this head, and they are absent from the pair pasted above, which was run with the cache warm.
5 — the same notice, same binary, on maintenance verbs this PR does not touch.
6 — finding 4: the step's own coverage lines on the real root, and the provenance of the one checkout.
The step script below is the
command:block extracted from the committedcharly.ymlby the sameextraction the gate uses (
extractStepCommand,scripts/check-verify-submodules.mjs:106-132); theextraction is byte-for-byte the text run here.
7 — the head the gate ran on, the clean tree, and the four-file accounting.
The empty
statusis the clean tree; the emptycharly.ymldiff is the proof that the step text isunchanged from commit 1 to this head — commits 2 and 3 touched the
.mjsalone (+34/−1and+11/−6respectively; commit 3 is comment-only); and the last listing is the four-file accounting the Summary
above uses.
8 — the two sibling surfaces commit 1 corrects, in full.
Rulebook compliance
/charly-internals:git-workflowand/charly-internals:agentswere loaded before any gitaction on this branch, and
/charly-internals:root-cause-analyzerfor the RCA below.[ -d ]guard cannot seean empty directory, so
git -Cwalks up — measured), and the surviving WARNING, whose RCA is finding 1above (mechanism at
plugin_loader.go:429/435/447/454/461/474-483/484-494) and whose resolution is ahermetic gate run with zero warnings, not a normalization, not an allowlist appeal. Finding 4 is the
same rule applied to this PR's own body.
grep -E '^[+-]'that counted a not-initializedbox/*as drift) are fixed together, and the samedefect class is corrected on the two other surfaces that encoded it —
.claude/workflows/verify-status.js'snestedinvariant and.github/workflows/sync.yml's explanatory comment (both hunks in paste 8) — so nooccurrence survives.
charly.ymlinstead of copying itstext, so there is exactly one implementation of the step and the gate cannot drift from it.
WARNING is NOT suppressed — no filter, no redirect, no allowlist. The gate is run in charly's own
documented AS-IF-UNPACKAGED mode (
plugin_loader.go:474-483), with the unbounded run pasted beside it.[ -d "$path" ]guard and the^[+-]nestedclassification are removed in the same change that replaces them, and the R5 sweep was executed rather
than summarized. Its command and its complete output at this head:
All 39 lines, no elision. Every hit is accounted for: 3 are the defect and are all fixed in this
PR —
charly.yml:213(the nested audit, whosegrep -E '^[+-]'counted-as drift) plus its twosibling surfaces,
.claude/workflows/verify-status.js:52and.github/workflows/sync.yml:101(bothhunks in paste 8). 31 are
CHANGELOG/history — merged, tagged records of earlier PRs; they are thechange log, not live code, and R5 does not rewrite history. The remaining 5 carry no
^[+-]classification at all:
.claude/workflows/verify-status.js:40is thecleaninvariant(
cmd: 'git submodule status', no prefix filter — its sibling at:52is the one that had the filter),.opencode/agent/pr-validator.md:15is the prose "Check git submodule status is clean",reasonix.toml:7is a bash-permission entry, and.claude/workflows/triage-check-failure.js:47,91areprose asking a triage agent to probe with the command. None of the five encodes the defect. No occurrence
survives.
feat/umb-verify-submodule-guardin this session's own worktree, noforce-push, no direct push to
main, no hook bypass.task verifyoutput is pasted inpastes 3 and 4 (hermetic first, the unbounded run beside it, with a whole-output diff and a step-line
diff), and the fixture gate with its self-test in pastes 1-2.
own stdout for both count lines, and paste 6 is the step's real output on the real 424-path root.
taskinvocation above uses the session worktree's ownbuild,
.worktrees/workflow-ir/opencharly/charly/bin/charly, whose source tree is atfe4b00b4— theumbrella's recorded
charlygitlink — never a shared or installed binary. This PR changes no Go source,so no rebuild is in scope here.
fad91f1, run after thecommit, on a clean
git status(paste 7). The changed paths — the.mjsgate, the extractedcharly.ymlstep, and the two sibling surfaces — were all executed or exercised in that run.
Change classification
verifygate accepts). The maintainer-account authorization is on this thread: comment
5973584955(accountaitrawog) for the gate change itself, and comment5973963479(accountaitrawog) for the finding-3disposition.
scripts/check-verify-submodules.mjs(plus its--self-test), and"$BIN" task verifyon the final tree (paste 3, hermetic, zero warnings; paste 4,the unbounded run, pasted beside it).
fully tested and validated— the umbrella'stask verifygate passed on thefinal committed tree with the changed paths executed live, and the gate's own output is pasted in full.
Agent:
workflow-ir· session7e17b5cf-c349-4032-8da5-2e4e03612780Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)