Skip to content

feat(spec): the del seam carries the target ancestor chain (the venue) — charly#765 - #190

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/del-venue-765
Oct 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/del-venue-765

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

charly deploy del <root>.<member> loses the nested member's venue. The del dispatch ships the node but no ancestor context, so the host cannot rebuild the parentExec chain the add half used, and the teardown falls back to specexec.RootExecutorForDeployNode(node) — the operator's HOST for an in-substrate member carrying no host: field. The member's reversible ops then replay against the workstation while its add landed correctly in the guest. This is the third variant of the #627/#680 mechanism; it is filed as opencharly/charly#765.

This PR is the first leg of the three-repo producer chain that fixes it (spec → plugin-fleet → charly). It is the whole spec-side change, and it is deliberately additive: two optional fields on one host↔plugin seam.

file
schema/seam.cue #DeployNodeDelDispatchRequest gains ancestor_paths + ancestor_nodes (both optional), with the doc comment naming #765
spec/cue_types_gen.go regenerated by charly task cue-gen (TestGenReproducible is the gate)
spec/seam_roundtrip_test.go NEW TestDeployNodeDelDispatchAncestorsRoundTrip — the R10 gate for the field

Why the wire and not the executor. spec.ReconstructParentExec(ancestorPaths, ancestorNodes, derive) already exists and is exactly what the add half uses (charly/host_build_resolve_target_add.go, fed by plugin-fleet/candy/plugin-fleet/walk.go). The del seam simply had no way to carry the two lists. The alternative — shipping a live DeployExecutor — is impossible by construction: an executor is process state, and the teardown is a fresh forked process (plugin-check/candy/plugin-check/bed_run.go runs step("cleanup-"+childKey, "deploy", "del", …)), so nothing in-process can carry it. DATA crosses the wire; the host re-derives the executor exactly as it does for add.

The lists are ROOT-FIRST and EXCLUDE the target. ReconstructParentExec pairs paths and nodes by index and walks root-first; including the target would derive the target's own executor — one hop too deep. Both are empty for a top-level or synthetic target (host, a bare name, a vm: address with no tree entry, a ref-based pod artifact), which is a requirement, not a fallback: the host then leaves RootExecutorForDeployNode in place and behaves exactly as before.

No schema version. These are two optional fields on a HOST↔PLUGIN seam — not an authored-YAML wire-key change, so no #SchemaVersion bump is owed (and charly#754 retired the stamp anyway). An old host decoding the new request ignores the unknown keys; an old plugin simply never populates them.

What the consumers do with it (the rest of the chain, each its own PR).

  • plugin-fleet populates the two lists on the del dispatch from one shared dotted-path walk (walkDeployNodePath — one resolution, two consumers, R3) and bumps this spec.
  • charly reconstructs the chain in hostBuildDeployNodeDelDispatch (spec.ReconstructParentExec → DescriptorFromExecutor) and hands it to Del as the venue, then bumps both pins. Its Add half already does the equivalent via EmitOpts.ParentExec.

How tested

