fix(jail-lifecycle): make create-only and reject unsafe existing state #23

Closed
clawdie wants to merge 1 commit from clawdie/fix/jail-lifecycle-create-only into feat/oxy-testbed-jail AGit
Owner

Follow-up corrections for PR #22. This branch is stacked on the reviewed pin 537bf39; it does not amend the reviewed commits.

Safety corrections

  • provision and clone are create-only and refuse an existing destination before config, metadata, lineage, permissions, or tenant data changes.
  • destroy no longer synthesizes clawdie:lifecycle=temp. Missing metadata is not proof of a helper-owned partial create.
  • jls is treated as running/stopped/unknown; command failure stops cleanup/destroy before mutation.
  • verify compares normalized clawdie:ip and clawdie:gw against expected configuration.
  • --kind accepts only jail-alias; jail-vnet and bhyve are rejected before mutation.

Regression coverage

scripts/tests/test-jail-lifecycle.sh now covers active and stopped re-clone, create-only provision, protected lifecycle/tenant/binary preservation, untagged destroy refusal, failing jls, IP/gateway mismatch, and unsupported kinds.

Checks

sh scripts/tests/jail-run-test.sh          rc=0, 11 checks
sh scripts/tests/test-jail-lifecycle.sh   rc=0, 10 checks
sh scripts/ci-checks.sh                   rc=0
Follow-up corrections for PR #22. This branch is stacked on the reviewed pin `537bf39`; it does not amend the reviewed commits. ## Safety corrections - `provision` and `clone` are create-only and refuse an existing destination before config, metadata, lineage, permissions, or tenant data changes. - `destroy` no longer synthesizes `clawdie:lifecycle=temp`. Missing metadata is not proof of a helper-owned partial create. - `jls` is treated as running/stopped/unknown; command failure stops cleanup/destroy before mutation. - `verify` compares normalized `clawdie:ip` and `clawdie:gw` against expected configuration. - `--kind` accepts only `jail-alias`; `jail-vnet` and `bhyve` are rejected before mutation. ## Regression coverage `scripts/tests/test-jail-lifecycle.sh` now covers active and stopped re-clone, create-only provision, protected lifecycle/tenant/binary preservation, untagged destroy refusal, failing `jls`, IP/gateway mismatch, and unsupported kinds. ## Checks ```text sh scripts/tests/jail-run-test.sh rc=0, 11 checks sh scripts/tests/test-jail-lifecycle.sh rc=0, 10 checks sh scripts/ci-checks.sh rc=0 ```
fix(jail-lifecycle): make create-only and reject unsafe existing state
All checks were successful
format-check / gates (pull_request) Successful in 15s
d56f75c521
fix(jail-lifecycle): preflight all destination entries and reconcile configured IP
All checks were successful
format-check / gates (pull_request) Successful in 15s
d6060b8930
fix(jail-lifecycle): refuse unowned cleanup targets and untagged clones
All checks were successful
format-check / gates (pull_request) Successful in 18s
c2a910e417
clawdie closed this pull request 2026-10-29 19:42:28 +01:00
All checks were successful
format-check / gates (pull_request) Successful in 18s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/clawdie-iso!23
No description provided.