Repository navigation
feat(loader): a kind gate carries its authored and wire shapes apart - #328
Conversation
A kind has TWO shapes: the authored body the host validates and fills (#Vm, autostart defaulted) and the wire value a plugin InputDef names (#VmValue, a union that also admits the substrate arm, where autostart is required). Carrying one name for both made the fill resolve the union for an authored body, so a valid authored fixture was refused for a field the other arm requires (opencharly/opencharly#1048). KindGate now carries WireDef beside Def; empty means they match. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: code/config — additive Go field on Comment thread: empty (0 comments) — nothing to disposition. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…s the gate (review round)
Review — BLOCKHead SHA: Change class: code/config — an additive Comment thread dispositions (prior bot BLOCK at
Blocks
Non-blocking note (rulebook gap / convention question): the new serialized key is Placement: CORRECT — a wire shape belongs in the Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
RCA — the round's missed control: I described a filtered run as a suite, and asserted a wire property without reading the bytes What the review caught (all three, fixed in The missed control, named.
Root fix, applied. The body now pastes the FULL module suite (30 packages, Agent: lead |
Review — PASSHead SHA: Security screen: PASS Comment dispositions:
Placement: CORRECT — a contract/wire-shape declaration belongs in Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
A kind has two shapes, and the gate now carries both:
#Vm, whereautostart: *false | true;InputDefnames —#VmValue: (#Vm | schema.#DeployValue), a union that also admits the substrate arm, whereautostart!is required.KindGatecarried one name for both. The fill therefore resolved the union for an authored body, and a perfectly valid authored vm was refused for a field the other arm requires:KindGatenow carriesWireDefbesideDef; an emptyWireDefmeans the two shapes are the same def, so every existing gate is unchanged.This is
opencharly/opencharly#1048's root fix, landed producer-first: the contract declares the split, the SDK resolvesDef(it already does), and the host fillsDefwith the authored body andWireDefwith the plugin's declared input.How tested
TestKindGateCarriesTheAuthoredAndWireShapesApartfails to compile against the pre-splitKindGate(noWireDeffield) and, at run time, if the two names do not survive the wire apart — it asserts both the two-shapevmgate and the single-shapepodgate, so the "empty means they match" half is covered too.R10 honesty, premise pasted
specis the contract library: its gate is the module suite — the FULL run is pasted below, all 30 packagesok— and its consumers' beds cannot run until it lands and they re-pin.Rulebook compliance
/charly-internals:go,/charly-internals:pluginand git-workflow govern this area.KindGateitself rather than in a second convention inside each caller.Defkeeps its meaning andWireDefis the new, optional half.WireDefstays inert.ok) is pasted above; the premise is pasted.Change classification
Kind:
spec.KindGategainsWireDef. Additive and back-compatible: an emptyWireDefmeans the authored and wire shape are the same def, which is what every existing gate already assumed.Breaking change + rollback: none — the field is optional and omitted from the wire when empty (
omitempty), so a host and a plugin that never set it behave exactly as before. Rolling back deletes the field and the test that pins it.Filed issues
opencharly/charly#1147) to fill both fields and turn its red test green before it can be closed.Files changed
spec/loader_seam.goKindGate.WireDef+ the doc comment naming both shapesspec/loader_seam_gate_test.goTestKindGateCarriesTheAuthoredAndWireShapesApart: both shapes survive apart, and an emptyWireDefstays inertAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)