Repository navigation
fix(sync): restore honest sync evidence + ignore root local state - #253
Conversation
The Taskfile→task cutover (#247) deleted scripts/sync-gitlinks.sh, whose log carried the per-pin ` <path> -> <sha>` lines the sync PR body (scripts/ sync-pr-body.sh) grepped. verb:git-submodules only returns a one-line summary AND `charly task`'s text reporter drops a passing step's own message, so the grep matched nothing and every moved pin read "MISSING from producer log — investigate" in the body (measured with the real post-cutover producer shape). Root fix: stop coupling the body builder to any incidental producer-log format. The authoritative per-pin proof is already the index-derived `staged-gitlink` vs remote default-branch HEAD table (scripts/sync-pin-evidence.sh); the producer log is now pasted verbatim as context, bounded inside the function (never via a caller `head`, which this SIGPIPE-ignoring harness would let flood). The self-test now exercises BOTH historical producer shapes — it previously fed only the retired `->` form, so it could not fail on the shape reality produces. Also ignore the root local-state classes (`charly check run check-all-beds` writes `.check/`; `.build/`, `.opencharly/`, `scratchpad/`, `.claude/worktrees/`, `bin/`), so the root `git status` is honest after a roster run. Modelled on charly/.gitignore; the parity gate checks only the 5 shared files, not .gitignore. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: umbrella tooling/config — CI workflow comments ( Security screen: clean (comments-only workflow edit; the script change removes a fragile coupling and adds no privilege/secret/egress; no supply-chain change). Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
Review — PASSHead SHA: Security screen: PASS — comments-only workflow edit; the script change removes a fragile producer-log coupling and adds stricter self-test arms (no privilege/secret/egress/supply-chain change, no guardrail weakening); Checklist: All applicable rules PASS or NA. (R10 bed/ADE/SDD/architecture checks NA — umbrella-root tooling, no submodule gitlink, no Go/CUE/generated artifact, no candy, no bed. The new Comment 5833481623 (github-actions[bot], head Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…t files (#261) The umbrella root produces the same generated-state classes charly's own .gitignore already lists, but three were missing, so a root `git status` read dirty after ordinary work: - `image/` — `charly vm build` disk/seed artifacts (the configurable vm.image_dir root, default `image`). - `.containerignore` / `.dockerignore` — `charly box generate` build-context ignore files (defaults.context_ignore). This is the same class as the `.check/`/`.build/`/`.opencharly/` entries added by #253 ("ignore root local state"); these three were simply not in that sweep. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) Co-authored-by: atrawog <[email protected]>
Summary
Two umbrella-owned defects, both surfaced while catching up with upstream and
both root-caused (R1) rather than worked around.
1. The sync PR body's per-pin evidence was structurally dead
The Taskfile→task cutover (#247) deleted
scripts/sync-gitlinks.sh, whose logcarried the per-pin
<path> -> <sha>lines thatscripts/sync-pr-body.shgrepped. The replacement composer
verb:git-submodules bumpreturns only aone-line summary (
bumped N submodule pin(s): …), andcharly task's textreporter drops a passing step's own
Result.Message— so the log carries noper-pin line at all. The body builder's
grep -F " ${p} -> "therefore matchednothing and emitted
MISSING from producer log — investigatefor every movedpin.
Measured with the real post-cutover producer shape:
The
--self-testcould not catch this: it fed only the retired->form, so itpassed against an input reality no longer produces (a test that cannot fail).
Root fix: stop coupling the body builder to any incidental producer-log
format. The authoritative per-pin proof is already the index-derived
staged-gitlinkvs remote default-branchHEADtable(
scripts/sync-pin-evidence.sh); the producer log is now pasted verbatim ascontext, bounded inside the function. The bound is applied with
sed -nratherthan a caller-side
head, because this harness ignores SIGPIPE (AGENTS.md"Command hygiene") and a
headreader would let the producer flood the log withbroken-pipe write errors.
The self-test now exercises both historical producer shapes and asserts the
excerpt is verbatim (no injected
MISSING).Claim-keyed sweep — executed (B14(d))
The stale claim ("the body pastes the producer's own per-pin resolution from
/tmp/sync-pins.log") lived on exactly two root surfaces. The search isclaim-keyed over the umbrella root (submodule paths are separate repos, rule 1):
Both hits are in this diff's touched files, and the post-change sweep is empty —
the two surfaces are the complete set, not merely the two the author chose.
2. The root
.gitignoreomitted the local-state classes the umbrella producescharly check run check-all-beds(this repo's root roster) writes.check/intothe umbrella root, but the root
.gitignoreignored none of the local-stateclasses charly does, so
git statusread permanently dirty after a roster run.Added
.check/,.build/,.opencharly/,scratchpad/,.claude/worktrees/,bin/,*.sync-conflict-*, modelled oncharly/.gitignore.The added comment is deliberately precise about the gate boundary: it states
charly task verifydoes not check the root tree (it asserts eachsubmodule's cleanliness), so this is about an honest root
git status, not agate — no false claim.
How tested
Every gate below ran from the committed tree (
b30e448).The umbrella pre-commit gate (the real gate — policy B + harness parity + the
three script self-tests + the opencode plugin contract):
The task surface:
The body builder against the real producer shape (before/after):
Before this change the excerpt produced two
MISSINGlines (pasted in theSummary). After:
task sync: 1 step(s), 0 failed
[pass] run — bump the pins (charly rolls first, then distro-* from its new gitlinks)
Bounded excerpt (SIGPIPE-safe, no caller
head):YAML validity of the touched workflow:
charly task verify— the two assertions this diff can affect pass; theper-submodule-cleanliness assertion is blocked by another session's dirt, which
cannot affect this diff:
Proof the failure is foreign and cannot touch this diff:
The diff touches zero submodules; the failing assertion enumerates
submodule.<name>.pathentries and tests each one's own worktree(
git -C "$path" status --porcelain), so the dirtysdkworktree is anotherconcurrent session's in-progress work (rule 9: never touched). This is the
honest tier cap noted in Change classification.
Rulebook compliance
/charly-internals:git-workflow,/charly-internals:strict-policy,/charly-internals:root-cause-analyzer,/charly-check:checkbefore acting.producer-evidence defect's missed control (a self-test feeding only the retired
shape) is fixed in the same change.
sync.ymlcomments carrying the same falseclaim are swept in this change; the claim-keyed sweep is pasted above. The one
surfaced product defect is routed to its named PR (below), not parked.
self-test call; the authoritative per-pin table stays single-sourced in
sync-pin-evidence.sh.excerpt is bounded without a SIGPIPE-flooding
head.from both surfaces that carried it (sweep pasted above).
feat/branch, no force-push, no direct push tomain.on the committed tree (pasted above).
./charly/bin/charlybuilt from thepinned
charly/submodule.plugin-check,sdk,spec) belong to other sessions and are left exactly as found.Change classification
.gitignore). No submodule gitlink, no Go, no generated artifact.bash hooks/pre-commit+node scripts/check-opencode-plugin.mjs+charly task self-test|harness|policy-byqYAML validation.analysed on a live system— every changed path(
scripts/sync-pr-body.sh, the pre-commit gate's self-tests,.gitignore) wasexecuted live with retained output on the final tree, but the complete
charly task verifygate did not pass (its per-submodule-cleanlinessassertion is blocked by another concurrent session's dirty
sdkworktree, whichthis root-only diff cannot affect). Per the tier table, a complete R10 gate that
did not pass caps the tier here — the top tier is not claimed.
Surfaced product defect — routed to its named owning PR
The investigation also proved a product defect in
opencharly/plugin-task: itscommand:tasktext reporter prints only each step's authoredText, neverResult.Message, so a passingrun:step's output is discarded and a failingstep's diagnostic is invisible. That is why
charly task mapprints no map and areal
syncfailure printed no reason (the swallowedindex.lockcause thissession hit).
This defect is fixed by PR opencharly/plugin-task#5
(
fix(cli): render a step's Result.Message in text mode), already open with itsown R10 (proved RED on the pre-fix reporter, green with the fix). It is not a
submodule of this umbrella (rule 1 forbids editing it here), and this umbrella
change has an explicit exit that does not depend on it: the body's per-pin proof
is the index-derived table, and the producer log is pasted regardless of content.
This is a routed, named cutover — not a deferred follow-up.
Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)