feat(jail): safe Oxy testbed lifecycle candidate #24

Merged
clawdie merged 17 commits from clawdie/merge/oxy-testbed-corrected into main 2026-10-29 19:32:01 +01:00 AGit
Owner

Safe ISO merge candidate for the Oxy testbed feature plus all safety corrections.

This branch contains the reviewed feature pin 537bf39 and the follow-up corrections through d6060b8:

  • create-only provision/clone with destination preflight for directories, dangling symlinks, parent datasets, and exact root datasets;
  • no automatic untagged-jail destroy or synthesized lifecycle tags;
  • tri-state jls handling (running/stopped/unknown) with fail-closed cleanup;
  • normalized IP and gateway verification against readable jail.conf and explicit expectations;
  • only jail-alias accepted; jail-vnet/bhyve rejected before mutation;
  • regression coverage for active/stopped re-clone, destination preflight, protected provision, untagged/failed-jls destroy, IP/gateway mismatch, and unsupported kinds;
  • docs already in stacked PRs.

Do not merge PR #22 alone. This is the single safe ISO merge candidate targeting main.

Checks on the candidate:

sh scripts/tests/jail-run-test.sh          rc=0, 11 checks
sh scripts/tests/test-jail-lifecycle.sh   rc=0, 11 checks
sh scripts/ci-checks.sh                   rc=0

No real jail or dataset mutations were performed during verification.

Safe ISO merge candidate for the Oxy testbed feature plus all safety corrections. This branch contains the reviewed feature pin `537bf39` and the follow-up corrections through `d6060b8`: - create-only provision/clone with destination preflight for directories, dangling symlinks, parent datasets, and exact root datasets; - no automatic untagged-jail destroy or synthesized lifecycle tags; - tri-state `jls` handling (running/stopped/unknown) with fail-closed cleanup; - normalized IP and gateway verification against readable jail.conf and explicit expectations; - only `jail-alias` accepted; `jail-vnet`/`bhyve` rejected before mutation; - regression coverage for active/stopped re-clone, destination preflight, protected provision, untagged/failed-jls destroy, IP/gateway mismatch, and unsupported kinds; - docs already in stacked PRs. Do not merge PR #22 alone. This is the single safe ISO merge candidate targeting `main`. Checks on the candidate: ```text sh scripts/tests/jail-run-test.sh rc=0, 11 checks sh scripts/tests/test-jail-lifecycle.sh rc=0, 11 checks sh scripts/ci-checks.sh rc=0 ``` No real jail or dataset mutations were performed during verification.
feat(jail): add disposable testbed provisioner and lifecycle destroy guard
All checks were successful
format-check / gates (pull_request) Successful in 6s
b9466d1373
Add scripts/jail-testbed.sh (provision|verify|destroy|status) for a metadata-disposable Bastille jail. It writes a local clawdie:lifecycle tag, root-base lineage stamp, 0755 probe-readable directories, and stages the host oxigraph binary into the jail. Provisioning is idempotent and refuses protected names such as cms.

Extend jail-run.sh destroy authorization to accept a non-name-disposable jail when its exact root dataset carries local clawdie:lifecycle=temp, while retaining --allow-production as the explicit override. Add hermetic coverage for the provisioner and the new destroy path, and wire both tests into ci-checks.sh.
test(jail): keep protected-name fixture inside test tempdir
All checks were successful
format-check / gates (pull_request) Successful in 7s
c02401c277
fix(jail): use foreground timeout so jail daemons cannot block create/start
All checks were successful
format-check / gates (pull_request) Successful in 15s
a8ba6e08eb
docs(jail): install companion jail-run with lifecycle helper
All checks were successful
format-check / gates (pull_request) Successful in 15s
2ec5737ab1
fix(jail-lifecycle): normalize clawdie:ip by stripping bastille iface prefix
All checks were successful
format-check / gates (pull_request) Successful in 16s
537bf39a79
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): harden standalone verify, dependent-clone destroy, and CI gates
All checks were successful
format-check / gates (pull_request) Successful in 18s
98822c6bd4
fix(jail-lifecycle): fail closed when clone inventory query fails
All checks were successful
format-check / gates (pull_request) Successful in 18s
ec4a0c353f
fix(jail-lifecycle): refuse unowned cleanup targets and untagged clones
All checks were successful
format-check / gates (pull_request) Successful in 18s
c2a910e417
fix(jail-lifecycle): require confirmed stopped state before absent-root snapshot cleanup
All checks were successful
format-check / gates (pull_request) Successful in 19s
5ca4c35249
- In destroy()'s absent-root branch (! dataset_exists), verify jail_state() is
  positively 'stopped' (and not 'unknown' or 'running') before invoking
  cleanup_orphan_clone_snapshots(), preventing orphan @clone-<jail> snapshots
  from being deleted before a failing jls or running target causes refusal.
- In dataset_dependent_clones(), fail closed (return 2) when zfs get clones
  returns empty stdout.
- Adapt test-jail-lifecycle.sh printf '-' literals to printf '%s\n' '-' for
  POSIX/dash portability and add regression coverage for absent-root unknown
  and running states, stopped-state orphan cleanup, empty clones output, and
  snapshot destroy failures.
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!24
No description provided.