Skip to content

Fix mktemp template so deploy-managed-agent.sh runs on Linux#41

Open
akhilesharora wants to merge 1 commit into
anthropics:mainfrom
akhilesharora:fix/deploy-mktemp-template
Open

Fix mktemp template so deploy-managed-agent.sh runs on Linux#41
akhilesharora wants to merge 1 commit into
anthropics:mainfrom
akhilesharora:fix/deploy-mktemp-template

Conversation

@akhilesharora
Copy link
Copy Markdown

GNU mktemp wants 3+ X's in a -t template. The two mktemp -t skillcache / mktemp -t skill calls in deploy-managed-agent.sh work on macOS (BSD mktemp tolerates a bare prefix) but blow up on Linux, taking test-cookbooks.sh down with them - 0/5 cookbooks passed dry-run on main.

Adding .XXXXXX is portable: GNU expands the X's, BSD treats them as part of the prefix and appends its own randomness. After:

$ bash scripts/test-cookbooks.sh
  ✓ diligence-grid           5 bodies
  ✓ docket-watcher           4 bodies
  ✓ launch-radar             4 bodies
  ✓ reg-monitor              4 bodies
  ✓ renewal-watcher          4 bodies

Tested on Ubuntu 24.04, coreutils 9.4.

Side note: upload_skill also leaks an empty /tmp/skill.* per real deploy - mktemp creates the file, the script writes the archive to <file>.zip, only the .zip gets cleaned. Left out to keep the diff to one thing.

GNU mktemp wants 3+ X's in a -t template. The bare `mktemp -t skillcache`
and `mktemp -t skill` calls worked on macOS but crash on Linux before
the script does anything. test-cookbooks.sh fails the same way for all
5 cookbooks because it calls deploy --dry-run.

Adding .XXXXXX is portable: GNU expands the X's, BSD treats them as
prefix. Confirmed on Ubuntu 24.04 / coreutils 9.4: test-cookbooks goes
0/5 -> 5/5.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@akhilesharora
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant