carlos / platform Public

instancectl: removal guard allows the stop-policy pin removal (#528)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 90e0244e64f77e9ecd1bca0752de74910edcc861 parent 9e2b7fd
1 file changed, +4 −2
  • internal/instancectl/rootfs_removal_guard_test.go +4 −2

Intent

Attributed to this commit: 19.0 g CO₂e (2,258,501 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on instance-stop-528, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/instancectl/rootfs_removal_guard_test.go b/internal/instancectl/rootfs_removal_guard_test.go
index 2a67af00b..dac54713a 100644
--- a/internal/instancectl/rootfs_removal_guard_test.go
+++ b/internal/instancectl/rootfs_removal_guard_test.go
@@ -91,14 +91,16 @@ var (
// the claim launch drop-in, launch.json, permit.json and exec.sock once
// the unit is proven empty), which the safefile rule reaches, and the
// egress policy's owner of its own files (#328: persistDueLocked, a host
- // slice's egress due file and its empty directory).
+ // slice's egress due file and its empty directory), and the stop-policy
+ // gate's start, which removes only the started unit's own pin (#528:
+ // PinAwareSystemctl, 99-carlos-stop-pin.conf).
rawRemovalOwners = map[string]bool{
"removeRootfsExe": true, "removeWorkerFiles": true, "removeRootfsGenFiles": true, "removeJITDropIn": true,
"removeGenFiles": true, "removeSharedKeyDir": true, "removeEntry": true, "removeTree": true,
"removeCmdExe": true, "ensureExeAs": true, "replaceLink": true,
"writeFileExcl": true, "BuildProbeImage": true, "bindControlSocket": true,
"prepareExecGate": true, "clearLaunch": true,
- "persistDueLocked": true,
+ "persistDueLocked": true, "PinAwareSystemctl": true,
}
// rawRemovals: import path -> the functions of that package that remove.
rawRemovals = map[string]map[string]bool{