Repository navigation
feat(schema): add force_stop to #VmSnapshotPolicy — the keeper-stop knob its own error already names - #244
Conversation
…nob its own error already names A VM bed's finalize stops the keeper that holds the golden's exclusive qemu write lock. When the keeper's guest ignores ACPI past the stop grace, that step fails and the bed reports ok: false even though every step that consumes the change passed — and the error it prints tells the reader to use `charly vm stop --force`, a flag no plan step can pass: #VmSnapshotPolicy had no field to carry it. Measured 2026-10-15, distro-omarchy's check-omarchy-pr-vm-anchored (run 2026.288.0449): [snapshot-stop-keeper] FAIL after 3m0.476s "... did not reach a stopped state within the stop grace (still running) — use 'charly vm stop --force' if the guest ignores ACPI ... poll: absolute cap exceeded (cap 3m0s)" while the force path stopped the same domain in 38s, and `charly vm list` shows it `libvirt shut off` — still DEFINED. The venue stays KEPT either way: a force stop releases the process, not the domain definition, which is what this step is for. force_stop?: bool is optional and additive, so no wire key changes and no migration machinery is involved (spec/AGENTS.md). Producer leg of a four-leg cutover whose single R10 witness is distro-omarchy's bed: spec (this) -> plugin-check (honours it, plus a graceful->force fallback) -> charly (pin bump) -> distro-omarchy (declares it, and is the witness). Gate: `charly task cue-gen` (gengotypes + schemagen, and its own reproducibility check) rc=0; gofmt clean; GOWORK=off go build/vet/test ./... rc=0 with 0 failures. Agent: dsh-opencharly Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)
|
BLOCKS — this PR's gate is down org-wide, not this diff. Full RCA, the measured evidence ( This PR is green and waiting; I am not re-running the validator again — each re-run is a counting verdict and on an outage it buys nothing. The four-leg Agent: dsh-opencharly |
Review — PASSHead SHA: Security screen: PASS — one optional Comment intake:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ored` — the consumer leg of charly#934, with the fresh-lane keeper-stop witness (#81) * feat(bed): declare snapshot.force_stop on check-omarchy-pr-vm-anchored The bed's keeper is a full Omarchy desktop. Measured in charly#934 (run 2026.288.0449): every step that consumes the change passed, then `[snapshot-stop-keeper]` failed after the full 3m0s ACPI cap with `did not reach a stopped state within the stop grace`, and the force path released the same domain in 38s leaving it `libvirt shut off` (still DEFINED, so the venue stays KEPT). `#VmSnapshotPolicy` gained `force_stop?: bool` in opencharly/spec#244, so the knob exists and the closed schema accepts it here. This declares it on the anchored bed. Honest state at this head: the field is ACCEPTED but not yet READ — the reader is opencharly/plugin-check#138 (open), `grep -rn 'ForceStop|force_stop'` over plugin-check, charly and sdk finds only the generated struct field in spec/spec/cue_types_gen.go, and the compiled-in plugin needs the charly pin bump that follows it. So this declaration is inert until that leg lands; it is the consumer leg of a four-leg cutover, not a fix on its own. Gate: `charly box validate` rc=0 on this tree, and a typo control (`force_stop_typo: true`) fails rc=1 with `conflicting values {force_stop_typo:true,keep_venue:true,on_finalize:"golden"} and [...#VmSnapshot]` — so the schema boundary accepts this exact key and rejects a wrong one. Refs: opencharly/charly#934, opencharly/spec#244, opencharly/plugin-check#138. Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system) * fix(bed): compose the vm deploy substrate so the anchored bed can deploy at all The bed's plan is only reachable if `deploy add` can reach the guest, and on charly 2026.317.0814 it cannot: run 2026.317.1427 built and created the VM and waited it ready (30.9s / 40.8s / 4m55s), then died 33.09s into `deploy-add` with charly: error: command "deploy": the "vm" deploy substrate is not available in this project — its deploy plugin (plugin-deploy-vm) is not in the candy closure. A `vm:` deploy compiles no primary image plan, so the substrate's ref is never pulled in by a box or candy reference. No entity in this repo composed it — 30 `vm:` deploy entries, zero with the candy in their own closure, on this head and on origin/main alike — so the bed failed before any check step ran and could not reach the keeper stop that this PR's `snapshot.force_stop` declaration changes. Composing it on this bed (the entity this PR already touches) makes the change provable; the repo-wide remainder is filed as distro-omarchy#82 rather than folded in here. The sibling krun bed in opencharly/distro-cachyos carries the same composition, and that is the positive control on the same binary. Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system) * chore(pr): re-freeze the body with the released-binary R10 witness Body-only round: the tree is unchanged from cc6882a (force_stop + the deploy-substrate composition), and this commit exists so the required gate re-runs against the re-keyed body. What the body now carries, measured on the released binary built from charly main d4c1d555 (plugin-check v0.2026317.1844): * the fresh-lane `charly check run check-omarchy-pr-vm-anchored` reaching [snapshot-stop-keeper] with the FORCED argv, and its summary.yml; * the "inert" claim REPLACED: the reader is live (bed_run.go:471), so the declaration is effective and the class is behavioural config on a disposable: true target; * the five-link delivery chain recorded as landed. Agent: fix-112 Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system) --------- Co-authored-by: charly <[email protected]>
Summary
#VmSnapshotPolicygainsforce_stop?: bool @go(ForceStop)— the knob that the keeper-stop's own error message already tells readers to reach for, and that no bed could express until now.Why a knob was needed, measured on the tree that failed (
distro-omarchy'scheck-omarchy-pr-vm-anchored, run2026.288.0449) — every step that consumes the change passed, and the run still reportedok: false, because the finalize's stop could not express the remedy its own message prints:And the force path is safe, proven on a live
disposable: truetarget before any of this was written:The venue stays KEPT either way — a force stop releases the process, not the domain definition — which is exactly what
snapshot-stop-keeperis for (releasing the golden's exclusive qemu write lock after the capture).This is the producer leg of a four-leg cutover, and the chain is the reason it is one change:
plugin-check— the keeper-stop step honours it, and falls back to a force stop when the graceful one fails, reporting which path it took.charly— a pin bump, so the new step reaches a bed at all (plugin-check is compiled in).distro-omarchy— the bed declaresforce_stop: true, and its finalize is the single R10 witness for all four legs.The field is additive and optional, so no authored wire key changes and no migration machinery is involved (
AGENTS.md: a pure@go()annotation preserves the wire key; the closed schema makes an unknown key a hardfield not allowederror, which is why the producer must land before any consumer declares it — hence the order above).How tested
charly task cue-genon this tree, with the worktree-local build (charly version→2026.287.2312), both steps pass including the repo's own reproducibility gate:and the module's own gates (
AGENTS.md):The generated artefact is validated at its boundary: the diff is exactly one field, with the
force_stopwire key, and the secondcue-genrun is a no-op.Rulebook compliance
/charly-internals:go(SDD + the schema-change recipe),/charly-internals:plugin,/charly-check:check,/charly-internals:vm-spec,/charly-internals:git-workflow,/charly-internals:strict-policy; and this repo's ownAGENTS.md(Part II feat(spec): CUE-source ResolvedBox/BuilderMap/AggregatedCandyCaps (#55 step3 unit 3a) #4).--forceis the step that cannot pass it, and every alternative was rejected on measurement, not taste (a graceful→force fallback alone would make every keeper stop pay ~3 min of dead ACPI wait; evicting another session's scratch was refused earlier in this campaign and filed separately). Filed ascharly#934; the field is the producer half of its fix.replace, nogo.workin the shipped tree.origin/main;git statusclean before the commit; branched besidespec#242(feat/plugins-carry) in a disjoint file area, verified before the first edit.Change classification
schema/_common.cue+ the generatedspec/cue_types_gen.go— one optional field on#VmSnapshotPolicy.charly/pr-validatoris the gate; this repo carries no per-repo candy gate.fully tested and validated— the change-class gate (this module's full CI-equivalent) passed on the committed tree, and the emitted artefact was verified at its boundary.Filed issues
opencharly/charly#934— the finding this leg fixes the producer half of (the R10 finalize cannot force-stop a keeper). It closes with theplugin-checkleg, which carries the full evidence and the spike's numbers.opencharly/sdk#400— the sibling finding from the same campaign: a message that names a remedy its caller cannot reach (insufficient free space on /tmp/…vs the$TMPDIRremedy its own comment documents). Left in its own issue, not folded here: it is a different message surface in a different module, and the two share the class, not the fix.Agent: dsh-opencharly
Assisted-by: dsh deepseek-v4.1-flash (fully tested and validated)