c8ctl-plugin-nano 1.56.4 → 1.57.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -3
- package/c8ctl-plugin.js +859 -94
- package/package.json +8 -8
- package/supervisor.dist.js +5 -5
package/README.md
CHANGED
|
@@ -892,9 +892,38 @@ quoting isn't honoured by `cmd.exe` — so use a container sandbox
|
|
|
892
892
|
(`--sandbox docker|podman`) or bake the switches into `--command` there.
|
|
893
893
|
|
|
894
894
|
**Disk hygiene.** Host job **workspaces** and container sandboxes both get
|
|
895
|
-
automatic cleanup so leaked artifacts can't fill the disk.
|
|
896
|
-
|
|
897
|
-
|
|
895
|
+
automatic cleanup so leaked artifacts can't fill the disk. Each worker
|
|
896
|
+
**process** gets its own private namespace under
|
|
897
|
+
`<state>/agent-runs/worker-<incarnation>/` (a fresh incarnation id every process
|
|
898
|
+
start, published with an immutable `owner.json` before any child dir appears);
|
|
899
|
+
its `run-*` job workspaces and `res-*` result channels live there and are removed
|
|
900
|
+
after each job and swept at startup + on `--reap-interval` (leftovers older than
|
|
901
|
+
`--reap-age`, in-flight dirs skipped). `--keep-runs` only skips the *per-job*
|
|
902
|
+
deletion (so a finished job's workspace survives for inspection); the age-based
|
|
903
|
+
owner-scoped sweep still applies, so a kept dir is eventually reaped once it ages
|
|
904
|
+
past `--reap-age`. That
|
|
905
|
+
ordinary sweep is **owner-scoped** — a worker only ever reaps *its own*
|
|
906
|
+
namespace, so it can never delete a sibling worker's active checkout or result
|
|
907
|
+
channel out from under an in-flight job (the cross-worker data-loss defect fixed
|
|
908
|
+
in [#205](https://github.com/jwulf/c8ctl-plugin-nano/issues/205); age is **not**
|
|
909
|
+
evidence of completion — editing files inside a checkout does not refresh the
|
|
910
|
+
enclosing dir's mtime). Reclaiming an *abandoned* namespace left by a crashed
|
|
911
|
+
worker is a **separate, cross-process-safe** operation: it deletes only a
|
|
912
|
+
namespace whose owning process is *provably* dead (PID-reuse-safe, via a recorded
|
|
913
|
+
process-start token) **and** has no surviving harness, under an exclusive lock
|
|
914
|
+
with a final recheck. Anything uncertain — a live/unknown owner, a possibly-alive
|
|
915
|
+
harness, missing/malformed ownership, a lock held by another reclaimer — is
|
|
916
|
+
**retained with a diagnostic**, never guessed away.
|
|
917
|
+
|
|
918
|
+
> **Mixed-version rollout.** The `worker-*` namespace is deliberately invisible
|
|
919
|
+
> to the old flat `run-*`/`res-*` sweep, and the new reclaimer never deletes
|
|
920
|
+
> unowned legacy flat `run-*`/`res-*` directories. This makes an upgrade safe
|
|
921
|
+
> while **old** worker processes are still running the pre-#205 code. Updating the
|
|
922
|
+
> package on disk does **not** replace code already loaded by a running worker:
|
|
923
|
+
> every old worker must be **drained/restarted onto the fixed version** before any
|
|
924
|
+
> leftover legacy flat directories can be cleaned up, and legacy flat dirs whose
|
|
925
|
+
> owner cannot be proven dead are never auto-migrated or deleted.
|
|
926
|
+
|
|
898
927
|
For container sandboxes a **label-scoped** reaper runs at worker startup
|
|
899
928
|
and on an interval (`--reap-interval`, **milliseconds**, default `300000` = 5m),
|
|
900
929
|
removing finished/`exited` containers older than `--reap-age` (**milliseconds**,
|