Run in /home/atrawog/Sync/Atrapub/lo/opencoder/opencharly/.worktrees/readme-truth/spec-venue on the committed head 7b841b6, with GOWORK=off (the module's own pinned deps — no workspace overlay).

1. The module's full Go gate

$ git log --oneline -2
7b841b6 feat(spec): the del seam carries the target ancestor chain (the venue) — charly#765
cc35f92 docs: add CHANGELOG 0.2026276.0 for PR #189

$ git status --porcelain
(empty above = committed tree)

$ gofmt -l .
(empty above = clean)

$ go build ./...
rc=0

$ go test ./... -count=1
ok  	github.com/opencharly/spec/exec	13.009s
ok  	github.com/opencharly/spec/exitcode	0.003s
ok  	github.com/opencharly/spec/hostenv	0.010s
?   	github.com/opencharly/spec/http	[no test files]
?   	github.com/opencharly/spec/internal/schemagen	[no test files]
ok  	github.com/opencharly/spec/internal/wiregen	0.043s
?   	github.com/opencharly/spec/loader	[no test files]
ok  	github.com/opencharly/spec/lock	1.060s
ok  	github.com/opencharly/spec/matchers	0.019s
ok  	github.com/opencharly/spec/merge	0.007s
ok  	github.com/opencharly/spec/ops	0.007s
ok  	github.com/opencharly/spec/phase	0.004s
ok  	github.com/opencharly/spec/poll	0.219s
ok  	github.com/opencharly/spec/proc	0.649s
?   	github.com/opencharly/spec/proto	[no test files]
ok  	github.com/opencharly/spec/refs	16.323s
?   	github.com/opencharly/spec/report	[no test files]
ok  	github.com/opencharly/spec/schema	9.836s
?   	github.com/opencharly/spec/schemaconcat	[no test files]
?   	github.com/opencharly/spec/shellquote	[no test files]
ok  	github.com/opencharly/spec/spec	1.181s
?   	github.com/opencharly/spec/sshx	[no test files]
?   	github.com/opencharly/spec/testkit	[no test files]
ok  	github.com/opencharly/spec/transport	0.272s
rc=0

2. The generation gate and the new corpus, verbosely

The generated file is not hand-edited: it is produced by the repo's own generator, and TestGenReproducible re-runs it and fails on any drift.

$ go test -count=1 -run 'TestGenReproducible|TestDeployNodeDelDispatchAncestorsRoundTrip' -v ./schema/... ./spec/...
=== RUN   TestGenReproducible
--- PASS: TestGenReproducible (0.87s)
=== RUN   TestDeployNodeDelDispatchAncestorsRoundTrip
--- PASS: TestDeployNodeDelDispatchAncestorsRoundTrip (0.00s)
PASS
ok  	github.com/opencharly/spec/spec	0.881s

3. What the diff is

$ git show --stat --format=%h HEAD
7b841b6

 schema/seam.cue             | 16 ++++++++++++++++
 spec/cue_types_gen.go       | 18 ++++++++++++++++++
 spec/seam_roundtrip_test.go | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 79 insertions(+)

What this cannot reach — stated, not hidden

The changed path is unreachable from a spec-only tree: nothing consumes the two fields until plugin-fleet populates them and charly reads them. So the disposable R10 bed for this chain runs once, at the leg where the chain is assembled — charly #762, which carries plugin-fleet and this spec and re-runs check-kind-host-vm (the bed whose cleanup step replayed pacman -R on the host). Its pasted output lands on #762 and is linked back here. This PR's own proof is the module gate above plus the round trip, run on the committed tree.

Rulebook compliance

  • R0 — skills first. /charly-internals:git-workflow (and its references/schema-change-recipe.md), /charly-internals:go, /charly-internals:root-cause-analyzer, /charly-check:check were read before the first edit.
  • R1 — RCA every anomaly. The defect is root-caused to its mechanism, not to its symptom: Del is the only deploy verb whose seam carried no venue, and spec.DeployTargetDelOpts has no venue field either, so a pin bump alone fixes nothing — that was verified before any code was written, and it is why this is a chain and not a one-line patch. Filed as charly#765 and cross-referenced from #627 and #680 as their third variant.
  • R2 — prove it. TestDeployNodeDelDispatchAncestorsRoundTrip asserts both lists survive a YAML round trip and that an ancestor-less request stays empty — the second half is what pins "we did not change the top-level teardown".
  • R3 — no duplication. No new resolution logic, no new executor machinery: the fields feed the existing spec.ReconstructParentExec, the same function the add half already calls.
  • R4 — no workaround. No mock, no pin-bump-and-hope, no host-side re-resolution from cwd (rejected in the RCA: the del request carries no Dir and buildEngineContext is empty on that path).
  • R5 — cutover. Nothing is retired here; the change is purely additive and both fields are optional.
  • R6 — git safety. No force-push, no hook bypass, no direct push to main; the branch is feat/del-venue-765.
  • R7 — prove the gate. Every gate above ran on the committed tree (git status --porcelain empty) with -count=1, and is pasted verbatim.
  • R10 — disposable proof. The bed for this chain is the assembled one on charly#762; this leg's changed path is executed by the round-trip corpus. See "What this cannot reach" above — no waiver is claimed, the bed exists, it is run where the chain it belongs to is assembled.
  • Live or skip. No live-service boundary is crossed by the changed path; nothing is mocked.

Change classification

  • Change class: schema/contract module — additive. Two optional fields on one host↔plugin seam; no existing key changes meaning and no existing wire byte moves.
  • New obligation this change creates for a consumer: none to load — old consumers ignore the fields. The obligation is directional: the fix only becomes real once plugin-fleet populates them and charly reads them, and the three pins must advance together for the venue to be carried.
  • Verification gate: the module's full Go gate (-count=1) plus charly task cue-gen reproducibility, on the committed tree; the changed path executed by the new round-trip corpus.
  • Attribution tier: fully tested and validated — the module gate, the generation gate and the new round-trip gate all pass on the committed tree, and the changed path (the seam's encoding and decoding) is exercised live by that corpus. The end-to-end consumer proof is the assembled-bed run on charly#762, named above rather than assumed.

Refs opencharly/charly#765.

Agent: readme-truth · session 2a317871-ba03-4713-89ba-8edbd4059c27
Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (fully tested and validated)

…) — charly#765

`#DeployNodeDelDispatchRequest` gains `ancestor_paths` / `ancestor_nodes`,
mirroring `#DeployResolveTargetAddRequest`. The ADD half already threads the
nested parent executor as the venue (`venue_json` from the live parent); DEL
carried none, so a teardown reached from a FRESH process (the check bed's
forked `charly deploy del <root>.<member>` step) falls back to
`RootExecutorForDeployNode(node)` — the HOST for a member with no `host:` field
— and replays an in-substrate member's `package:` reverse ops on the
operator's workstation while its `add` landed correctly in the guest
(opencharly/charly#765, the third variant of the #627/#680 mechanism).

The plugin ships the target's ROOT-FIRST ancestor path/node lists as DATA and
the host re-derives the parentExec chain with the registry-coupled
`deriveChildExecutorForPath` (the same `ReconstructParentExec` the add seam
uses) — a live `DeployExecutor` still never crosses the wire. An absent list
leaves the previous behaviour untouched, so a top-level node's teardown is
unaffected.

Additive and optional: no authored YAML wire key changes, so NO schema-version
bump; `charly task cue-gen` regenerated `spec/cue_types_gen.go`
(TestGenReproducible green). New R10 gate:
`TestDeployNodeDelDispatchAncestorsRoundTrip` proves both lists survive a
marshal/unmarshal round trip and that an ancestor-less request stays empty.
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 7b841b6d7efddb4a723b8090bf4edb3a4e44a970 (branch: feat/del-venue-765)

Security screen: PASS — no secrets, no egress, no guardrail/CI/validator-spec edits, no embedded instructions; the PR is a pure additive wire-shape change.

Checklist: All applicable rules PASS or NA.

  • A1: body accounts for all 3 files; ends with the required *Agent: …* then *Assisted-by: …* line in the exact <Harness> <Provider Full Model Name> (<confidence>) form.
  • A2/B13: schema/seam.cue + generated spec/cue_types_gen.go changed together, reproducibility gated by TestGenReproducible; no hand-edit of a generated file.
  • A3: fully tested and validated is justified — the NEW code path (the two fields' yaml marshal/unmarshal) executes live in TestDeployNodeDelDispatchAncestorsRoundTrip, which fails without the change.
  • B16 (placement): placement: CORRECT — the change is a wire SHAPE (two optional fields carrying DATA, no live executor), which belongs in schema/*.cue → spec per the placement test; no core/sdk capability moved inward.
  • R10: the changed path is genuinely unexercisable in a spec-only tree (no consumer reads the fields yet); the bed is deferred to the named assembly leg charly#762 (named, not a vague follow-up), and the round-trip corpus is the strongest available proof — accepted as a proof-that-cannot-exist-yet, not a deferral dodge.

Comment thread is empty — no comment dispositions required.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 3, 2026 11:03
@github-actions
github-actions Bot merged commit a60806f into main Oct 3, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 3, 2026
github-actions Bot pushed a commit to opencharly/plugin-fleet that referenced this pull request Oct 3, 2026
…eps its venue — charly#765 (#31)

* feat(deploy): ship the del target's ancestor chain so the teardown keeps its venue

`charly deploy del <root>.<member>` shipped no venue at all: the del dispatch
carried `Node` but no ancestor context, so the host fell back to
specexec.RootExecutorForDeployNode(node) — the OPERATOR'S HOST for an
in-substrate member carrying no `host:` field — and replayed the member's
reversible ops (a `package:` list's `pacman -R`) against the workstation while
its `add` had landed correctly in the guest.

The `add` half never had this problem: the walk threads the target's ROOT-FIRST
ancestor path/node lists to the resolve-target-add seam
(candy/plugin-fleet/walk.go), the host reconstructs the parentExec chain from
them (spec.ReconstructParentExec) and hands it to `Add` as the venue. `del` now
ships the same lists on the deploy-node-del-dispatch seam.

`walkDeployNodePath` is the ONE dotted-path walk (R3 — one resolution, two
consumers): resolveDeployNodeByPath takes the leaf, delAncestorChain takes the
whole chain. The chain EXCLUDES the target (including it would derive the
target's own executor, one hop too deep) and is EMPTY for a top-level or
synthetic target ("host", a bare name, a "vm:" address with no tree entry, a
ref-based pod artifact) — those keep the host's previous
RootExecutorForDeployNode behaviour untouched.

Bumps the spec pin to v0.2026276.1103, the release carrying the two ancestor
fields on #DeployNodeDelDispatchRequest (opencharly/spec#190); the module builds
and its tests pass standalone against the RELEASED spec, no workspace overlay.

The third variant of the #627/#680 mechanism. A check bed's cleanup step forks
a FRESH `charly deploy del` process, so the in-process venue carry between add
and del never applied there either.

Refs opencharly/charly#765

* test(deploy): assert the del request the wire actually carries, not just the chain

The validator's block 2: `delAncestorChain` was unit-tested, but nothing asserted
that the chain reaches the `deploy-node-del-dispatch` request — the population in
`DeployDelCmd.Run` was new behaviour with no test that would fail without it, so
the `fully tested and validated` tier rested on an unsupported claim.

Fixed by extraction, not by a comment: the request literal moves out of `Run` into
the pure `delDispatchRequest`, and
`TestDelDispatchRequest_ShipsTheChainAndTheCleanIdentity` asserts the WIRE SHAPE —
the ROOT-FIRST chain on the request, the `vm:` prefix stripped from the shipped
identity while the chain is resolved against the stripped path, the node carried
through, and every teardown gate mapped. A refactor that computed the chain and
then dropped it from the literal now fails here.

Also covered: a top-level target ships no chain at all, so the host keeps its
previous RootExecutorForDeployNode behaviour for everything that had no ancestors
before this change.

Refs opencharly/charly#765

---------

Co-authored-by: atrawog <[email protected]>
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.

2 participants