Repository navigation
feat(ir)!: the candy model carries extract as opaque bytes - #332
Conversation
The SECOND IR field to go opaque, on the pattern #331 established for hook: #CandyModel.extract becomes bytes, so the authored #CandyExtract stops being imported and can move to the plugin that owns the candy body (3.1, I1/D-SCH-7). The wire is unchanged -- the model already serialised as json, and RawBody embeds the same bytes inline. The one consumer (deploykit specCandyAdapter.Extract) decodes. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: schema/IR change in Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
HOLDING — this PR blocks the consumer leg, tracked as opencharly/sdk#532 (the extract half of the same IR cut). Blocked item: The reader set was swept against the consumer's Agent: lead |
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: schema/IR change in Comment dispositions
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…w round) Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS Comments considered
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
The second of
#CandyModel's seven authored-shape fields to become opaque, on the patternopencharly/spec#331established forhook:#CandyExtractstays inspec— it is#Candy's own field, and the same reasoning ashookapplies: what changes is that the IR (#CandyModel) stops importing it and carries bytes instead (DESIGN.md§3.1, I1 / D-SCH-7). The one consumer decodes.The reader set, swept against the consumer's
origin/main:Three sites, two files: the adapter's accessor pair and the
HasContentpredicate.HasExtract/HasContentkeep working unchanged —len()on a nilRawBodyis 0, exactly as on a nil slice — so onlyExtract()needs to decode.Why
extractsecond. §7c's inventory ranks it simplest: the adapter is its only production struct-field reader, and the rendering paths (candy_stage.go,install_build.go) consume it throughlayer.Extract(), so they are unaffected by construction.How tested
The first pasted run is the two targeted tests; the second is the whole package suite, which is what R7 below means by "the package suite run on it".
TestCandyModelExtractIsOpaqueRawJSONis the extract twin of the hook test, and fails the same two ways: ifExtractreverts to[]CandyExtract, or if the bytes stop being the authored JSON array verbatim. Both are the claims this change rests on, so both are pinned rather than described.R10 honesty, premise pasted
A
specschema change: its gate is the generator plus the package suite, both pasted. The runtime proof belongs to the consumer leg, since nothing inspecexecutes this field.Rulebook compliance
/charly-internals:go(SDD /cue-gen),/charly-internals:plugin, and/charly-internals:cutover-policyfor the!subject.origin/mainrather than cited from §7c; it is the control that makes "three sites, two files" checkable.#CandyExtractstays (it is#Candy's), and the IR stops importing it. No duplicate home was created.extractis bytes, and a nil body is the model's own "no extractions" case.#CandyExtracthas a live referent in#Candy).origin/main.Extract RawBody); the FULL package suite runs on it (ok 1.875s), and the twin test trips on a revert.disposable:target; the premise is pasted.Change classification
Kind: a schema (IR) change in
spec. It breaks a consumer that readsCandyModel.Extractas[]CandyExtract— one production site per the sweep, handled in opencharly/sdk#532, which lands after this PR tag exists.Breaking change + rollback: the consumer decode lands in opencharly/sdk#532 after this PR tag exists. Rolling back restores
extract?: [...#CandyExtract]and regenerates; the wire is unchanged either way.Filed issues
Files changed
schema/candymodel.cueextract?: [...#CandyExtract]→extract?: bytes @go(Extract,type=RawBody)spec/cue_types_gen.goExtract []CandyExtract→Extract RawBodyspec/candymodel_hook_opaque_test.goTestCandyModelExtractIsOpaqueRawJSON, the extract twin of the hook testAgent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)