Skip to content

feat(load)!: read the opaque body the contract now sends - #11

Merged
github-actions[bot] merged 9 commits into
mainfrom
feat/wire-opaque-body-v3
Nov 14, 2026
Merged

github-actions[bot] merged 9 commits into
mainfrom
feat/wire-opaque-body-v3

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Successor to #10 (auto-closed at the verdict threshold with this same commit; the R0/R4 answers and the head-accurate stat are in this body).

Successor to #9 (auto-closed at the verdict threshold with this same commit; every finding was body accounting, and this body is regenerated from the head's own git diff --stat).

opencharly/spec#322 collapsed the load wire: #StructuralKindLoadEnv.members carries bytes and #StandaloneLoad carries shape plus ONE opaque body, so the authored #Deploy / #Box / #Candy / typed-template arms are gone.

This plugin follows it — and the one place it threads authored members now DECODES them from bytes into the contract's projection before they join the ordered tree (visible in plugin.go, covered by TestInvokeReconstructsMemberTree). Nothing about the wire's discriminator moved: shape keeps its four values, so the arm still selects by shape and only the carrier changed.

Why this shape and not a compatibility field: the RCA (PROGRAM/schema-ownership-rca-rdd.md) found the wire was what kept ten authored bodies in the contract. Its mechanism is one carrier of bytes plus a projection — the plugin never receives the authored node.

Pins brought current to the cutover: spec v0.2026318.2106, sdk v0.2026318.1654 (the sdk bump is load-bearing: its cueKindDefs still named #Vm).

How tested

Real output from this tree:

$ git diff --stat origin/main...HEAD
 candy/plugin-example-structkind/go.mod         | 31 +++++++++++++++++---------
 candy/plugin-example-structkind/go.sum         | 27 ++++++++++++++++++++++
 candy/plugin-example-structkind/plugin.go      |  8 ++++++-
 candy/plugin-example-structkind/plugin_test.go | 17 +++++++++++---
 4 files changed, 68 insertions(+), 15 deletions(-)

$ GOWORK=off go build ./...
build_rc=0

$ GOWORK=off go test -count=1 ./...
ok  	github.com/opencharly/plugin-example-structkind/candy/plugin-example-structkind	0.008s

The suite composes the spec base with this plugin's served CUE unit on every run, so a body that failed to ride the new carrier fails here rather than in a bed.

R10 honesty, premise pasted

$ grep -rn --include=charly.yml 'disposable:' .
$ echo rc=$?
rc=1
$ grep -rn --include=charly.yml 'check:' . | wc -l
1

rc=1 with no lines is the empty result of a REAL repo-wide sweep (-r --include), so no disposable: declaration exists anywhere in this repo: nothing here is autonomously rebuildable, and there is no bed in this repo to run. The single check: match is the candy plan's build-context check, not a bed. The change-class gate for a plugin library is the module suite pasted above, and the changed decode path is exercised by it.

Rulebook compliance

  • R0 — skills first: go for the CUE-generated types the members channel decodes into, plugin for the per-plugin CUE contract, cutover-policy for the hard cutover this pin bump is part of.
  • R1 — this reader compiles only with both pin bumps: spec for the opaque carrier, and sdk because its cueKindDefs table names the pre-unit-8 defs; the green suite above is the proof. No failure output is claimed beyond what was measured here.
  • R2 — one decode site for the members channel; no second path builds the tree from nodes.
  • R3 — no compatibility field, no dual carrier.
  • R4 — N/A — this change touches no documentation surface; the plugin's behaviour and its docs are unchanged, only the wire it reads.
  • R5 — the old field reads are deleted, not branched.
  • R6 — a worktree off fresh origin/main; one substantive commit plus the review-round commits this PR documents.
  • R7 — the suite's member-tree test fails without the decode (it cannot even compile against the old map[string]*spec.Deploy)
  • R8 — N/A, no service boundary.
  • R9 — the build is the worktree-local module.
  • R10 — the suite, pasted.

Change classification

Kind: the plugin reads the contract's opaque load carrier instead of the deleted authored arms, and its spec/sdk pins advance to the cutover.

Breaking change + rollback: none for this repo's consumers — the same kind word is served with the same behaviour; the wire it reads changed in the contract, and that is the pin this commit takes. Rolling back restores the typed-arm reads, which only compile against the pre-#322 contract.

Filed issues

None — the one anomaly (the stale sdk pin) is fixed here.

Files changed

file what changed
candy/plugin-example-structkind/plugin.go the members channel decodes bytes into spec.Deploy before it joins the ordered tree
candy/plugin-example-structkind/plugin_test.go the members literal becomes map[string]spec.RawBody, one member carries a distinguishing from: field, and the test asserts the decoded node holds it (a no-op decode can no longer pass)
go.mod / go.sum the two pins this cutover needs (spec v0.2026318.2106, sdk v0.2026318.1654) plus what go get pulled with them: the go directive to 1.26.8, six new indirects (ociregistry, go-digest, image-spec, go-internal, oauth2, x/sync) and the bumps grpc 1.83.2, genproto, protobuf, x/{net,sys,text}, go-toml 2.4.3, yaml 3.0.5 — all transitive, none used by this plugin's own code. go.sum keeps the superseded spec/sdk h1: lines because go mod tidy is not run in this repo's gate

Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

aitrawog added 9 commits November 14, 2026 22:09
opencharly/spec#322 collapsed the load wire: #StructuralKindLoadEnv.members carries bytes and
#StandaloneLoad carries shape plus one opaque body, so the authored Deploy/Box/Candy/Template
arms are gone. This kind plugin echoes the body verbatim (a consumer that needs a field decodes
it into its own value or the contract projection) and, where it threads authored members,
decodes them from bytes.

Pins brought current to the cutover: spec v0.2026318.2106, sdk v0.2026318.1654.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Round 3: both members fed {} and the assertions watched only names and positions, so any
decode - including one that dropped the bytes - passed. One member now carries from:
postgresql:16 and the test asserts the contract node holds it.
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 0e982fbf0e95bc52d9444caf1103e6b7524c8d17 (branch: feat/wire-opaque-body-v3)

Security screen: PASS
Checklist: All applicable rules PASS or NA. Body accounting matches the diff exactly (4 files, +68/−15; all four files and every pin bump accounted for); the changed decode path is exercised by a test that fails without it; no disposable: target exists in-repo (executed sweep pasted); placement is CORRECT (capability stays in the candy plugin, no core/sdk import added); footer ends with the Assisted-by: line and names predecessors #10/#9. Comment thread empty — nothing to disposition.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 14, 2026 22:37
@github-actions
github-actions Bot merged commit 21fe4b6 into main Nov 14, 2026
5 of 6 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant