carlos / platform Public

test: snapshot witness keeps BindPaths when it overrides the binary

An empty BindReadOnlyPaths= clears every bind mount, so the witness's own
drop-in removed /work and the helper died at CHDIR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev b8ad2fac4f9eeeb7345e8faa274cf691b7f482d8 parent 9f1ea42
1 file changed, +2 −1
  • internal/instancectl/demo_snapshot_kernel_linux_test.go +2 −1

Intent

Human

<task-notification> <task-id>bhd20pg5o</task-id> <tool-use-id>toolu_018FjWVwRSeDnqQcCAFPMrGN</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bhd20pg5o.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/dsuc; until [ -f $S/done ]; do sleep 20; done; tail -1 $S/log; cat $S/final.md" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>be99ltiuk</task-id> <tool-use-id>toolu_01Y28FPtpXYArBZqWxG9AfkH</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/be99ltiuk.output</output-file> <status>completed</status> <summary>Background command "cd /home/paulca/amadan.net/carlos/platform/.claude/worktrees/demo-snapshot-unit-check; git push origin demo-snapshot-unit-check 2&gt;&amp;1 | grep -- '-&gt;'; amadan task set 621 -status Done &gt;/dev/null; amadan task set 622 -status Started &gt;/dev/null; aws --profile kass --region eu-west-1 ec2 describe-instances --filters Name=tag:purpose,Values=plan14-root-runner Name=instance-state-name,Values=pending,running --query 'Reservations[].Instances[].InstanceId' --output text; S=/home/paulca/.cache/tmp/dsuc; timeout 1500 python3 -I $S/runner.py --worktree $PWD --pkg ./internal/instancectl --run '^TestDemoClaimSnapshotRuntimeDevWitness$' &gt; $S/witness1.log 2&gt;&amp;1; echo "rc=$?" &gt;&gt; $S/witness1.log; echo finished" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 62.3 g CO₂e (7,514,288 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on demo-snapshot-unit-check, 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/demo_snapshot_kernel_linux_test.go b/internal/instancectl/demo_snapshot_kernel_linux_test.go
index 1fc2c7e33..5627268ba 100644
--- a/internal/instancectl/demo_snapshot_kernel_linux_test.go
+++ b/internal/instancectl/demo_snapshot_kernel_linux_test.go
@@ -249,7 +249,8 @@ func TestDemoClaimSnapshotRuntimeDevWitness(t *testing.T) {
os.Remove(drop)
ctl(context.Background(), "daemon-reload")
}()
- text := "[Service]\nExecStart=\nExecStart=/snapshot-worker -test.run=^TestDemoClaimSnapshotHostileHelper$\nBindReadOnlyPaths=\nBindReadOnlyPaths=" + filepath.Join(fixture, "worker") + ":/snapshot-worker\nEnvironment=CARLOS_SNAPSHOT_WITNESS_HELPER=1\n"
+ // An empty BindReadOnlyPaths= clears every bind mount, BindPaths too.
+ text := "[Service]\nExecStart=\nExecStart=/snapshot-worker -test.run=^TestDemoClaimSnapshotHostileHelper$\nBindReadOnlyPaths=\nBindPaths=" + filepath.Join(dir, "work") + ":/work\nBindReadOnlyPaths=" + filepath.Join(fixture, "worker") + ":/snapshot-worker\nEnvironment=CARLOS_SNAPSHOT_WITNESS_HELPER=1\n"
if e = os.WriteFile(filepath.Join(drop, "90-witness.conf"), []byte(text), 0644); e != nil {
t.Fatal(e)
}