Skip to content

feat(spec): add Deploy.VolumeProjectChecked wire field - #96

Merged
atrawog merged 2 commits into
mainfrom
fix/deploy-volume-project-checked
Jul 24, 2026
Merged

atrawog merged 2 commits into
mainfrom
fix/deploy-volume-project-checked

Conversation

@atrawog

@atrawog atrawog commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Adds Deploy.VolumeProjectChecked — a new persisted "charly-written state, never authored" bool field on #Deploy (schema/deploy.cue), following the exact resolved_port/resolved_image pattern (same file, same comment convention, same non-authored treatment). Companion to opencharly/charly#183 round 3: resolveDeployVolumes (candy/plugin-deploy-pod) needs an explicit "the project's volume declaration was already consulted for this deploy key" bit, because the per-host overlay entry the field lives on is ALSO written by unrelated charly config stages (the port-resolution block, persistResourceCaps) before the volume fallback ever runs — so overlay-key existence alone cannot distinguish "an unrelated write already happened, project never consulted" (silently drops a ported deploy's project-declared volume on its first config — the BLOCKING regression this closes) from "the project was consulted and genuinely declares nothing" (must not re-query on every subsequent config).

  • schema/deploy.cue: volume_project_checked?: bool @go(VolumeProjectChecked), placed immediately after resolved_port/resolved_image.
  • spec/cue_types_gen.go: regenerated via task cue:gen (2-file diff, reproducible — a second run produces no further changes).

Change class

charly-or-sdk Go (schema/codegen only — no proto/wire-RPC change, no runtime logic in this repo)

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: standalone module verification (GOWORK=off go build/vet/test) + the task cue:gen reproducibility gate. This repo carries no runtime beds of its own; the consuming behavior is proven by the companion opencharly/charly#183 PR's disposable-bed R10 (check-enc-pod + the new check-enc-port-pod).
  • Eval beds run: N/A (sdk carries no check beds) — the consuming PR's beds are the authoritative runtime proof; see opencharly/charly#183.
  • Fresh rebuild: N/A (no binary produced from this repo); task cue:gen was run fresh and is reproducible (see below).
  • Did the CHANGED code path execute live? The generated field is exercised by opencharly/charly#183's Go code (resolveDeployVolumes/persistDeployVolumes) and its own unit + integration tests + disposable-bed R10 — pasted there, not here (this repo's own change is schema+codegen only, no executable logic of its own beyond the generated struct).
  • Concurrency: N/A — no shared-state path touched.
$ task cue:gen
...
cue:gen: regenerated spec/{cue_types_gen.go,vocab_gen.go,version_gen.go}
$ task cue:gen   # second run — reproducibility check
...
cue:gen: regenerated spec/{cue_types_gen.go,vocab_gen.go,version_gen.go}
$ git status --short   # confirms the second run produced NO further diff
(clean)

$ GOWORK=off go build ./...
(clean)
$ GOWORK=off go vet ./...
(clean)
$ GOWORK=off go test ./...
ok  	github.com/opencharly/sdk	0.196s
ok  	github.com/opencharly/sdk/agentkit	0.059s
ok  	github.com/opencharly/sdk/buildkit	0.005s
ok  	github.com/opencharly/sdk/deploykit	0.439s
ok  	github.com/opencharly/sdk/enginekit	0.003s
ok  	github.com/opencharly/sdk/internal/wiregen	0.023s
ok  	github.com/opencharly/sdk/kit	10.300s
ok  	github.com/opencharly/sdk/loaderkit	0.007s
ok  	github.com/opencharly/sdk/proclifecycle	0.381s
ok  	github.com/opencharly/sdk/spec	0.364s
ok  	github.com/opencharly/sdk/targetkit	0.113s
ok  	github.com/opencharly/sdk/vmshared	0.331s

$ gofmt -l .
vmshared/cloud_init_iso.go   # PRE-EXISTING, untouched by this diff (see R5 note below)

Attribution tier

analysed on a live system

Harness rulebook compliance

  • R0 skills: /charly-internals:go (SDD pipeline — schema-before-code, task cue:gen), /charly-internals:strict-policy (R3 — same field-shape pattern as resolved_port/resolved_image, no new shape invented).
  • R1 RCA + zero warnings: the round-3 regression (team-lead's RCA, see the companion charly PR) is the root cause this field exists to fix; go vet/gofmt zero warnings on every touched file (the one vmshared/cloud_init_iso.go gofmt nit is pre-existing and untouched by this diff — see R5 below, not a warning THIS diff introduces).
  • R2 no out-of-scope: this PR's scope is exactly the one field + regen; the consuming Go logic lands in the companion opencharly/charly#183 PR per the standard B2 producer→consumer order.
  • R3 no duplication: the field reuses the EXACT resolved_port/resolved_image "charly-written state, never authored" shape and comment convention — no new pattern invented.
  • R4 no workaround: N/A — a plain schema field addition, no sleep/retry/magic-number/workaround of any kind.
  • R5 hard cutover + grep: no identifier removed or renamed in this PR (pure addition) — grep self-test N/A. The pre-existing vmshared/cloud_init_iso.go gofmt nit predates this cutover (confirmed via git diff --stat showing zero changes to that file in this diff, and git log -1 showing its last touch was an unrelated prior commit e6b0208) and is tracked for the next lint-sweep thematic batch per the Cutover Sizing Law — non-blocking per R2's separability test (this PR's own claim — "the field exists, compiles, regenerates reproducibly" — holds true regardless of that unrelated nit).
  • R6 git safety: git status/git branch checked before branching; no destructive git action taken.
  • R7 runtime gate: N/A for this repo (no runtime beds); the consuming PR's R7 gate is opencharly/charly#183's disposable bed run.
  • R8 artifact invariants: N/A — no OCI-label/Containerfile-generation change.
  • R9 binary == source: N/A — no binary produced from sdk alone.
  • R10 disposable + coverage: N/A for this repo directly — see the companion PR for the disposable-bed proof this field enables. This repo's OWN acceptance is the reproducibility gate (task cue:gen run twice, zero further diff) + the full standalone test battery, both pasted above.
  • RDD / ADE / SDD: SDD — this IS the schema-first pipeline: the CUE def is the single source, task cue:gen is the sole generator, no hand-written wire type added (the field lands in the SAME generated #Deploy struct every other field does). RDD: the shape (a plain optional bool, no disjunction) was already proven safe by the two existing sibling fields (resolved_port/resolved_image) — no new spike needed, this is the well-trodden pattern. ADE: N/A (no candy plan:/description: change).
  • Hard cutover: one atomic commit, no deferred scope, no schema-version bump (correctly — this is non-authored charly-written state, not an authored-surface breaking change; a migration/version bump here would be WRONG, per the operator's explicit confirmation on the companion PR).
  • Kernel/plugin boundary law: N/A — sdk schema/spec is the shared wire-type layer every plugin consumes; adding one optional field to an existing generic #Deploy envelope is not a kernel/plugin boundary concern (it doesn't introduce a per-kind branch anywhere).
  • Disposable-only autonomy: N/A — no destroy/rebuild performed.
  • Clean architecture + Go gates: gofmt -l . clean except the documented pre-existing nit; golangci-lint run ./... 0 issues; go vet ./... clean; go test ./... green (all pasted above).
  • CHANGELOG: CHANGELOG/2026.205.1000.md staged (placeholder CalVer; the pr-validator finalizes it at merge).

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (analysed on a live system)

Companion to opencharly/charly#183 round 3. resolveDeployVolumes
(candy/plugin-deploy-pod) gated its project-declared-volume fallback on
per-host overlay-key EXISTENCE, but the same overlay entry is also written
by unrelated charly config stages (the port-resolution block,
persistResourceCaps) before the volume fallback ever runs -- so overlay-key
existence cannot distinguish "an unrelated write already happened, project
never consulted" (silently drops a ported deploy's project-declared volume
on its first config) from "the project was consulted and genuinely
declares nothing" (must not re-query on every subsequent config).

Adds volume_project_checked?: bool @go(VolumeProjectChecked) to #Deploy,
same "charly-written state, never authored" pattern as resolved_port/
resolved_image. Regenerated via task cue:gen -- reproducible, no further
diff on a second run.

GOWORK=off go build/vet/test ./... clean. gofmt -l . clean except the
pre-existing, untouched vmshared/cloud_init_iso.go nit (tracked separately).

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
@atrawog

atrawog commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly-or-sdk Go (schema/codegen only)

Independently re-derived against sdk head 7a5e604 in the shared worktree /home/atrawog/Atrapub/o/charly-wt-volfix/sdk. Nothing below is taken on the author's word.

# Check Verdict
0 security & anti-tampering PASS — pure additive optional bool field, no exfiltration/scope-mismatch/weakened-gate/supply-chain concern
1 description complete PASS
2 change-class gate PASS — correctly classified as no-runtime-in-this-repo; the standalone battery IS the gate here
3 attribution tier PASS — analysed on a live system is honest (this repo's own gates ran live; the field's actual behavioral proof rides the companion charly#183/distro-fedora#9 PRs, correctly not claimed here)
4 R0 skills PASS
5 R1 RCA, zero warnings PASS — zero warnings in any gate I ran
6 R2 no out-of-scope PASS — scope is exactly the field; consumer logic correctly left to charly#183
7 R3 no duplication PASS — verified the field is byte-for-byte the same shape/comment convention as the sibling resolved_port/resolved_image fields, no new pattern invented
8 R4 no workaround N/A
9 R5 hard cutover + grep N/A — pure addition
10 R6/R8/R9 N/A
11 R10 N/A here — this repo carries no beds; the field's runtime proof is distro-fedora#9's bed, independently confirmed in my own re-run (see that PR)
12 RDD/ADE/SDD PASS — SDD: this IS the CUE-first pipeline; I independently re-ran task cue:gen and confirmed git status clean afterward (genuine no-op, not just the pasted claim). No hand-written wire type — the field lands in the same generated #Deploy struct as every sibling field
13 concurrency + anti-cheat N/A
14 hard cutover PASS — one atomic commit, correctly NO schema-version bump (charly-written state, not an authored surface — matches the resolved_port/resolved_image precedent)
15 ARCHITECTURE GATE N/A — sdk is the contract module itself; this is a sanctioned wire-envelope field addition
16 disposable-only autonomy N/A
17 clean architecture + go gates PASS — independently re-run: gofmt -l . clean except the same PRE-EXISTING vmshared/cloud_init_iso.go nit I've now confirmed unrelated to this cutover across multiple prior validations in this chain (unchanged since before 93d5632); GOWORK=off go build/vet/test ./... all green; go mod tidy no diff; go mod verify clean; golangci-lint run ./spec/... 0 issues
18 CHANGELOG present PASS — CHANGELOG/2026.205.1000.md: filename/H1 format correct, no collision with anything on main

Comments considered: none.

Cross-PR interactions considered: no other open PRs on opencharly/sdk. This PR is the sdk-leg producer for the companion opencharly/charly#183 consumer (not yet re-opened for this round) and opencharly/distro-fedora#9 (the bed proving this field's behavior) — verified-non-blocking for this PR's own merge (B2 producer-before-consumer order; this leg has no dependency on either).

Decision: APPROVE. Clean, correctly-scoped, pattern-matched schema addition. Proceeding to finalize the merge-time CalVer, merge, and tag.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)

pr-validator merge-time version stamp for PR #96.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
@atrawog
atrawog merged commit a0d10c0 into main Jul 24, 2026
@atrawog
atrawog deleted the fix/deploy-volume-project-checked branch July 24, 2026 10:21
atrawog added a commit to opencharly/charly that referenced this pull request Jul 24, 2026
…ecked (round 3)

team-lead's independent RCA of round 2 found a cross-stage ordering hole:
config_setup.go's port-resolution block runs BEFORE resolveDeployVolumes
and writes the per-host overlay entry (ResolvedPort) the moment a deploy
has ANY container port -- so on a PORTED deploy's first charly config,
round 2's !ok-gated fix saw the port block's write, concluded "already
configured", and silently dropped the project-declared volume again.
Overlay-key existence cannot distinguish "an unrelated write already
happened" from "the project was consulted and genuinely declares
nothing" -- both produce an identical "key exists, Volume empty" shape.

Fix: a new persisted marker, Deploy.VolumeProjectChecked (companion
opencharly/sdk#96, merged a0d10c02, tag v0.2026205.1021), following the
resolved_port/resolved_image "charly-written state, never authored"
pattern. resolveDeployVolumes now gates its project fallback on this
explicit bit instead of overlay-key presence; persistDeployVolumes sets
it unconditionally after every project consult (found or not), closing
both round 2 (re-query every config) and round 3 (port block masking the
consult) regressions with one bit.

New live fixture: check-enc-port-pod (companion opencharly/distro-fedora#9,
merged 8c1f9d3f, tag v2026.205.1021) -- reuses the web candy (has a port,
auto-allocated, no hardcoded host port) + a project-declared encrypted
volume, since check-enc-pod alone (port-less check-pod image) never
exercises this ordering hazard.

Coverage: TestResolveDeployVolumes_PortedDeployProjectVolumeAppliedOnFirstConfig
(unit) + TestConfigFlow_PortResolutionThenResolveDeployVolumes_ProjectVolumeStillApplied
(INTEGRATION -- replicates the actual port-block-then-volume-resolve
sequence via real kit.ResolveDeployPorts, not just isolated calls) --
both verified to FAIL against the round-2 (!ok-gated) code and PASS
against this fix (confirmed via a temporary swap-in/swap-out).

R10: check-enc-pod (12/12, re-confirming rounds 1-2) + check-enc-port-pod
(12/12, 13/13 check-live steps -- the round-3 fix's live proof), both
against a fresh binary + fresh rebuild gate. Both sdk and box/fedora
gitlinks repointed to their MERGED shas (not branch tips); charly/go.mod's
sdk require bumped to v0.2026205.1021 to match.

Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
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