Skip to content

feat(schema)!: give a candy volume a sharing contract and remove the local path - #456

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/volume-sharing
Nov 30, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/volume-sharing

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Implement the merged DESIGN amendment (opencharly/opencharly#1368) in the contract module:

  • #CandyVolume gains sharing (exclusive default, shared for one stored directory per box).
  • #ResolvedCandyVolume, #VolumeMount, #LabelVolumeEntry and #ResolvedVolumeMount carry the
    resolved sharing. The label's sharing is optional, so an exclusive volume keeps the
    pre-sharing label byte-identical.
  • #DeployVolume loses path: the local volume: entry places a declared volume with its
    backing and host location, and never restates the container path or the sharing.
  • _volumeSharing is one closed vocabulary, distinct from #CacheMount's _sharing.

This is the producer leg of the hard cutover. The consumer charly/sdk/plugin PRs bump this tag and
add the charly migrate entry that drops path; no consumer pins this change until that leg
lands.

How tested

Head a95966e08c95a584066ac97ce4dc9281b05f5ebb (git rev-parse HEAD).

charly task cue-gen:

  [pass] run — download and pin protoc + the two Go codegen plugins
      exit=0
task wire-gen: 1 step(s), 0 failed, 0 skipped
  [pass] run — render the proto IDL from CUE and compile the Go stubs
      exit=0
task cue-gen: 2 step(s), 0 failed, 0 skipped
  [pass] run — generate the Go params in-process + schemagen the vocab lists
      exit=0
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
      exit=0

GOWORK=off go build ./... — exit 0.

GOWORK=off go test ./...:

ok  	github.com/opencharly/spec	(cached)
ok  	github.com/opencharly/spec/cache	(cached)
ok  	github.com/opencharly/spec/calver	(cached)
?   	github.com/opencharly/spec/capability	[no test files]
?   	github.com/opencharly/spec/checkhost	[no test files]
ok  	github.com/opencharly/spec/checkstep	(cached)
ok  	github.com/opencharly/spec/climodel	(cached)
?   	github.com/opencharly/spec/clireflect	[no test files]
ok  	github.com/opencharly/spec/container	(cached)
ok  	github.com/opencharly/spec/cuetoolchain	(cached)
ok  	github.com/opencharly/spec/deploy	(cached)
ok  	github.com/opencharly/spec/exec	(cached)
ok  	github.com/opencharly/spec/exitcode	(cached)
ok  	github.com/opencharly/spec/hostenv	(cached)
?   	github.com/opencharly/spec/http	[no test files]
?   	github.com/opencharly/spec/internal/cuesetup	[no test files]
ok  	github.com/opencharly/spec/internal/wiregen	0.030s
?   	github.com/opencharly/spec/loader	[no test files]
ok  	github.com/opencharly/spec/lock	(cached)
ok  	github.com/opencharly/spec/matchers	(cached)
ok  	github.com/opencharly/spec/merge	(cached)
ok  	github.com/opencharly/spec/needsolver	(cached)
ok  	github.com/opencharly/spec/ops	(cached)
ok  	github.com/opencharly/spec/perhost	(cached)
ok  	github.com/opencharly/spec/phase	(cached)
ok  	github.com/opencharly/spec/poll	(cached)
ok  	github.com/opencharly/spec/proc	(cached)
ok  	github.com/opencharly/spec/proto	(cached)
ok  	github.com/opencharly/spec/refs	(cached)
ok  	github.com/opencharly/spec/report	(cached)
ok  	github.com/opencharly/spec/retired	0.075s
?   	github.com/opencharly/spec/retired/cmd/retired-sweep	[no test files]
ok  	github.com/opencharly/spec/schema	(cached)
ok  	github.com/opencharly/spec/schemacompose	(cached)
ok  	github.com/opencharly/spec/schemaconcat	(cached)
?   	github.com/opencharly/spec/schemagen	[no test files]
ok  	github.com/opencharly/spec/schemaparams	(cached)
ok  	github.com/opencharly/spec/schemaretag	(cached)
?   	github.com/opencharly/spec/shellquote	[no test files]
ok  	github.com/opencharly/spec/spec	1.326s
?   	github.com/opencharly/spec/sshx	[no test files]
ok  	github.com/opencharly/spec/storeroot	(cached)
?   	github.com/opencharly/spec/testkit	[no test files]
ok  	github.com/opencharly/spec/transport	(cached)

Spike

The schema spike is the design's CUE shape proven by cue-gen, TestGenReproducible and the full
test suite: the generated types round-trip and a clean regeneration is a no-op. There is no
alternative candidate to spike — the merged DESIGN fixes the shape, and the schema is its
projection.

Winner: the CUE shape (#CandyVolume.sharing; #DeployVolume without path) proven by
cue-gen and TestGenReproducible; no alternative candidate survived the design.

Rulebook compliance

  • R0 — /charly-internals:go, /charly-internals:plugin, /charly-internals:design,
    /charly-internals:git-workflow and /charly-internals:strict-policy were loaded before the
    first repository action.
  • R1 — no failure or warning remains; every package passes.
  • R2 — one _volumeSharing vocabulary and one schema shape per field; the label entry is the
    same shape the resolved mount uses.
  • R3 — no workaround: the schema is edited directly and regenerated.
  • R4 — the schema is the product here; no documentation routes around a defect.
  • R5 — path is deleted from the closed schema; the consumer charly migrate entry is the
    producer-first next leg, not a deferred shim in this repo.
  • R6 — the spec worktree was clean before the change and is at
    .worktrees/volume-sharing/spec on feat/volume-sharing.
  • R7 — TestGenReproducible fails if the generated tree differs, and the schema tests fail if
    the shapes change without the generated types; both ran on the committed tree.
  • R8 — no live-service boundary is involved.
  • R9 — no charly runtime binary is changed; the gates use the module's own generator and
    toolchain.
  • R10 — the contract change class's gate is charly task cue-gen plus go build/go test on
    the committed tree; no R10 bed applies to a pure contract change.
  • R11 — the plan map below; the governing design is the merged
    feat(design)!: give a volume a sharing contract and a local placement opencharly#1368.
  • R12 — see ### Spike.

Plan conformance

Winning candidate: the CUE shape (#CandyVolume.sharing; #DeployVolume without path)
proven by cue-gen and TestGenReproducible; no alternative candidate survived the design.

Planned change DESIGN requirement Disposition
#CandyVolume.sharing D-VOL-1 conforms — the candy declares the volume's sharing.
#ResolvedCandyVolume.Sharing D-VOL-1 conforms — the resolved candy volume carries the sharing.
#VolumeMount.Sharing and #LabelVolumeEntry.Sharing D-VOL-1, D-CANDY-8 conforms — the resolved mount and the image label carry the sharing, and the label omits it for exclusive.
#ResolvedVolumeMount.Sharing D-VOL-2 conforms — the resolved project mount carries the sharing.
#DeployVolume path removal D-VOL-2 conforms — the local placement carries only name/type/host; the box owns the path and sharing.
_volumeSharing word list D-VOL-1, D-SCH-1 conforms — one closed vocabulary, distinct from _sharing.
No new kind, verb or mechanism D-LAW-3, D-LAW-8 conforms — fields on existing shapes.

Change classification

Change class: schema (CUE) plus generated Go; no runtime code.

Breaking change + rollback: deploy.volume[].path is removed from the closed schema, so an
authored local volume: entry that carries path is rejected. The charly migrate entry and the
consumer pin bump follow producer-first in the charly/sdk/plugin PRs; until they land, no consumer
pins this tag. Rollback: revert this commit and its tag; consumers stay on the previous spec tag.

Agent: opencharly-77 · Claude Code session 12aa3769-08b4-47ce-81fd-bf539338caaf
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

…local path

The candy's `volume:` entry gains `sharing` (`exclusive` default, `shared` for one stored
directory per box), the resolved and label volume shapes carry it, and the deployment's local
`volume:` entry loses `path`: it places a declared volume with a backing and a host location and
never restates the container path or the sharing.

This is the producer leg of the hard cutover. The consumer charly/sdk/plugin PRs bump this
schema's tag and add the `charly migrate` entry that drops `path`; nothing pins this change until
that leg lands.

Breaking change: an authored `volume:` entry on a deployment that carries `path` is now a
closed-schema error. Rollback: revert this commit and its tag; consumers stay on the previous
spec tag.

Agent: opencharly-77 · Claude Code session 12aa3769-08b4-47ce-81fd-bf539338caaf
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: a95966e08c95a584066ac97ce4dc9281b05f5ebb (branch: feat/volume-sharing)

Security screen: PASS — no injected instructions, no secrets/egress, no guardrail weakening; the change is a declarative CUE/schema edit plus its regenerated Go.
Checklist: All applicable rules PASS or NA. (Diff is internally consistent: each @go-tagged CUE field has a matching generated Go field/comment; DeployVolume.Path is removed from both source and generated type; the changed spec package ran fresh in the pasted go test; cue-gen/TestGenReproducible output is coherent. The Assisted-by model name cannot be re-verified read-only — tool-limited disposition, not a defect. Declarative CUE constraints are self-enforcing, so the contract change's gate is adequately proven by cue-gen reproducibility + build + test.)

Verdict: PASS


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

View action run

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