Repository navigation
feat(loader): the defaults seam takes the threaded snapshot - #326
Conversation
The RCA step 3 (PROGRAM/schema-ownership-rca-rdd.md §3 I2/I3/I4): a gate a plugin DECLARES must be reachable from a process that holds no plugin registry. KindGate carries the servable CUE source plus the definition path, and Threaded.KindGates threads it as Clause-D data, so the receiving side compiles it locally instead of growing a second private schema. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Round 1 caught a real Go doc-comment defect: the new type was inserted between the Threaded doc block and the struct, hijacking the comment. It now precedes that block. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Round 2 asked for in-tree coverage of the new fields: the first test fails to COMPILE against the pre-cutover Threaded and fails at run time if the def/source pair is dropped; the second pins the additive property every existing consumer relies on. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
ApplyCueDefaults(kind, out, t Threaded) - a body that moved into a plugin is reachable only through t.KindGates, so the snapshot is part of the contract exactly as it is for the sibling loader seams. The two callers (plugin-loader, plugin-vm) pass theirs in the wave that follows. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: code — one Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — the only diff is an interface signature + doc comment in Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Successor to #325 (auto-closed at the verdict threshold with this same change; the body now answers every prior finding: the tier, the named defect, the pasted failure, and R9 as N/A).
The RCA step 3's last contract piece:
ApplyCueDefaults(kind string, out any, t Threaded).A body that moved into a plugin is reachable only through
t.KindGates, so the threaded snapshot is part of the seam's contract — exactly as it already is for the sibling loader seams (IsResourceDisc(d string, t spec.Threaded), the deploy-trait and structural-field lookups). A two-argument signature made the gate unreachable to the one helper that needs it, which is whyapplyCueDefaultsresolved the vm body from the base and produced a non-concrete decode.The wave it opens:
plugin-loader(passest.KindGates) andplugin-vm(fetches its snapshot over the reverse channel withLoaderThreadedViaExecutor) are repointed in their own legs;charlyfillsThreaded.KindGatesfrom the schema set it already compiles. None of those three is validated by this PR — they consume the released contract, and the changed path does not execute until they take this signature. This leg proves compilation and that the existing suite still passes; the behaviour proof belongs to the legs that follow.How tested
R10 honesty, premise pasted
specowns no deployment bed; its change-class gate is its Go suite plus regeneration.Rulebook compliance
opencharly/charly, in the sixapplyCueDefaultstests that exercise this seam:The missed control was a seam signature that made a declared gate unreachable to the helper that needed it.
specships no binary; there is no source/binary parity to prove. (The regeneration no-op belongs to SDD and is covered by the suite.)Change classification
Kind: one interface method gains the threaded snapshot. Breaking for the two implementers/callers (
plugin-loader,plugin-vm) and forcharly's test seam — all repointed in the wave this opens.Breaking change + rollback: the two callers stop compiling until they pass their snapshot; they are repointed in the same wave (producer-first: this merges, then they bump). Rolling back restores the two-argument form, under which the gate can never reach the defaults helper.
Filed issues
applyCueDefaultstests are the measured failure this seam fixes (--- FAIL: TestApplyCueDefaults_FillsFirmware … cannot convert non-concrete value string), and they turn green once this and the follow-on legs are pinned.Files changed
spec/loader_seam.goProjectLoader.ApplyCueDefaultssignature takest ThreadedAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)