Skip to content

fix: pass drift data via step outputs — agent can't access activation filesystem#664

Merged
PureWeen merged 1 commit intomainfrom
fix/drift-artifacts
Apr 22, 2026
Merged

fix: pass drift data via step outputs — agent can't access activation filesystem#664
PureWeen merged 1 commit intomainfrom
fix/drift-artifacts

Conversation

@PureWeen
Copy link
Copy Markdown
Owner

Third iteration fixing the instruction-drift workflow.

Problem chain:

  1. PR feat: gh-aw skills, security scanner, and instruction drift tooling #653: Scripts ran inside agent container → gh CLI not authenticated → scripts failed
  2. PR fix: run drift check scripts in steps: where gh CLI is authenticated #662: Moved to steps: (activation job) → scripts ran with GH_TOKEN ✅ but files written to activation filesystem aren't available in agent job (different runner)
  3. This PR: Pass data via $GITHUB_OUTPUT → template substitution inlines JSON directly into the agent prompt

How it works now:

activation job (steps:, has GH_TOKEN):
  ├── Check-Staleness.ps1 → $GITHUB_OUTPUT (changes_detected + report JSON)
  └── Scan-GhAwUpdates.ps1 → $GITHUB_OUTPUT (upstream JSON, only if stale)
      ↓ template substitution
agent prompt (data inlined, no file I/O):
  ├── changes_detected: false → call noop immediately
  └── changes_detected: true → analyze + create PR

The agent sees the actual JSON data right in its prompt — no cat commands, no file paths, no filesystem dependency.

steps: runs in activation job (different runner than agent).
Files written there don't persist to the agent's filesystem.

Fix: Use $GITHUB_OUTPUT to pass JSON from steps to the prompt
via template substitution. The agent sees data inline — no cat,
no file paths, no filesystem dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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