Skip to content

fix: capture claude symlink target + verify PATH#2245

Merged
louisgv merged 3 commits intoOpenRouterTeam:mainfrom
AhmedTMM:fix/tarball-workflow-issues
Mar 6, 2026
Merged

fix: capture claude symlink target + verify PATH#2245
louisgv merged 3 commits intoOpenRouterTeam:mainfrom
AhmedTMM:fix/tarball-workflow-issues

Conversation

@AhmedTMM
Copy link
Copy Markdown
Collaborator

@AhmedTMM AhmedTMM commented Mar 6, 2026

Summary

  • Claude tarball broken symlink: ~/.local/bin/claude is a symlink to ~/.local/share/claude/versions/X.Y.Z, but the capture script wasn't including ~/.local/share/claude/. Added it.
  • Verify PATH: Added ~/.npm-global/bin to the claude binary check in E2E verify (npm fallback install path).

Found during E2E testing: codex and openclaw passed, claude failed with "binary not found".

Test plan

  • Merge, re-trigger tarball workflow
  • Verify claude tarball contains root/.local/share/claude/
  • Re-run E2E: e2e.sh --cloud hetzner claude

🤖 Generated with Claude Code

AhmedTMM and others added 2 commits March 6, 2026 01:56
- Use sudo mv + chown for tarball in release step (root-owned from capture)
- Skip swapfile creation if /swapfile already exists (GitHub Actions runners)
- Tolerate hermes setup wizard failure when /dev/tty unavailable in CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The claude installer creates a symlink at ~/.local/bin/claude pointing
to ~/.local/share/claude/versions/X.Y.Z. The capture script was missing
~/.local/share/claude/, causing a broken symlink in the tarball.

Also add ~/.npm-global/bin to the verify PATH check for claude (npm
fallback install path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: 82e3e7e

Findings

No security issues found. All changes are security-neutral or security-positive:

  • GOOD .github/workflows/agent-tarballs.yml:116 — Added stdin redirection < /dev/null prevents interactive hangs and reduces attack surface
  • GOOD .github/workflows/agent-tarballs.yml:137-139 — Proper sudo mv/chown for root-owned tarball, no security issues
  • GOOD packer/agents.json:35 — Idempotent swap creation check, no injection risk
  • GOOD packer/agents.json:42 — Hermes install fallback for idempotency, safe file existence check
  • GOOD packer/scripts/capture-agent.sh:25 — Captures claude symlink target, no security issues
  • GOOD sh/e2e/lib/verify.sh:301 — PATH update matches install reality, no security issues

Tests

  • bash -n: PASS (capture-agent.sh, verify.sh)
  • bun test: PASS (1417/1417 tests passed)
  • curl|bash: OK (no new patterns, existing domain allowlist + blocklist in place)
  • macOS compat: OK (no echo -e, source <(), ((var++)), problematic local, or set -u)

-- security/pr-reviewer-2245

@louisgv louisgv added the security-approved Security review approved label Mar 6, 2026
@louisgv louisgv merged commit 4ac19a3 into OpenRouterTeam:main Mar 6, 2026
5 checks passed
@AhmedTMM AhmedTMM deleted the fix/tarball-workflow-issues branch April 7, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-approved Security review approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants