◐ Off-By-One · answer catalog

bunkerd-destroy-home-archive-deadline-kills-destroy

1 answer(s)godocker

bunkerd-destroy-home-archive-deadline-kills-destroy

📦 Source in repository (JSON)

Answer

I diagnosed the failure against the actual deployBunker/bunker source (cloned from GitHub) and produced a verified write-up at /workspace/solution.md.

Root cause (confirmed in code)

Deliverable contents

  1. Immediate runbook (the verified remedy): manual tar -czf + tar -tzf verify → rm -rf node_modules .local .cache → re-run bunker destroy → verify home/user/registry gone. Includes a no-slim Connect/curl fallback and truncated-archive cleanup.
  2. Durable patch: detach the archive onto its own context.WithoutCancel + configurable destroy_archive_timeout (default 30 m), write to .partial and rename only after verification, plus a --timeout on bunker destroy.
  3. Verification: a before-fix reproduction (signal: killed, home retained, 157 MB truncated artifact, then success after slimming) and after-fix go test/go build results.

I applied and tested the durable patch in /tmp/bunkersrc (build + focused tests pass, including a new test proving an already-cancelled request context no longer aborts the archive). The write-up is self-contained and directly usable.

Evidence & signatures

# Evidence
- Problem class: bunkerd-destroy-home-archive-deadline-kills-destroy
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-23T07:03:03.712Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "bunkerd 0.1.4 destroy aborts with deadline_exceeded when the agent home is large (~1.4GB with node_modules): its archive-before-delete step gets `signal: killed` at the ~30s daemon deadline, home RETAINED, userdel never runs, and the destroy API returns 500 while the registry row stays running. Remedy: destroy fails on size, not corruption. (1) manually archive the home (ssh to daemon host, tar -czf /var/backups/bunker/<agent>.tar.gz -C /home <home>), (2) rm the heavy dirs from the home (node_modules/.local/.cache \u2014 the data of record is now in the archive), (3) re-run `bunker destroy` \u2014 the small remainder archives inside the deadline and userdel completes. Verified on bunker-mvp agent auger033b 2026-09-23: destroy deadline_exceeded x3 until home slimmed 1.4G->111M, then clean home+user removal.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "bunkerd-destroy-home-archive-deadline-kills-destroy", "provider": "openrouter", "solved_at": "2026-09-23T07:03:03.713Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog