Skip to content

fix(spec)!: adapt box inspect bind_mounts to the volume-sharing contract - #104

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/spec-805-volume-path
Nov 30, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
fix/spec-805-volume-path

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

spec#456 removed DeployVolume.Path (the volume-sharing cutover, D-VOL-2). The compiled-in
plugin-box plugin still read dv.Path in inspectBindMounts, so no charly built on the forward
contract pair (sdk v0.2026334.825 + spec v0.2026334.805) could compile it — dv.Path undefined.
This drops the removed column (the bind-mount row is now name/host/type) and bumps plugin-box's
sdk/spec pins forward to that pair, so the module's own build compiles against the new contract.
The change is proved LIVE in the disposable check-box-local bed: a fresh dev build drives
charly box inspect --format bind_mounts through the binary under test against an isolated overlay
and asserts the 3-column row. A regression test also fails on the pre-cutover tree.

Closes #103

Files

File Change
candy/plugin-box/go.mod sdk v0.2026331.837 → v0.2026334.825, spec v0.2026331.808 → v0.2026334.805 (forward; 805 is the latest v0. spec tag)
candy/plugin-box/go.sum the four hashes for the forward pair
candy/plugin-box/inspect_list.go inspectBindMounts drops the removed DeployVolume.Path column; row is name/host/type
candy/plugin-box/volume_sharing_contract_test.go new regression: spec.DeployVolume has no Path; the reader names no dv.Path and emits a 3-column row
charly.yml new box-inspect-bind-mounts step in the check-box-local bed: drives the live bind_mounts read through the binary under test and asserts the 3-column row

805 is the newest v0. spec tag (a live reading, with the command that produced it):

$ git ls-remote --tags https://github.com/opencharly/spec.git | sed 's#.*refs/tags/##' | grep -v '\^{}' | grep '^v0\.' | sort -V | tail -3
v0.2026332.1206
v0.2026334.723
v0.2026334.805

How tested

Head a69b7527d63ec39ea8e14f850b58c077047793b9 (git rev-parse HEAD), tree
8d69ace0871f1e1217107aed409d747b3be61341. The branch carries the fix commit and the bed-step
commit:

$ git rev-parse HEAD 'HEAD^{tree}'
a69b7527d63ec39ea8e14f850b58c077047793b9
8d69ace0871f1e1217107aed409d747b3be61341
$ git log --oneline origin/main..HEAD
a69b752 test(box): witness inspect bind_mounts live in the check-box-local bed
bee4f91 fix(spec)!: adapt box inspect bind_mounts to the volume-sharing contract

Change-class module gate on the committed tree (candy/plugin-box/):

$ GOTOOLCHAIN=go1.26.8 go build ./... && echo "build ok"
build ok
$ GOTOOLCHAIN=go1.26.8 go vet ./... && echo "vet ok"
vet ok
$ test -z "$(gofmt -l .)" && echo "gofmt clean"
gofmt clean
$ GOTOOLCHAIN=go1.26.8 go test -count=1 ./...
ok  	github.com/opencharly/plugin-box/candy/plugin-box	0.089s
?   	github.com/opencharly/plugin-box/candy/plugin-box/cmd/serve	[no test files]

Fresh rebuild + disposable bed (R10, the changed path executed live)

The change is runtime, so it was proved on a fresh worktree-local dev build (R9) and the
disposable: true bed check-box-local. The binary compiles this plugin from its LOCAL checkout
(--dev-plugin), so the bed exercises the unmerged source:

$ cd /home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box-bed && ./scripts/bootstrap-charly.sh --dev-plugin plugin-box=/home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box
bootstrap-charly: DEV BUILD — NOT A RELEASE BUILD.
bootstrap-charly:   plugin-box=/home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box
bootstrap-charly: built ./bin/charly (2026.334.0823) — DEV BUILD, local plugin source
$ ./bin/charly version
2026.334.0823

The bed run on the committed head — check-box-local is disposable: true, host: local — is
green at zero warnings, and its box-inspect-bind-mounts step PASSED against the live binary:

$ ./bin/charly check run check-box-local
charly check run check-box-local: [check-live] PASS
charly check run check-box-local: PASS (steps=6)
$ python3 -c 'import yaml; d=yaml.safe_load(open(".check/check-box-local/2026.334.0854/summary.yml")); print(d["bed"], d["ok"], d["status"], d["driver_version"], "errors", d["diagnostics"]["errors"], "warnings", d["diagnostics"]["warnings"]); print([c["id"]+":"+c["status"] for s in d["steps"] for c in s.get("checks",[]) if c["id"]=="box-inspect-bind-mounts"])'
check-box-local True PASS 2026.334.0823 errors 0 warnings 0
['box-inspect-bind-mounts:PASS']

The step's own evidence — the changed path's live output, a 3-column name/host/type row with no
container path:

$ cat .check/grammar-arms/box-inspect-bind-mounts.log
binary under test: /home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box-bed/bin/charly
version: 2026.334.0823
invocation: box inspect bx --format bind_mounts (CHARLY_DEPLOY_CONFIG-isolated overlay, one bind volume)
exit: 0
--- output ---
charly: resolving project (first run — may take a moment)...
models	/tmp/charly-bindmounts-models	bind

The step is a witness that can fail, not a vacuous pass: it requires the row to be present (so an
overlay read that reaches nothing fails) and to have exactly 3 fields, so a returned path column
fails it:

$ printf 'models\t/tmp/charly-bindmounts-models\t/data\tbind\n' | awk -F'\t' '{print NF; exit}'
4

Regression test: fails-before / passes-after

The untouched pre-cutover tree (git archive origin/main, old sdk 837 / spec 808) plus only the
new regression test — both tests fail:

$ B=$(mktemp -d); git -C /home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box archive origin/main candy/plugin-box | tar -x -C "$B" && \
  cp /home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box/candy/plugin-box/volume_sharing_contract_test.go "$B/candy/plugin-box/" && \
  ( cd "$B/candy/plugin-box" && GOTOOLCHAIN=go1.26.8 go test -buildvcs=false -count=1 \
      -run 'TestDeployVolumeHasNoPathField|TestInspectBindMountsHasNoDeployVolumePath' ./... )
	github.com/opencharly/sdk v0.2026331.837
	github.com/opencharly/spec v0.2026331.808
--- FAIL: TestDeployVolumeHasNoPathField (0.00s)
    volume_sharing_contract_test.go:22: spec.DeployVolume still exposes field "Path" — the volume-sharing cutover (spec#456, D-VOL-2) removed it; inspectBindMounts must not depend on a container path on the deploy overlay read
--- FAIL: TestInspectBindMountsHasNoDeployVolumePath (0.00s)
    volume_sharing_contract_test.go:45: inspectBindMounts still names dv.Path; spec#456 removed DeployVolume.Path (D-VOL-2) — the container path is not on the deploy overlay
    volume_sharing_contract_test.go:53: inspectBindMounts bind_mounts row is not the 3-column name/host/type form "fmt.Printf(\"%s\\t%s\\t%s\\n\", dv.Name, dv.Host, dv.Type)"
    volume_sharing_contract_test.go:56: inspectBindMounts bind_mounts row still carries the removed path column
FAIL
FAIL	github.com/opencharly/plugin-box/candy/plugin-box	0.005s

The same two tests on this head:

$ GOTOOLCHAIN=go1.26.8 go test -count=1 -run 'TestDeployVolumeHasNoPathField|TestInspectBindMountsHasNoDeployVolumePath' -v ./...
=== RUN   TestDeployVolumeHasNoPathField
--- PASS: TestDeployVolumeHasNoPathField (0.00s)
=== RUN   TestInspectBindMountsHasNoDeployVolumePath
--- PASS: TestInspectBindMountsHasNoDeployVolumePath (0.00s)
PASS
ok  	github.com/opencharly/plugin-box/candy/plugin-box	0.005s

Spike

RCA claim: spec#456 removed spec.DeployVolume.Path, but plugin-box's inspectBindMounts
still printed dv.Path, so the compiled-in plugin cannot compile against the forward spec/sdk
pair (dv.Path undefined).

Candidates spiked:

  • (a) Drop the removed path column (row becomes name/host/type). Instrument: the module build
    against sdk v0.2026334.825 + spec v0.2026334.805, then the live bed above. BEFORE (old code,
    new pins) → dv.Path undefined, rc 1; AFTER → build/vet/gofmt/test green and the
    box-inspect-bind-mounts bed step PASS on the fresh dev build (pasted above).
$ GOTOOLCHAIN=go1.26.8 go build -buildvcs=false ./...      # old inspectBindMounts, forward pair
# github.com/opencharly/plugin-box/candy/plugin-box
./inspect_list.go:132:57: dv.Path undefined (type spec.DeployVolume has no field or method Path)
rc=1
  • (b) Source the container path from the image's ai.opencharly.volume label. Refuted at the
    contract level: D-VOL-2 says a local volume: entry never restates the container path, and the
    deploy overlay this command reads (loaderkit.LoadHostDeployConfigViaExecutor) has no path
    anywhere to source. The forward #DeployVolume carries only these fields:
$ git -C spec show v0.2026334.805:schema/deploy.cue | awk '/^#DeployVolume:/{f=1} f{print} f&&/^}/{exit}'
#DeployVolume: {
	name:         string & !=""
	type?:        or(_deployVolumeTypeWord)
	host?:        string & !=""
	data_seeded?: bool          @go(DataSeeded)
	data_source?: string & !="" @go(DataSource)
}

Reading the image label would make this a different data source and a different command meaning
(image volume inventory, not the deploy overlay), and would restate the path across the D-VOL-2
boundary — not a legal candidate.

  • (c) Keep a Path alias/shim (re-add a field, or accept both shapes). Rejected: it reverses
    the landed spec cutover and widens the schema; the operator direction is fix forward, never repin
    backward.

Winner: (a) — drop the removed column. It is the contract-conforming adaptation (D-VOL-2), and
the live box-inspect-bind-mounts bed step proves the 3-column row on this head's fresh dev build.

RCA verdict: confirmed — (a) works.

Rulebook compliance

  • R0 — loaded before the first repository action: git-workflow (+ references/pre-validator-self-audit.md), strict-policy, root-cause-analyzer, design, charly-internals:go, charly-internals:plugin, charly-internals:cutover-policy, and this repo's own AGENTS.md at origin/main.
  • R1 — the anomaly (charly build dv.Path undefined) is RCA'd in issue inspect_list.go reads DeployVolume.Path, removed by spec's volume-sharing cutover — charly cannot build against spec v0.2026334.805 #103; it is fixed here, the gate has zero warnings, and no separable finding remains.
  • R2 — one canonical adaptation; no sibling copy.
  • R3 — no workaround or shim: the removed field is dropped, not aliased.
  • R4 — no documentation routes around a defect; .agents/skills/inspect/SKILL.md's bind_mounts caveat describes the data source, not the columns, so it stays true.
  • R5 — dv.Path is no longer read in production source; the only dv.Path occurrences are the regression test's negative assertions:
$ git grep -n 'dv\.Path' -- '*.go' ':!*_test.go' || echo "(no dv.Path in production sources)"
(no dv.Path in production sources)
  • R6 — the worktree was clean before the change and git status --short is empty after the commits; no force-push.
  • R7 — the regression fails on the pre-cutover tree and passes on this head, and the emitted row is asserted at its boundary by the live bed step (both pasted).
  • R8 — no live-service boundary is mocked; the bed runs the real binary host-side.
  • R9 — the binary under test is the worktree-local, CalVer-stamped dev build 2026.334.0823, compiled from this plugin's local checkout.
  • R10 — the disposable: true bed check-box-local ran on the committed tree at zero warnings, with the box-inspect-bind-mounts step PASS (pasted).
  • R11 — plan conformance below; D-VOL-2 governs the adaptation; no DESIGN.md/DESIGN.cue/design/ edit.
  • R12 — the spike above; the diff implements the winning candidate.

Plan conformance

Winning candidate: drop the removed DeployVolume.Path column (row is name/host/type), bump the sdk/spec pins forward, and witness the live row in the disposable bed.

Planned change DESIGN requirement Disposition
go.mod: sdk v0.2026331.837 → v0.2026334.825, spec v0.2026331.808 → v0.2026334.805 D-SCH-1, D-VOL-2 conforms — pins the merged contract shapes; 805 is the latest v0. spec tag carrying the volume-sharing schema.
inspectBindMounts row name/host/type (drop path) D-VOL-2 conforms — the local volume: placement carries backing + host and never restates the container path.
charly.yml box-inspect-bind-mounts bed step D-VOL-2 conforms — live witness of the name/host/type row; asserts no path column.
Regression test (spec.DeployVolume has no Path; reader names no dv.Path) D-VOL-2, D-SCH-1 conforms — locks the removed field and the adapted reader.
No new field, shape, kind, verb or mechanism D-LAW-3, D-LAW-8 conforms — a consumer adaptation to a landed shape, not a new mechanism.

Change classification

Change class: runtime Go plugin module (the compiled-in command:box plugin) plus its disposable R10 bed; no schema, CLI or image change.

Breaking change + rollback: charly box inspect --format bind_mounts no longer prints the container-path (fourth) column; the row is name/host/type. The container path now lives on the candy volume and the image's ai.opencharly.volume label (D-VOL-2). Rollback: revert this commit and its merge tag. Do not pin sdk/spec back to restore the column — that reverses the landed volume-sharing cutover, which the org forbids (never repin backward).

Filed issues

None — the change is one adaptation, fully proven under this gate; no separable finding remained.

Agent: pr-sweep · Claude Code session 8df24173-9dbe-4357-a454-8faee0703dea
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

spec#456 removed DeployVolume.Path (D-VOL-2, the volume-sharing cutover);
plugin-box's inspectBindMounts still printed dv.Path, so no charly built on the
forward pair (sdk v0.2026334.825 + spec v0.2026334.805) could compile the
compiled-in plugin. Drop the removed path column and bump the sdk/spec pins
forward. A regression test (reflection on spec.DeployVolume plus a source
invariant on the reader) fails on the pre-cutover tree and passes here.

Agent: pr-sweep · Claude Code session 8df24173-9dbe-4357-a454-8faee0703dea
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: bee4f91a6039740b75411e377642d603ae2b69cb (branch: fix/spec-805-volume-path)
Change class: runtime Go plugin module (compiled-in command:box), cross-repo consumer adaptation.

Comments considered: thread is empty (0 comments) — nothing to disposition.

Blocks

  1. R10 / A2 — runtime change proven only by a bare module go test; the changed runner never executes live. This is a runtime Go code change (it alters charly box inspect --format bind_mounts output), yet the entire "How tested" block is go build / go vet / gofmt / go test on the module — i.e. the exact pattern A2 names as FRAUD for a runtime change ("bare go test, rebuild WITHOUT the changed runner executing"). The body confirms this outright: "no charly binary is built here; the module gate runs on the worktree-local toolchain." R10 requires a fresh charly rebuild and pasted output for the changed piece; none is present. Fix: paste a fresh-rebuild, disposable-bed run for this head showing charly box inspect --format bind_mounts emitting the 3-column name/host/type row at zero warnings, or an equivalent bed that actually exercises inspectBindMounts.

  2. A1 — "How tested" omits the disposable target, fresh-rebuild confirmation, and live-execution output. A1 requires the How-tested block to name the exact change-class gate, the disposable target (disposable: true), the fresh-rebuild confirmation, whether the changed code path executed live, and pasted output. The block names only the module gate, names no disposable target, confirms no charly rebuild, and never states whether the changed path executed live. Fix: supply these in the body (same run as block 1).

  3. R10 / CONC(d) — the "live proof" claim is referenced, not pasted. The body asserts the winner is "byte-identical to the one-line patch issue inspect_list.go reads DeployVolume.Path, removed by spec's volume-sharing cutover — charly cannot build against spec v0.2026334.805 #103's producer leg proved live on the plugin-pipeline check-pipeline-local bed (15/15) before this formalization." That is an asserted live result with no pasted command output for this commit, and it predates the go.mod/go.sum bumps that are also in this diff — so it does not prove the final tree. This also undercuts the R10 "N/A — no bed exercises this path" defense: the body itself says check-pipeline-local exercises the changed path. Fix: paste the check-pipeline-local (or equivalent) run output keyed to this head, or drop the unsupported "byte-identical" claim and re-run.

Everything else checked out (spike present and internally consistent with the 132:57 error and the schema #DeployVolume dump; R5 grep output pasted and matching the diff; tier analysed on a live system honest and not inflated; footer well-formed; placement is candy, correct). The blocking gap is the absent live/bed proof of the changed runtime behavior for the final commit.

Verdict: BLOCK


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

View action run

Address the round-1 BLOCK: the change is runtime, so R10 needs a
fresh-rebuild disposable-bed run of the changed path. Add a
box-inspect-bind-mounts step to the check-box-local bed that drives
`charly box inspect --format bind_mounts` through the binary under test
against a CHARLY_DEPLOY_CONFIG-isolated overlay carrying one bind volume,
and asserts the row is exactly 3 columns (name/host/type) with no path
column (D-VOL-2). Proven green on a fresh dev build (charly 2026.334.0823).

Agent: pr-sweep · Claude Code session 8df24173-9dbe-4357-a454-8faee0703dea
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
@aitrawog

Copy link
Copy Markdown
Contributor Author

RCA — round 1 BLOCK (R10/A2, A1, CONC(d))

Mechanism. The change is runtime (it alters charly box inspect --format bind_mounts output),
but round 1's How tested proved it only with the module gate (go build/go vet/gofmt/go test)
and a referenced prior bed (check-pipeline-local 15/15 from issue #103), keyed to neither this
head nor the go.mod/go.sum bumps. R10/A2 require a fresh-rebuild disposable-bed run of the changed
path; A1 requires the bed, the disposable: true target, the fresh-rebuild confirmation and the
live-execution output in How tested; CONC(d) requires an asserted live result to be pasted for the
head, not referenced.

Missed control. My pre-push self-audit classified the diff as runtime and then accepted the
module gate as the whole R10 because plugin-box declares no per-repo candy gate. It stopped at
"no gate" instead of asking which disposable target exercises the changed function. The
check-box-local bed existed but only drove box validate; nothing drove inspectBindMounts.

Blast radius. A reverted or regressed bind_mounts row would ship in a released charly with
no live witness: the column shape is user-visible, and only a compile error (on the removed
DeployVolume.Path) guards the field today.

Root fix (implemented).

  • Added a box-inspect-bind-mounts step to the disposable: true check-box-local bed. It drives
    ${CHARLY_BIN} box inspect bx --format bind_mounts through the binary under test against a
    CHARLY_DEPLOY_CONFIG-isolated overlay carrying one bind volume, and asserts the row is exactly
    name<TAB>host<TAB>type (3 fields) — it fails on a returned path column, and on an overlay read
    that emits no row (so it cannot pass vacuously).
  • Fresh worktree-local dev build from this plugin's local checkout
    (bootstrap-charly.sh --dev-plugin plugin-box=/home/atrawog/claude3/opencharly/.worktrees/pr-sweep/plugin-box, charly version 2026.334.0823, R9).
  • Ran charly check run check-box-local on the committed head: PASS (steps=6), 0 warnings, the
    new step box-inspect-bind-mounts PASS, output row models\t/tmp/charly-bindmounts-models\tbind.
  • Re-derived the body's How tested from that run; the tier is fully tested and validated.

Fix is in commit a69b7527d63ec39ea8e14f850b58c077047793b9.

Agent: pr-sweep · Claude Code session 8df24173-9dbe-4357-a454-8faee0703dea
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: a69b7527d63ec39ea8e14f850b58c077047793b9 (branch: fix/spec-805-volume-path)

Security screen: PASS — forward pins to org-owned sdk/spec, no secrets/egress, the bed step strengthens (not weakens) the R10 witness; no security machinery touched (T4 NA).
Checklist: All applicable rules PASS or NA (A1–A3, R0–R12, ARCH=candy placement, DISP, QUAL, COORD, HC).

Comments considered:

  • 7273226191 (bot BLOCK, round 1) — stale-superseded: its three findings (no live/bed proof of the changed runner; A1 missing disposable-target/fresh-rebuild/live-output; CONC(d) referenced-not-pasted live claim) are all resolved in the current diff/body — the check-box-local box-inspect-bind-mounts step exists in charly.yml, and the body pastes the fresh dev-build (2026.334.0823) bed run at 0 warnings with the step PASS and the 3-column row.
  • 7273517842 (@aitrawog RCA) — verified-non-blocking: accurately names the missed control (module gate accepted as whole R10) and describes the current state, which the diff confirms.

Non-blocking note: the new step writes its evidence to .check/grammar-arms/box-inspect-bind-mounts.log though it lives in check-box-local; cosmetic path-naming only, does not affect execution.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 30, 2026 08:59
@github-actions
github-actions Bot merged commit 3625073 into main Nov 30, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 30, 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.

inspect_list.go reads DeployVolume.Path, removed by spec's volume-sharing cutover — charly cannot build against spec v0.2026334.805

1 participant