fix(ci): use $RUNNER_TEMP instead of hardcoded /tmp in claude-fix #44

Merged
nrupard merged 1 commit from fix/claude-fix-no-tmp-PMC-120 into main 2026-05-27 17:27:37 +02:00
Owner

What

Replace hardcoded /tmp paths in .forgejo/workflows/claude-fix.yml with the runner-provided $RUNNER_TEMP directory.

Three files moved off /tmp: the failure-context markdown, the Claude result JSON, and the commit-message file.

Why

$RUNNER_TEMP is guaranteed writable, scoped to the job, and cleaned up automatically. Hardcoded /tmp can collide between concurrent runs and breaks on runners where /tmp is noexec or read-only.

Note

The Run Claude Code prompt uses a single-quoted heredoc (no shell expansion), so the context-file path is injected via a __CONTEXT_FILE__ placeholder swapped in from the build-context step's context_file output.

Closes PMC-120.

## What Replace hardcoded `/tmp` paths in `.forgejo/workflows/claude-fix.yml` with the runner-provided `$RUNNER_TEMP` directory. Three files moved off `/tmp`: the failure-context markdown, the Claude result JSON, and the commit-message file. ## Why `$RUNNER_TEMP` is guaranteed writable, scoped to the job, and cleaned up automatically. Hardcoded `/tmp` can collide between concurrent runs and breaks on runners where `/tmp` is noexec or read-only. ## Note The Run Claude Code prompt uses a single-quoted heredoc (no shell expansion), so the context-file path is injected via a `__CONTEXT_FILE__` placeholder swapped in from the build-context step's `context_file` output. Closes PMC-120.
fix(ci): use $RUNNER_TEMP instead of hardcoded /tmp in claude-fix
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m34s
Create release / Create release from merged PR (pull_request) Has been skipped
be127a051e
The claude-fix workflow wrote its failure-context file, Claude result JSON, and commit-message file to hardcoded /tmp paths. Switch all three to the runner-provided $RUNNER_TEMP directory, which is guaranteed writable, scoped to the job, and cleaned up automatically. This avoids collisions between concurrent runs and failures on runners where /tmp is noexec or read-only. The prompt heredoc is single-quoted, so the context path is injected via a __CONTEXT_FILE__ placeholder swapped from the build-context step output.

PMC-120

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
nrupard deleted branch fix/claude-fix-no-tmp-PMC-120 2026-05-27 17:27:37 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!44
No description provided.