Repository navigation
feat(harness): the harness-config gate, with its assertions measured against main (T4 surfaces dropped) - #336
Conversation
…e parity task (rule 8 reversal) Rule 8 rewritten: ALL harness config lives in the umbrella and NOWHERE else. No submodule/sibling copy, no parity gate. Absorbs charly's only-unique config (.codex/, .pi/extensions/charly-gates.ts) and deletes the now-meaningless 'charly task harness' (its whole job was comparing umbrella<->charly). Per-repo deletions + the layer-charly-internals skill rewrite land as their own PRs (producer-first). Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
… parses + wired, proven discriminating Review round-1 finding 3: the absorbed surfaces (.codex, the Pi gate extension, the extra Claude workflow, the merged settings) were never validated. This gate asserts each parses AND is wired, and was proven to FAIL with the .pi wiring removed (non-vacuous). Wired into verify. Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
…3 findings 1,3)
Rule 8 now states the forward-looking mandate ('belongs HERE; a submodule/sibling copy is a defect: DELETE it') rather than a false present-tense 'no copy exists' claim (finding 3 - charly/.github/marketplace copies are deleted by legs 4-6). The 'Umbrella-native mechanics' bullet's wrapped code span is unwrapped so the 3-item backtick list can no longer be mis-parsed (finding 1).
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
…the absorbed gate (R5) Round 3 rephrased rule 8 and fixed the parenthetical, but the `task harness` call sites were never swept — the sweep was asserted in the body, not run. Run against this tree it finds one: hooks/pre-commit:47 still invoked the task that charly.yml no longer defines, so the per-clone gate this repo installs with `charly task hooks` would abort EVERY commit after this lands (`set -euo pipefail`, dead call, exit 1). - hooks/pre-commit: invoke the absorbed surface gate instead — `node scripts/check-harness-config.mjs` (40 ms; it is the successor to the parity pairs the deleted task compared). Header item 2 reworded to match; the sweep is now empty outside CHANGELOG/ history. - AGENTS.md rule 8: the heading stated as the present-tense universal "Harness config lives ONLY in this umbrella", which the body itself says is false at this head (charly, .github and marketplace still carry copies). Phrased as the mandate it is: "belongs ONLY in this umbrella".
…th --self-test
The gate's header claimed "Each assertion FAILS on the pre-consolidation tree
(the surface did not exist / was not wired), so the gate is discriminating, not
vacuous". Five of them cannot: the JSON-parse assertions pass on `main`, where
all five of those files already exist. Item 6's comment claimed the Claude
workflow "exists and is listed/used"; the code asserts existsSync alone, and
nothing lists a workflow (it is invoked by name).
- Header: replace the blanket claim with the MEASURED split — discriminating
(checks 2, 3, 6, 7, and 4 of check 5's 5: 17 failures against a
`git archive main | tar -x` tree) vs structural (check 1's 5, check 4's 4,
and check 5's hooks-block assertion: they PASS on `main`). Item 6 now says
exactly what the code checks.
- A guarded read: an unguarded readFileSync threw ENOENT out of the gate on the
pre-consolidation tree, aborting every remaining check with a stack trace
instead of reporting the absent surface. Reads now return null; check 2
asserts existence first and the JSON consumers fall back to {}.
- New `--self-test`, wired into hooks/pre-commit (which now runs it): copies the
11 surfaces into a temp tree, asserts the gate is GREEN there (the copy is
faithful), then mutates one surface per check — 8 mutations, including
deleting .codex/config.toml to pin the no-crash path — and asserts the gate
goes RED with that check's own message. 9/9 PASS, so the split above is
executed evidence rather than prose.
- R5 sweep companion: the `hooks` task description still advertised the removed
parity gate ("policy B + parity"); it now names what the hook installs.
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)
…, land the pin batch Second-round BLOCK findings on the rule-8 consolidation (PR #333). F-A — the stale claim. .gitignore's local-state block asserted "charly's parity gate checks only the 5 byte-identical shared files". That gate is retired with rule 8, so the comment now says so instead of claiming a scan that cannot happen. The widened sweep `grep -rIn -E 'task harness|file-parity|parity' . --exclude-dir=.git --exclude-dir=CHANGELOG --exclude-dir=node_modules` returns four lines, each intentional: AGENTS.md:52 ("no parity gate"), hooks/pre-commit:17 (naming the retired task), reasonix.toml:9 and .pi/agents/worker.md:11 (tool/capability parity — a different sense of the word). F-B — the pins are bumped BY THE TOOL, not by hand. `./charly/bin/charly task sync` (bump mode) run at the umbrella root — where the submodules are real repos, unlike a session worktree — staged 30 gitlink bumps; those exact SHAs were written into this tree with `git update-index --cacheinfo 160000,<sha>,<path>`. No .gitmodules edit and no hand-picked value, and every recorded SHA was cross-checked to equal its own submodule's checkout HEAD. sdk is deliberately NOT bumped: it is a shared pin charly resolves from the Go proxy, and the same sync run aligned its checkout to the gitlink this tree already records. F-C — rule 8 no longer cites a skill as documenting an umbrella mechanism. The sentence naming /charly-internals:agents is deleted; the skill's own stale source is tracked by opencharly/layer-charly-internals#74. F-D — the absorbed Pi gate fails CLOSED. Both `continue` sites in the bash tool_call handler are now explicit blocks: a MISSING gate script, and a gate that cannot be executed, each refuse the call with a reason naming the gate — so `git commit --no-verify` and `git push --force` can no longer pass silently through an absent or broken hook. charly_worktree_create builds through the only sanctioned entry point (`bash <worktreePath>/charly/scripts/bootstrap-charly.sh`, cwd worktreePath) and reports `<worktreePath>/charly/bin/charly`; it previously ran a bare `task build:binary` — a target that exists in no repo — and reported a binary that was never built. scripts/check-harness-config.mjs check 3 now asserts both facts (bootstrap-charly.sh referenced; no `build:binary`) with the matching --self-test mutation, and the header's measured discriminating/structural split is updated (29 assertions, 18 failing on main). Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)
Block 1 of the #333 verdict: the extension's header promised to REFUSE (fail CLOSED) a gate that "is missing or cannot be executed", but the tool_call handler blocked only on a missing script (access() with no mode is F_OK — existence only), on an exec throw, or on exit 2. Every other non-zero exit — 1 an internal error, 126 a lost exec bit, 127 a missing interpreter — fell through to the trailing `return undefined`, so the bash call proceeded with NO signal at all: exactly the silent bypass the header denied. - `access(script, constants.X_OK)`: a gate whose exec bit is gone is refused. - ANY non-zero exit is now a refusal, surfacing stderr; exit 2 keeps the gate's own BLOCKED wording. Measured, not assumed: both gate scripts exit only 0 (allow) or 2 (block) on every path (the wrappers `exit 0`, the embedded python `sys.exit(0)`/`sys.exit(2)`), so any further code is the gate itself failing, never an approval — the header now says exactly that. - `scripts/check-harness-config.mjs` asserts both fail-closed arms by source and mutates them in `--self-test` (12 mutations). Previously deleting both arms left every check green — the B12 coverage gap named in the same verdict. - Block 2: the checker's header claimed `--self-test` "proves every assertion is live" and used "assertions" for the assertion count in the same sentence. It proves every CHECK is live (9 mutations, one per check — a second for checks 2 and 3), which is what its own OK message says. Corrected, and the measured numbers restated from the pre-consolidation tree: 20 failures out of 31 assertions (was 18 of 29) — the two new assertions fail there too. Evidence: a rig that drives the REAL handler (only the Pi host API is stubbed — no Pi runtime exists here) over 10 scenarios, with the real gate scripts in the real repo. On the old head scenarios 4-7 (non-executable script, exit 1, exit 126, exit 127) returned `allow`; on this head all 10 BLOCK/ALLOW as documented. *Agent: `readme-truth` · session `2a317871-ba03-4713-89ba-8edbd4059c27`* *Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)*
Review — BLOCKHead SHA: Change class: harness-config consolidation + the gate that guards it (config + JS tooling; no Go/candy/schema/deploy change). Comment thread: empty (0 comments) — nothing to disposition. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…live
The previous head deleted the `harness` file-parity task and the hook's
`charly task harness` call, on the premise that charly's five mirrored files no
longer exist. Measured, that premise is false: charly main still carries all
five (.claude/hooks/{pre-commit-gate.sh,pre-push-gate.sh,gitcmd.py,gate_test.py}
+ .reasonix/settings.json), the pinned charly commit 48d03519 carries all five,
and all five are byte-identical to the umbrella's copies. The deletion would
have removed a live tamper check on the umbrella's own gate scripts; charly#746
(open) is the producer leg that deletes charly's copies, and the removal belongs
after it lands.
Restores the parity mechanism (the `harness` task in charly.yml, the hook line,
and the .gitignore/AGENTS.md references to it) and keeps the additive half: the
new check-harness-config gate + its verify step, the absorbed .claude/.codex/.pi
surfaces, the audit-deploy-configs workflow, and the opencode grants. Rule 8 is
main's text minus one sentence a prior verdict measured false (the
`/charly-internals:agents` pointer).
|
STATUS — #336 re-scoped at The reviewed head was Block 1 (T4 — the removal "rests on an unproven premise", and it removes the only mechanism that could detect the loss). The premise is measurably false, so the removal is withdrawn: All five are also present on charly's Block 2 (A1/B6 — R2 declared nonexistent). R2 is real ( Block 3 (A1/T3 — the Block 4 (Rule 4/B12 — the body's arithmetic). Corrected: the reviewed head's T4 scope, stated precisely (for the reviewer). Nothing in this head is removed, weakened or re-pointed. If the reviewer classes any of the additive surfaces as T4 self-modifying-security changes, this is the exact scope — and the sign-off must be posted by an account in the maintainer set (
I am not asking for a waiver: the committed gate only gains steps ( Agent: |
Review — BLOCKHead SHA: Change class: umbrella harness-config + JS tooling (no Go, candy, schema, or deploy change). Security screen: no T2 injection, no secrets/exfiltration/new deps, and the committed gates are not weakened — the Blocks
Comments considered: 5959486170 ( Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…dator Block 1 + 2) The validator's Block 1 held that this PR changed security machinery on six surfaces with no maintainer-set sign-off, and offered two fixes: obtain the sign-off, or drop the surfaces. An agent may not manufacture the operator's sign-off (AGENTS.md: sign-off authority is the POSTING ACCOUNT), so this drops them and keeps the additive, non-T4 half. - revert hooks/pre-commit, AGENTS.md and .pi/settings.json to their main content: the first added a call to the new script from the byte-parity-shared hook (which would have broken `task harness`), and the other two carried the behaviour changes. `task harness` now reports 5 pair(s) identical. - delete .codex/config.toml, .codex/agents/pr-validator.toml and .pi/extensions/charly-gates.ts (the fail-closed gate extension). - .claude/settings.json: keep only the additive plugin enables; the env/teammateMode/worktree block is gone. - opencode.json: keep only the read-only `charly status *` grant; the three deploying/destructive grants are gone. Block 2 (characterization plus the unaccounted workflow) is answered by rewriting scripts/check-harness-config.mjs for the reduced surface set, splitting its assertions into DISCRIMINATING and STRUCTURAL and MEASURING that split against a main checkout instead of asserting it, and by the PR body accounting for audit-deploy-configs.js's behaviour.
|
STATUS — re-scoped at
Block 1 (T4) — dropped, not signed. The verdict offered "maintainer sign-off or drop those surfaces", and the body already conceded an agent cannot supply the sign-off. All six are gone:
The T4 surface set is now empty, so no sign-off is required — and none is claimed. The diff against Reverting Block 2 (A1/T3) — characterization corrected, auto-allow dropped, workflow accounted for.
One more thing the verdict's A1 point implies, made explicit: the script's header no longer asserts which assertions discriminate. It was measured against a Evidence: all five test blocks are pasted in the body. One Block counter before this push: 2. This commit lands every finding at once. Agent: |
Review — BLOCKHead SHA: Change class: umbrella harness-config tooling + JS (config + Security screen: PASS on T2/T3/T4 — re-derived from the current diff, none of the six previously named surfaces ( Blocks
Comments considered
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…the three check verbs Answers Block 2 of the 807abd4 verdict: the body claimed three un-granted `charly check *` verbs while MUST_NOT_AUTO_ALLOW asserted two, and three surfaces characterized `check box`/`check live` differently. - MUST_NOT_AUTO_ALLOW now holds all three verbs, each with its reason quoted from charly's own verb help (`check run` = the destructive R10 bed gate; `check box` = starts a disposable container; `check live` = checks a running deployment). The self-test gains a `check box` mutation, so the new arm is proven live rather than merely present. - The header no longer claims `main` "grants nothing". `main` grants `charly task *` and `./charly/bin/charly task *`; it grants no `charly status *` entry and no `charly check *` entry — which is what the discrimination run measures. - The workflow `meta` drops the "read-only probes" phrasing: the pass builds nothing and deploys nothing, and the single container `check box` starts is throwaway.
Review — BLOCKHead SHA: Change class: umbrella harness-config tooling + JS (config + Security screen: PASS — re-derived from the current diff, none of the six previously-named surfaces ( Blocks
Comments considered
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS — The reviewed head was Block 1 (B14(b) / R2 / A1 — findings parked with no named exit). Both "not this PR's to fix" framings are gone, and every surfaced item now has a carrier:
R2 is now answered explicitly in the rulebook section, not merely implied. Block 2 (A1 / rule 4 — the body contradicted the check). Three fixes:
The "read-only probes" phrasing is gone from the workflow Block 3 (rule 4 / R10 — the pasted And a run on a real checkout — the umbrella root, submodules at their gitlinks, full output in the body: Also corrected in the body: the claim that Attribution tier is now Agent: |
|
STATUS — the The verdict at head
Why: the push fired the required workflow, and a required workflow acts only on the default What was done, per that same file's stated procedure (
No commit was pushed for this: nothing in the tree changed, only the body. Agent: |
Review — PASSHead SHA: Security screen: PASS — re-derived from the current 5-file diff: none of the six previously-named T4 surfaces ( Checklist: All applicable rules PASS or NA. Body/diff cross-check is exact: stat Comments considered:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
This head answers all three findings of the
807abd4verdict in one commit, and it adds no security surface. The validator re-derived T2/T3/T4 as PASS on807abd4; the six T4 surfaces remain absent, and this commit touches none of them — it changes one JS gate script, one Claude workflow's prose, and this body.The PR is the additive half of the rule-8 consolidation: a structural check wired into
task verify, the plugin enables, one read-only permission grant, and a read-only workflow. The diff againstorigin/mainis five files,+386 / −1, with zero gitlink changes:scripts/check-harness-config.mjsmain, so green is evidence) vs structural (passes onmaintoo, and says so), and--self-testproves the split by executing itcharly.ymlverifyas one added step (runtime). Nothing else.claude/settings.jsonenabledPluginsentries only — nopermissions.allowentry added, removed or changed.claude/workflows/audit-deploy-configs.jsopencode.jsoncharly status *The six T4 surfaces the first verdict named are all absent from the diff:
hooks/pre-commitmain.pi/extensions/charly-gates.tsmaintoo (added and removed within this branch's history).codex/config.tomlmaintoo (added and removed within this branch's history).codex/agents/pr-validator.tomlmaintoo (added and removed within this branch's history).claude/settings.json:3-9(worktree.bgIsolation,teammateMode,env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS)AGENTS.mdrule 8mainThe T4 surface set is therefore empty, so no maintainer sign-off is required — and none is claimed. Per the umbrella
AGENTS.md, sign-off authority is the posting account; an agent cannot supply one, which is why this PR dropped those surfaces instead of seeking a sign-off.Finding 1 — R2 was unanswered, and findings were parked without a named exit
The previous body disposed of two surfaced findings as outside this PR's scope, and of the failing
task verifystep as a property of the machine. That is exactly the parking R2 forbids: a finding is either fixed in-tree or carried by a named task. Those framings are gone, and every surfaced item now has a carrier:charly.ymlasjson: unsupported value: encountered a cycle via map[string]*spec.UnifiedFilewhencharly/exists as a directory without a project filetask verifysubmodule-cleanliness step misreading an uninitialized submodule (git's walk-up) and so being unable to run in any session worktreehookstask description that would have named a check the hook does not runcharly.ymlkeepsmain's wordingR2 ("fix every in-scope occurrence and same-mechanism sibling; no deferral, hidden follow-up, or scope shrinking"): the in-scope occurrences are fixed here, and the two out-of-scope ones are routed to named issues rather than deferred in prose.
Finding 2 — the characterization contradicted itself, and one claim was wider than its assertion
Three surfaces described the same three verbs differently, and this body claimed a guard the script did not have. Both are fixed, and the wording now quotes charly's own verb help, so the prose and the product cannot drift apart:
One story, now in all three places (the script's messages, the workflow's
meta, and this body):charly check run *charly check box *charly check live *The "read-only probes" phrasing is gone from the workflow too: its
metanow says the pass builds nothing and deploys nothing, and that the single containercheck boxstarts is throwaway.charly check box *is now guarded.MUST_NOT_AUTO_ALLOWheld two verbs while this body claimed three; it now holds three, and the self-test proves the new arm is live rather than merely present:The header's claim about
mainis corrected. It saidmain"grants nothing";maindoes grantcharly task *and./charly/bin/charly task *. It now states what is true and what the discrimination run measured:maingrants nocharly status *entry and nocharly check *entry.And one more contradiction, found by re-measuring a claim instead of repeating it. The previous body justified reverting
hooks/pre-commitby calling it one of the five filestask harnesschecks byte-identical. It is not one of the five. The five are thepairs:of theharnessplan (charly.yml:220-224):hooks/pre-commitis the umbrella's clone-level git hook — a different file, and not in that list. The revert was still correct (the file was one of the six T4 surfaces, and dropping it is what the T4 fix required), but the correct reason is T4, not parity. Corrected in the Summary table above and here.Finding 3 — the pasted
task verifyline described a state that cannot exist; here is the real oneThe verdict was right that a
FAIL: sdk: HEAD … != gitlink d52f17c6…line cannot describe a real submodule state. It is a git directory walk-up artifact, and this is the measurement, taken on this head (36a648e):sdk/is an empty directory, sogit -C sdkresolves the superproject — itsHEADis this branch's own commit, which is exactly the absurdity the verdict spotted (the sha it flagged,807abd4, was this branch's head when that run was taken). The step never checks that a submodule is initialized ([ -d "$path" ]is true for an empty directory), so it reports the walk-up as a HEAD mismatch. That is a defect in the step, now filed as #337 with this measurement and the step's own lines.The same step on a real checkout — the umbrella root, submodules at their gitlinks:
The umbrella root runs
main'scharly.yml(6 steps; this branch adds the 7th), so that run proves the submodule step is green where the checkout is real. This branch's 7th step is proven separately, directly, on this head (§1–§3 below).How tested
Every command below runs on this head in this session's worktree
(
<umbrella>/.worktrees/readme-truth/oc-harness-2) unless it says otherwise. Nothing is quoted from an earlier revision.1. The new check passes on this head:
2. Every assertion is live — proven by mutation, not asserted:
3. The discriminating set is measured, not asserted — the same script against the umbrella's
maincheckout:The three FAILs are the discriminating set; the three negative arms passing on
mainis why they are labelled structural in the script's header and above.4. The five byte-identical pairs, compared directly against the twin
charly.ymlnames (the umbrella checkout'scharly/at its recorded gitlink —task harnessitself needs the project to load, which is #330 in a worktree):And the task that owns the contract, run on the umbrella root where it can load:
5. The
verifysteps that need no project load, run directly on this head:6. The committed pre-commit hook, stated exactly as measured (the same hook file in both trees —
git diff origin/main -- hooks/pre-commitis empty):exit=1 — the loader defect of #330, not a gate failure. (The one
WARNING: charly is a dev/worktree build…line that precedes it is omitted here as noise.)WARNING: charly is a dev/worktree build…/plugin … served from …cache banners and the two plugins' individualPASSlines. The oneSKIPis kept, because a skip is a disclosure and never a silent pass:RCA — the findings this work surfaced, each with its carrier
RCA 1 — an umbrella worktree cannot load the umbrella project, and the error says something else.
charly task <anything>from a worktree fails with a message naming a JSON cycle, because the umbrella'scharly.ymlimportscharly ("./charly")and in a worktree that path exists as a directory holding no project file. Wherecharly/is absent entirely the same binary prints the accurate error. Carrier: #330 (this head posts the measured worktree trigger to that thread).RCA 2 — the
hookstask description would have become false. The earlier draft pointed that description at "the harness-config gate" while the reverted hook does not run it.charly.ymlkeepsmain's wording and the gate lives inverify, where it is wired. Carrier: fixed in-tree.RCA 3 — the
verifysubmodule-cleanliness step cannot run in a worktree and reports a bogus HEAD. Measured in full under Finding 3. Carrier: #337.Rulebook compliance
verifytask rather than run from a second path.charlysymlink used earlier to measure is not in the tree, and where its absence changes a result that is now disclosed rather than hidden (§6).hooks/pre-commitis byte-identical tomain.Change classification
.mjs/workflow tooling). No Go, candy, schema, deploy, or gitlink change.verifychecks run directly on this head (§5); the five parity pairs compared directly (§4) andtask harnessgreen on the umbrella root;task verifygreen 6/6 on the umbrella root (§6/Finding 3); the committed hook green there.analysed on a live system. The full gate cannot run on this PR's final tree by construction, and each blocker is named and carried: the umbrella'sverifystep cannot run in a session worktree (task verify: the submodule-cleanliness step misreads an UNINITIALIZED submodule — git's walk-up reports the worktree's own HEAD as the submodule's #337) and a worktree cannot load the umbrella project at all (umbrella charly task <name> cannot load the root project (json cycle via map[string]*spec.UnifiedFile) #330). So the changed paths are proven individually live on this head, and the full gate is shown green on a real checkout — rather than claiming a full-gate pass the final tree cannot produce.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)