Skip to content

upstreaming: preserve exact agent logs safely - #5001

Merged
luhenry merged 1 commit into
mainfrom
upstreaming-pipeline
Nov 20, 2026
Merged

luhenry merged 1 commit into
mainfrom
upstreaming-pipeline

Conversation

@luhenry

@luhenry luhenry commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Preserve exact searchable agent logs while preventing GitHub Actions workflow-command injection.

This supersedes #5000's console-byte transformation with GitHub's native command suspension protocol:

  • a trusted pre-agent step generates a fresh 256-bit random token;
  • the token is stored as a trusted step output, not in the model environment;
  • the step emits ::stop-commands::<token> before MCP startup and agent execution;
  • Pi and MCP output reaches the console byte-for-byte unchanged;
  • an if: always() post-step emits ::<token>:: after engine execution, including failure paths;
  • the runner's job-scoped command manager keeps command processing suspended between those steps;
  • canonical artifacts remain unchanged as before.

The token is generated outside the sandbox, is not passed to the model, and is impractical for untrusted output to guess. This prevents the setup-python ::add-matcher:: source text from becoming a runner command without degrading URLs, JSON or searchability.

Validation

  • 205 upstreaming tests pass.
  • Added workflow contract checks for random generation, trusted step-output transfer, always() restoration, and removal of the byte guard.
  • gh-aw v1.2.2 checks pass.
  • Generated step order is suspend (20), Execute Pi CLI (31), resume (51).
  • git diff --check passes.

@luhenry
luhenry merged commit b2eb2c2 into main Nov 20, 2026
4 checks passed
@luhenry
luhenry deleted the upstreaming-pipeline branch November 20, 2026 18:30
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