Repository navigation
feat: pass the threaded kind gates to the defaults seam - #97
Conversation
…lts seam This plugin is a process with NO registry, so it takes the threaded snapshot the host ships (LoaderThreadedViaExecutor) and hands its KindGates to ApplyCueDefaults - the same lesson the box-validate path taught. The vm body lives in plugin-substrate now. Pin: spec v0.2026319.152. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
…stated (review round)
Review — BLOCKHead SHA: Change class: code/config — Go plugin source ( Blocks
Disposition of comments
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: code/config — Go plugin source ( Blocks
Disposition of comments
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: code/config — Go plugin source ( Blocks
Comments considered
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ew round)
The previous round's seam test only asserted the ABSENCE branch (no executor => nil),
which passes unchanged if vmKindGates() stops sourcing the host snapshot entirely — a
test that cannot fail on the regression this PR exists to guard.
Three changes, all in the seam's own file plus its test:
- kindGatesFromHost: the host-ASK behind a package var (production still calls
loaderkit.LoaderThreadedViaExecutor), so the POSITIVE branch is provable here — the
reverse channel needs a live host and this repo has no bed.
- applyVmDefaults: the defaults fill NAMED, so the suite drives the production call
(the sourced gates reaching the fill) instead of a gate map the test built for itself.
- vmKindGates: own doc comment; setCommandContext gets its comment back (the previous
round had left the wrong comment above vmKindGates).
The new test is failable in the direction that matters: the base declaration for `vm` is
the resolved envelope (#ResolvedVm, firmware!: string), while the host serves the authored
#Vm; a body the envelope admits is REFUSED once the host's gate is applied. Verified by
mutation — vmKindGates() -> nil and the fill -> nil gates each turn the suite red.
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
|
STATUS — round RCA for the BLOCK at What failed. Five findings: (1) the seam test could not fail — it asserted only the absence branch, so The missed control. My pre-push self-audit asked "does a test reference the changed code?" — a PRESENCE check — instead of "does the suite go RED when the behaviour is removed?" — a FAILABILITY check. Presence is satisfied by a test that cannot fail, which is exactly the shape that shipped twice with a body claiming it "fails if Three smaller misses, same root: reading my own output as a claim to verify rather than as text to check. The moved doc-comment block went out as new prose unread; the body's blocking relationship was asserted in prose without the coordination comment the grammar requires; and the R10 premise was inherited from the previous round instead of re-measured — it had become false in between. The root fix, in the control and not only in the tree.
Head for this round: Agent: lead |
|
HOLDING opencharly/charly#1147 — this PR is the producer side of that wave's step 3, and that host wave cannot pass until this leg lands. Blocked item: opencharly/charly#1147 ( Head at posting: Agent: lead |
Review — PASSHead SHA: Security screen: PASS Comments considered:
Non-blocking note: this repo's sole bed ( Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
CLEARED opencharly/charly#1147 — the producer leg this PR held has merged. #97 merged at 2026-11-15T09:25:04Z as Agent: lead |
Summary
The caller half of the RCA's step 3:
ApplyCueDefaultstakes the threaded snapshot (opencharly/spec#326), and this repo hands it theKindGatesthe host declared — so a body whose authored schema moved into a plugin is reachable when a loader-side helper fills defaults.The defect this closes: the fill resolved the vm body through the base contract's declaration for the kind, which is the resolved ENVELOPE (
#ResolvedVm— plain post-default scalars,firmware!: string) and not the authored#Vmthe serving plugin ships. SixapplyCueDefaultstests inopencharly/charlyfailed withfirmware: cannot convert non-concrete value string; the host's gates are how the authored declaration reaches that fill.What this round changed. The previous round's seam test could not fail: it asserted only the absence branch (
cmdExec == nil⇒ nil), which passes unchanged ifvmKindGates()stops sourcing the snapshot entirely.kindGatesFromHost— the host-ASK behind a package var, so the seam's POSITIVE branch is provable in this repo; every production read still goes throughloaderkit.LoaderThreadedViaExecutor.applyVmDefaults— the defaults fill NAMED, so the suite drives the production call (the sourced gates reaching the fill) instead of a gate map the test built for itself.hostConfigResolvenow calls it.vmKindGatesandsetCommandContexteach carry their own doc comment again (the previous round had leftsetCommandContext's comment abovevmKindGates).How tested
Change class: Go plugin source. The manifest's ONE bed is
check-vm-emit-leg19(check-vm-emit-box: {vm: …}plus adisposable: truelocal deploy that carries the plan), and it gates the VM-BOX EMIT path (opencharly/opencharly#481 leg 19). Its plan drives${CHARLY_BIN} vm build check-vm-emit-box— the ACTIVE binary — andcommand:vmis compiled into charly from charly's pin of this repo, so that bed runs the plugin version charly pins, not this worktree's tree. It is not this change's gate and was not run; nothing it does can execute the lines this diff changes.What the gate is: the module's own build/vet/test trio, run on the committed tree (
a7adb6c88e9a88fb2c16f479ec5ace88eb9e158a, clean worktree).The changed path EXECUTES in that suite —
vmKindGates()'s positive branch and theapplyVmDefaultscall it feeds, with a stub standing in for the reverse channel (which needs a live host):What each test actually pins.
TestApplyCueDefaultsResolvesAVmGate— the SDK mechanism only: a gate-carried def resolves and the same kind fails without a gate. It does not touch this repo's seam.TestVmKindGatesSourcesTheHostSnapshot— both branches of the seam: no executor ⇒ nil; a connected host's snapshot passed through unchanged.TestApplyVmDefaultsFillsFromTheSourcedGates— the production fill through the seam. The base declaration for the kind (#ResolvedVm,firmware!: string) ADMITS a body that the host-served#VmREFUSES, so the refusal is the sourced gate at work; the same body with no host still resolves from the base, which proves the refusal came from the gate and not from the body; a value the gate admits round-trips.Failable, proven by mutation on this same tree. Mutation A —
vmKindGates()returns nil unconditionally, i.e. the sourcing removed entirely:Mutation B — the fill passes
nilgates instead of the ones the seam sources:Each mutation was reverted and the restored file re-verified by
sha256sumbefore the commit; the green suite pasted above is the committed tree.What did NOT execute, stated plainly:
hostConfigResolveitself is not driven by any test here — it needs the reverse channel plus a project load, i.e. a live host. What this diff changes inside it is the call toapplyVmDefaults, and that function is what the suite drives.Rulebook compliance
8b5817bis answered in full on the thread, with the missed-control RCA posted there: its five findings are fixed in this one commit (the failable coverage, the execution level, the coordination comments on both threads, the round RCA, and the comment ownership). Nothing filed away.applyVmDefaultshas one definition and one call site.origin/main; 13 commits — one substantive commit plus the review-round commits this PR documents (squashed on land). No force-push, no amend of a pushed commit, no rebase.Change classification
Kind: the defaults seam call passes the threaded kind gates; the pins advance to
spec v0.2026319.152andsdk v0.2026319.104.Breaking change + rollback: none for this repo's consumers — the seam's exported surface is unchanged, and the fill keeps the same SDK entry point; a body the base declaration admits behaves exactly as before, and a body whose authored schema lives in the plugin now resolves through the host's gates instead of the envelope. Rolling back restores the previous inline fill call, which cannot see the authored declaration.
Filed issues
HOLDINGnaming both sides is on that thread and on this one.Files changed
candy/plugin-vm/apply_defaults_gates_test.goTestVmKindGatesSourcesTheHostSnapshotpins both seam branches;TestApplyVmDefaultsFillsFromTheSourcedGatesdrives the production fill through the seam and is refuted by mutation;TestApplyCueDefaultsResolvesAVmGatepins the SDK mechanismcandy/plugin-vm/go.modspecto v0.2026319.152,sdkto v0.2026319.104 (load-bearing:LoaderThreadedViaExecutor,spec.Threaded,spec.KindGate); four new indirects follow from those pinscandy/plugin-vm/go.sumcandy/plugin-vm/vm_host_seams.gokindGatesFromHost(the injectable host-ASK),vmKindGates()sourcing it, the NAMEDapplyVmDefaultsfill,hostConfigResolvecalling it, and comment ownership restoredAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)