Repository navigation
feat(loader): the threaded seam carries a kind gate as DATA - #324
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)
Review — BLOCKHead SHA: Change class: Go library code — additive wire data ( Security screen: PASS — additive data struct + round-trip test; no secrets, no egress, no guardrail weakening, no supply-chain change, no embedded directives. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
HOLDING opencharly/sdk#523, the SDK half of the RCA's step 3 - this contract must land first.
Agent: lead |
Review — PASSHead SHA: Security screen: PASS Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Successor to #323 (auto-closed at the verdict threshold with this same code; every block was body evidence, and this body now pastes the regeneration output too).
The RCA's step 3, contract half (
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 — which is exactly whycharly box validatecould not see a moved body.KindGatecarries the two things the receiving side needs: the CUE definition path the plugin declared, and the SERVED CUE source that declares it.Threaded.KindGatesthreads them as Clause-D data, so the loader compiles the source in its own context and looks the def up there — no registry query, no base fallback for a declared word, and no second private copy of the schema.Why this is needed now: the vm body move exposed it live.
sdk/loaderkit.ApplyCueDefaultsresolved#Vmfrom the base schema, which no longer holds it, so sixapplyCueDefaultstests failed withfirmware: cannot convert non-concrete value string. The SDK half of this cutover (sdk#523) resolves through the gates first.How tested
The two new tests are the in-tree coverage:
TestThreadedKindGatesAreClauseDDatafails to COMPILE against the pre-cutoverThreaded(noKindGatesfield) and, at run time, if the def/source pair stops surviving the wire;TestThreadedKindGatesAbsentIsInertpins the additive property.The consumer's suite (sdk#523, run locally against this spec) is also green — 19 packages, 0 failures — but that run is NOT pasted here, so this body does not rest on it.
R10 honesty, premise pasted
specowns no deployment bed; its change-class gate is its Go suite plus regeneration:The regeneration is a no-op on this tree — the change is Go-only, so no CUE shape moved.
Rulebook compliance
applyCueDefaultsnon-concrete) was RCA'd to the base-vs-composed resolution, and this is the contract half of its fix. The missed control:cueKindDefresolves a kind through the BASE schema's table and has no notion of a def a plugin declares, so every helper built on it silently assumes the contract owns every body — which was true until a body moved, and is exactly why the failure surfaced as a non-concrete decode rather than a clear "this def is not here". The gate carrier removes the assumption; the SDK leg (feat(loader): the gate resolves through the threaded kind gates first sdk#523) uses it.charly task cue-genis a no-op here (no CUE shape changed).Change classification
Kind: the threaded seam gains a kind-gate carrier (
KindGate+Threaded.KindGates). Purely additive: no existing field changes, and a build that never fills the map behaves exactly as before.Breaking change + rollback: none — the fields are optional and absent-by-default, so every existing consumer compiles and behaves unchanged. Rolling back deletes two declarations nothing else references yet.
Filed issues
None — this closes the contract half of a defect measured in charly's suite.
Files changed
spec/loader_seam.goKindGate(def path + served source) andThreaded.KindGatesspec/loader_seam_gate_test.goAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)