Skip to content

Recipe

Post the evidence comment on agent PRs

The Machinaut PR action posts one sticky comment on each agent-authored pull request. The comment links to the session behind the PR in that team's console.

Got here from someone else's comment? The link opens their team's console, so you need to be in that org. Ask the PR author for an invite, or start your own free org. To add the comment to your own repo, use this workflow:

.github/workflows/machinaut-evidence.ymlyaml
name: Machinaut evidence
on: pull_request
permissions:
  contents: read
  pull-requests: write          # post and update the sticky comment
jobs:
  evidence:
    runs-on: ubuntu-latest
    steps:
      - id: ship                # your agent runs and ships its session
        run: echo "session-id=$SESSION_ID" >> "$GITHUB_OUTPUT"
      - uses: machinise/machinaut-pr-action@v1
        with:
          machinaut-api-key: ${{ secrets.MACHINAUT_API_KEY }}
          project-id: your-project-id
          session-id: ${{ steps.ship.outputs.session-id }}

1. Store your project key

Mint a token in the console under Settings → API Tokens and save it as the repo secret MACHINAUT_API_KEY. The action uses it read-only.

2. Ship the session first

Your agent step ships its Lodestar session and exports the id as the session-id output. See Ship a session and share the report.

3. What the comment does

  • It quotes the verdict from the session's chain report, which is Lodestar OSS, and links to the session in your console.
  • The link needs a sign-in. A project key cannot make a public share link, so the comment never points at a public page. To get a public, expiring post-mortem link (Beta, action v2.1.0 and console v0.7.0), add a separate owner-minted publish token as machinaut-publish-token, ship at the public ceiling, and keep the trigger on pull_request. Fork PRs never publish. See CI publish tokens.
  • It updates the same comment on every push instead of adding new ones.
  • When session-id is empty, the action does nothing. Only PRs with a shipped session get a comment.

Next: Turn on the merge gate. Every input is in the action's README.