Repository navigation
Description
Summary
One charly box validate on a project directory with CHARLY_PLUGIN_DIR pointing at plugin binary B makes every later box validate on that SAME directory accept a document that the project's own pinned plugin A refuses — while the later run's own log still reports plugin A as the one served. The state is keyed by the project directory (a fresh copy of the identical tree at a new path fails again), it survives cp -a, and it is not visible in the project (a diff -rq of a passing and a failing run's tree is empty).
Measured
Scratch tree: opencharly/eval-omarchy's migrated charly.yml (document sha256 028ccdec…, identical in every copy below). A = this repo's pin plugin-pipeline v2026.294.2124 (its go.mod requires sdk v0.2026294.1003, which cannot parse ${env.…} in a when:). B = plugin-pipeline built from opencharly/plugin-pipeline main + sdk v0.2026294.1520. Driver: charly 2026.295.0418 built from merged charly main c837b661 (plugin-box v0.2026294.21, sdk v0.2026294.1520).
Fresh path, A only — refused, five times (five independently created copies):
$ CHARLY_PROJECT_DIR=/tmp/sdkpin55-oldtry1 /…/charly box validate ; echo rc=$?
… plugin-pipeline … served from …/views/plugin-pipeline-7e653b468306dfff (build sha256:cd517284…); source …/[email protected].…
charly: error: command "validate": validation error: … node "eval-pr-plan": host-value-gated kind "pipeline":
rpc error: code = Unknown desc = step "publish": when: unexpected token Bracket("{") (1:4)
rc=1
Same path, once with B, then A again — accepted:
$ CHARLY_PROJECT_DIR=/tmp/sdkpin55-eval-omarchy CHARLY_PLUGIN_DIR=<B> … box validate ; echo rc=$?
plugin-pipeline: served from baked binary <B> (build sha256:f8b6e614…)
charly box validate: OK — checked 203 candies, 21 boxes, 21 deploys, 7 distros, 7 builders; 0 warnings, 0 errors
rc=0
$ CHARLY_PROJECT_DIR=/tmp/sdkpin55-eval-omarchy … box validate ; echo rc=$?
… plugin-pipeline … served from …/views/plugin-pipeline-7e653b468306dfff (build sha256:cd517284…) <-- reports A
charly box validate: OK — …
rc=0 <-- behaves as B
The last run is the defect: the log names A, and A is the binary whose sdk cannot parse the guard.
It is the path, not global warmth. After B had run on two other paths, a brand-new copy at a new path still refused (three more samples). And a copy made with cp -a from the passing path behaves like a fresh path — so the state is not in the project's files.
What I did not establish. Which cache holds it. I looked for the project path in ~/.cache/charly/plugin-build/index.json, ~/.config/charly/cache/materialized/index.json and the repo/view store (~/.cache/charly/repos/…@v2026.294.2124.view…/candy/plugin-pipeline/go.mod still says sdk v0.2026294.1003, so the view's SOURCE is not poisoned), found no match, and stopped rather than guess. The reproducer is above and exact; the owning cache is the part that needs the owner's knowledge.
Why it matters
This is the same failure class as the defect that motivated opencharly/plugin-pipeline#55: the judgement a manifest meets is decided by a validator the caller did not choose. Here it is worse than a stale pin, because the run REPORTS the pinned validator and silently answers with a different one — so a consumer can be told its manifest validates when the plugin it pinned refuses it.
Blast radius. Any session that runs box validate twice on one project dir with different plugin sets (the normal shape of an instrument A/B, which is exactly how the pin bump that found this was measured), and any harness that validates a tree before and after a plugin change under one path.
Root fix
Whichever component owns that per-path state must include the resolved plugin set (the plugin binary's identity, not only the project's authored pins) in its cache key, or refuse to reuse the entry when CHARLY_PLUGIN_DIR changes; and the "served from" line must describe the plugin actually invoked. A regression test would run the same project path twice, changing only CHARLY_PLUGIN_DIR (and the plugin's observable behaviour), and assert the second run's verdict follows the new binary.
Found while landing opencharly/plugin-pipeline#55 (the sdk pin bump that makes ${env.…} in a when: parse). That PR's own evidence uses one fresh copy per arm to avoid this state, and that protocol is why its OLD→NEW pair is clean.
Agent: sdkpin55
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
Activity