Repository navigation
fix(scripts): the corpus guard tests materialisation, not existence, in all three arms — a session worktree's task sync no longer deletes the farm - #511
Merged
Conversation
…in all three arms A session worktree — the layout AGENTS.md Part II rule 2 prescribes for every lane — has `marketplace/` PRESENT and EMPTY, because `git worktree add` creates the submodule mount point. `existsSync` accepted that as a corpus, so `charly task sync` derived ZERO skills and published the result as a state: it deleted all 353 `.dsh/skills` entries and rewrote reasonix.toml's [skills] paths to zero entries, reporting `exit=0 done` — and on the same tree the harness-config gate turned RED with the same derivation's false STALE verdict (#508). One predicate, in one module (`scripts/lib/corpus.mjs`), per DERIVATION INPUT: the flat farm enumerates skill FILES and needs `corpusHasSkills`; reasonix enumerates family DIRECTORIES and needs `corpusHasFamilies`. A guard that stopped the whole run on the first unmet need would silently drop the half that could still derive, so each half reports its own visible SKIP and the other continues — and the writer writes NOTHING for a skipped half rather than publishing a zero-entry result. All three arms now agree on the same tree: the writer, `--check`, and the gate's two skip tests, which is the defect this removes (one predicate with three implementations and only one honest). The coverage that was missing ships with it: an EMPTY corpus, and the shape this environment actually has (family directories present, skill files absent — the gate's own staged tree). Five arms go RED without the fix, measured by running the new selftest against the old scripts: 12/16 there, 17/17 here. Closes #508 Agent: umbrella-pin-sync Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
Contributor
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/obfuscation, no new deps, no weakened guardrail (the change strengthens the corpus guard and lands from maintainer account Checklist: All applicable rules PASS or NA.
Tool-limited dispositions (unverifiable read-only, cross-checked for internal consistency — no contradiction found): the R10 bed-class matrix citation, the Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
This was referenced Oct 16, 2026
Merged
Merged
Closed
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
…s) (#536) The umbrella records the wave's merged, tagged producers: - charly v2026.293.1537 — the plugin-check adoption (the build-step idle window) - plugin-check v0.2026293.1223 — the fix itself - layer-crabbox v2026.293.1244, layer-strata v2026.293.1253, plugin-strata v2026.293.1316, layer-openclaw v2026.293.1422 — the #511 sources - marketplace v2026.293.1347 — the regenerated corpus (openclaw-cmd, the rows) - distro-cachyos — the derived edge at charly's box/cachyos (the distro consumer merge, distro-cachyos v2026.293.1303) Two submodules (sdk, plugin-crabbox) roll to their default-branch HEAD as the sync advances every initialized pin — the umbrella keeping its view current, and both are already-merged org work. The derived harness bindings follow the corpus: the openclaw rename (openclaw-cmd) and the strata / strata-cli / strata-layer / crabbox-cli rows appear as .dsh/skills entries, alongside two other corpus skills the current pin carries (fireactions, githubrunner-ubuntu). Gate: charly task verify rc=0 on this tree with the rebuilt binary 2026.293.1538. Agent: dsh-crabbox-079 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) Co-authored-by: aitrawog <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #508
Summary
A guard that tests
existsSyncis not a guard on a system that creates empty mount points.git worktree addcreates the submodule MOUNT POINT, so every session worktree — the layoutAGENTS.mdPart II rule 2 prescribes for every lane — hasmarketplace/present and empty. The old guard accepted that as a corpus, socharly task syncderived zero skills and published the result as a state: it deleted all 353.dsh/skillsentries and rewrotereasonix.toml's[skills] pathsto zero entries, reportingexit=0 done— while the harness-config gate, on the same tree, turned RED with the same derivation's false STALE verdict.One predicate, one module, per derivation INPUT.
scripts/lib/corpus.mjsowns it; the flat farm enumerates skill files and needscorpusHasSkills, whilereasonix.tomlenumerates family directories and needscorpusHasFamilies. A tree can hold one input without the other — the gate's own staged tree does, and this worktree does — so a guard that stopped the whole run on the first unmet need would silently drop the half that could still derive. Each half reports its own visible SKIP and the other continues, and the writer writes nothing for a skipped half rather than publishing a zero-entry result.All three arms now agree on the same tree — the writer,
--check, and the gate's two skip tests — which is what the defect was: one predicate with three implementations and only one honest. The two gate skip tests and the writer's notice import the same module and print the same reason, so they cannot paraphrase their way apart again.How tested
The head, and one command whose output would differ if the evidence came from another tree — the message-only amend before the first push moved the head, not the tree, and two equal tree hashes cannot both be true of different content. This is the head the measurements below were taken on:
Round 1 note: the PR then went
BEHIND—#509merged tomainat13:16:18Z, so the base this branch was cut from had advanced — and it was brought current withgh pr update-branch(a MERGE, never a rebase). On the merged tree the four arms were re-run and still agree, which is the point of re-measuring rather than assuming:The merged head, after the base move —
7f06a648carries main's#509CHANGELOG and its six gitlinks, and touches none of this PR's four files:The first fence's head/tree pair, then, is provenance for the evidence; this one is the published head. Both are shown.
Change class, read from the owner's matrix (
/charly-check:check,references/beds-and-r10.md— not itsSKILL.mdindex): a hook/workflow script change. Its pre-flight is the parse check, and its gate is "execute the changed script live: run the hook directly (paste its output)" — no bed fan-out is required for this class, and no bed can read these paths.The changed script, executed live, in both modes, on this tree — the writer's own destructive arm included:
353and43after the writer ran: the farm was not emptied and the reasonix list was not rewritten. That pair is the defect, gone.The coverage that was missing ships with it, and it fails without the change. Two fixtures are new: an empty corpus, and the shape this environment actually has — family directories present, skill files absent (the gate's own staged tree, which stages 43 family dirs from
reasonix.toml's list and zeroSKILL.mdfiles). Run against the old scripts, the new suite goes RED:Five arms discriminate. And the gate's own self-test — the step that was RED on
#509— is green again, with both corpus shapes covered:And the gate itself, on this corpus-less tree, is GREEN where it was RED — this is the outcome the fix exists for:
The committed tree, through the umbrella's own battery (which the pre-commit hook ran on this commit):
task pin-check: [pass] the pin check holds;task self-test: [pass]; everyscripts/check-*.mjsarm OK;pre-commit: OK— with the corpus-dependent arms reporting visible SKIPs rather than failing, which is the behaviour this change restores.Change classification
scripts/lib/corpus.mjs(new, 70 lines),scripts/sync-skill-bindings.mjs,scripts/check-harness-config.mjs,scripts/sync-skill-bindings.selftest.mjs; 4 files, +195/−40.fully tested and validated— the class's gate passed on the committed tree, the changed paths executed live with retained output, and the new coverage was shown to discriminate (12/16 against the old scripts, 17/17 here).exit 1) for the absent case. That is deliberate and is the "all three arms agree" requirement: the gate SKIPS on such a tree, so a writer that failed there would put the two arms back into disagreement. The anti-crash property the old arm asserted is unchanged, and the arm now says so in its own name.Rulebook compliance
/charly-internals:git-workflow,/charly-check:checkand its owner's matrix file,/charly-internals:skills,/charly-internals:agents(the derived-binding doctrine this repairs).--no-verify, no bypass, no hand-edited artifact. The commit was initially refused because the hook could not load the project withoutcharly/; the answer was to initialize the two import submodules so the gate could run, not to skip it.corpusIsMaterialised, the localfamiliesOf, the early-exitingskip()), proven by the claim-keyed grep itself, run on the committed tree:git statuswas clean before the commit and at the head; no force-push, no bypass, no direct-main push; the work is in a dedicated single-owned worktree.716623band, after theBEHINDupdate,9d66ec8: the changed script executed live in both modes, its self-test 17/17, the gate's self-test OK, the gate itself GREEN with visible skips, and the umbrella's batterypre-commit: OK.Filed issues
opencharly/opencharly#508— this row (Closes), carrying the mechanism, the three-arm table, the43-vs-45record correction, and the RCA. The fix is here rather than filed because the writer could destroy a session's tree in one command; the harness-binding half's separation argument does not apply to a defect whose blast radius is every lane'stask sync.opencharly#510(the 15 unjudged pin rows of the consumer wave —differsis notbehind),charly#958,plugin-check#121,opencharly#506.What I could not do
scripts/*.mjs, the class requires no Go gate, and the pre-commit hook recorded that it fell back to the main clone's binary. I did not build acharlybinary to make the notice disappear, because that would have been ceremony for a script change — and the hook's NOTICE is the disclosure the rulebook asks for.marketplace/DISPATCHER.md, and the corpus-derived arms); the self-test names each skip rather than counting it as a pass.#510are untouched by this PR by design: this change fixes the guard, not the pins.Agent: umbrella-pin-sync
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)