Skip to content

engine: pi on runner.topology arc-dind exits 1 after a successful run: tee target rewritten onto AWF's read-only ${RUNNER_TEMP}/gh-aw mount #63717

Closed

Description

@ekbritecore

Analysis

Under runner.topology: arc-dind, rewriteArcDindEngineCommand() (pkg/workflow/awf_arc_dind.go) rewrites every /tmp/gh-aw occurrence in the engine command to ${RUNNER_TEMP}/gh-aw:

func rewriteArcDindPath(path string) string {
	return strings.ReplaceAll(path, constants.TmpGhAwDir, awfArcDindRootPathExpr)
}

For pi this includes the streaming log that buildPiCommand() (pkg/workflow/pi_engine.go) pipes to:

... pi ... 2>&1 | tee /tmp/gh-aw/pi-streaming.jsonl      # PiStreamingLogFile
→ ... pi ... 2>&1 | tee ${RUNNER_TEMP}/gh-aw/pi-streaming.jsonl   # compiled, arc-dind

But the agent container mounts ${RUNNER_TEMP}/gh-aw read-only; appendArcDindMountSettings() (pkg/workflow/awf_command_builder.go) only adds rw mounts for ${RUNNER_TEMP}/gh-aw/home and ${RUNNER_TEMP}/gh-aw/sandbox/agent:

--mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro"
--mount "${RUNNER_TEMP}/gh-aw/home:${RUNNER_TEMP}/gh-aw/home:rw"
--mount "${RUNNER_TEMP}/gh-aw/sandbox/agent:${RUNNER_TEMP}/gh-aw/sandbox/agent:rw"

So tee fails to open its file, and the step's set -o pipefail turns pi's success into exit 1. The agent job fails and safe outputs the agent already emitted are never processed.

Secondary: GH_AW_AGENT_OUTPUT / the log parser still point at /tmp/gh-aw/pi-streaming.jsonl (not rewritten), while artifact upload uses ${{ runner.temp }}/gh-aw/pi-streaming.jsonl, so parsing and upload disagree on arc-dind.

Reproduction

  • gh-aw v0.89.21 (AWF v0.28.23), ARC DinD, DOCKER_HOST=tcp://127.0.0.1:2375, runner.topology: arc-dind, engine: { id: pi, model: copilot/claude-sonnet-5 }, one MCP server, one add-comment safe output.
  • Compile the same workflow with and without runner.topology: the tee target is ${RUNNER_TEMP}/gh-aw/pi-streaming.jsonl vs /tmp/gh-aw/pi-streaming.jsonl.
  • Run log: pi completes normally (model 200s, MCP tool call, add_comment accepted, agent_settled), then:
tee: /home/runner/_work/_temp/gh-aw/pi-streaming.jsonl: Read-only file system
[pi-harness] attempt 1: process closed exitCode=1 duration=8s stdout=121082B stderr=904B
##[error]Agent execution exited with code 1
  • With the workaround below applied (run green), the step-summary parser still misses the file:
Parse agent logs for step summary   GH_AW_AGENT_OUTPUT: /tmp/gh-aw/pi-streaming.jsonl
Log path not found: /tmp/gh-aw/pi-streaming.jsonl

Implementation Plan

  1. Write the pi streaming log to an arc-dind writable path (pkg/workflow/pi_engine.go): when isArcDindTopology(workflowData), use ${RUNNER_TEMP}/gh-aw/sandbox/agent/pi-streaming.jsonl (already rw) for the tee target, or exempt the tee target from rewriteArcDindPath and keep a path the agent can write.
  2. Keep producer and consumers consistent: GetLogFileForParsing(), GetDeclaredOutputFiles(), GH_AW_AGENT_OUTPUT, and artifact upload paths should all resolve to that same file under arc-dind.
  3. Audit other engines for the same pattern: any engine command writing to /tmp/gh-aw/<file> outside home/ or sandbox/agent/ breaks the same way after rewriteArcDindEngineCommand().
  4. Tests (pkg/workflow/awf_arc_dind_test.go / pi_engine_test.go): for pi + arc-dind, assert the tee target sits under a path that appendArcDindMountSettings() mounts rw, and that parser/upload paths match it.

Workaround (verified end-to-end on ARC DinD)

Pre-create the file and mount it rw over the ro parent:

steps:
  - name: Pre-create pi streaming log
    run: touch "${RUNNER_TEMP}/gh-aw/pi-streaming.jsonl"
sandbox:
  agent:
    mounts:
      - "${{ runner.temp }}/gh-aw/pi-streaming.jsonl:${{ runner.temp }}/gh-aw/pi-streaming.jsonl:rw"

(${RUNNER_TEMP} doesn't work in mounts:: the compiler single-quotes it, so it's never expanded.)

Activity

  1. locked and limited conversation to collaborators on Sep 27, 2026
  2. unlocked this conversation on Sep 27, 2026
  3. lpcox commented on Sep 29, 2026

    @lpcox
    Collaborator

    🔗 AWF tracking issue: github/gh-aw-firewall#9183

    Generated by Firewall Issue Dispatcher · copilot · auto · 23.2 AIC · ⊞ 9.1K · ◷

  4. ekbritecore commented on Sep 29, 2026

    @ekbritecore
    Author

    Found a sibling instance of this same root-cause class (hardcoded /tmp/gh-aw literal, never rewritten for runner.topology: arc-dind) in a different file: actions/setup/js/parse_token_usage.cjs — affects gh-aw.aic/gh-aw.turns/gen_ai.usage.* on the summary spans and the Step Summary token table, not the pi streaming log this issue covers. Filed as #64344 with the same Analysis/Reproduction/Implementation-Plan structure, since it's a distinct file/fix even though it's the same underlying gap.

  5. locked and limited conversation to collaborators on Sep 29, 2026
  6. unlocked this conversation on Sep 29, 2026
  7. pelikhan commented on Oct 1, 2026

    @pelikhan
    Collaborator

    @copilot review status

  8. pelikhan commented on Oct 1, 2026

    @pelikhan
    Collaborator

    @ekbritecore file new (linked) issues so we track #63717 (comment) otherwize it does not fit in the machinery.

  9. pelikhan commented on Oct 1, 2026

    @pelikhan
    Collaborator

    AND THANKS FOR REPORTING ISSUES!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions