Repository navigation
feat(spec): the del seam carries the target ancestor chain (the venue) — charly#765 - #190
Merged
Merged
Conversation
…) — 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.
Review — PASSHead SHA: 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.
Comment thread is empty — no comment dispositions required. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
charly deploy del <root>.<member>loses the nested member's venue. Thedeldispatch ships the node but no ancestor context, so the host cannot rebuild theparentExecchain theaddhalf used, and the teardown falls back tospecexec.RootExecutorForDeployNode(node)— the operator's HOST for an in-substrate member carrying nohost:field. The member's reversible ops then replay against the workstation while itsaddlanded correctly in the guest. This is the third variant of the#627/#680mechanism; 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.
schema/seam.cue#DeployNodeDelDispatchRequestgainsancestor_paths+ancestor_nodes(both optional), with the doc comment naming #765spec/cue_types_gen.gocharly task cue-gen(TestGenReproducibleis the gate)spec/seam_roundtrip_test.goTestDeployNodeDelDispatchAncestorsRoundTrip— the R10 gate for the fieldWhy the wire and not the executor.
spec.ReconstructParentExec(ancestorPaths, ancestorNodes, derive)already exists and is exactly what theaddhalf uses (charly/host_build_resolve_target_add.go, fed byplugin-fleet/candy/plugin-fleet/walk.go). Thedelseam simply had no way to carry the two lists. The alternative — shipping a liveDeployExecutor— is impossible by construction: an executor is process state, and the teardown is a fresh forked process (plugin-check/candy/plugin-check/bed_run.gorunsstep("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 foradd.The lists are ROOT-FIRST and EXCLUDE the target.
ReconstructParentExecpairs 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, avm:address with no tree entry, a ref-based pod artifact), which is a requirement, not a fallback: the host then leavesRootExecutorForDeployNodein 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
#SchemaVersionbump is owed (andcharly#754retired 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).
walkDeployNodePath— one resolution, two consumers, R3) and bumps this spec.hostBuildDeployNodeDelDispatch(spec.ReconstructParentExec→DescriptorFromExecutor) and hands it toDelas the venue, then bumps both pins. ItsAddhalf already does the equivalent viaEmitOpts.ParentExec.How tested
Run in
/home/atrawog/Sync/Atrapub/lo/opencoder/opencharly/.worktrees/readme-truth/spec-venueon the committed head7b841b6, withGOWORK=off(the module's own pinned deps — no workspace overlay).1. The module's full Go gate
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
TestGenReproduciblere-runs it and fails on any drift.3. What the diff is
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-runscheck-kind-host-vm(the bed whose cleanup step replayedpacman -Ron the host). Its pasted output lands on#762and 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
/charly-internals:git-workflow(and itsreferences/schema-change-recipe.md),/charly-internals:go,/charly-internals:root-cause-analyzer,/charly-check:checkwere read before the first edit.Delis the only deploy verb whose seam carried no venue, andspec.DeployTargetDelOptshas 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 ascharly#765and cross-referenced from#627and#680as their third variant.TestDeployNodeDelDispatchAncestorsRoundTripasserts 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".spec.ReconstructParentExec, the same function theaddhalf already calls.DirandbuildEngineContextis empty on that path).main; the branch isfeat/del-venue-765.git status --porcelainempty) with-count=1, and is pasted verbatim.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.Change classification
-count=1) pluscharly task cue-genreproducibility, on the committed tree; the changed path executed by the new round-trip corpus.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 oncharly#762, named above rather than assumed.Refs
opencharly/charly#765.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (fully tested and validated)