The comment contract
Every line the comment can emit, verbatim. Parse against this.
Agentic reviewers
Devin, Greptile, Claude Code, Cursor. Paste one prompt. No code.
The comment contract
One sticky comment per pull request, updated in place, pinned to the head commit it records. These are the exact bytes of a recorded comparison comment — the second recorded commit on demo pull request #18, where apostinstall hook reached a host the diff never names. The same comment rendered:
Every line the comment emits
Markers. Match the comment authorgarnet-runtime-review[bot] and the first marker. The second is namespaced by the posting frontend and carries the record’s state. The third carries the full SHA the record covers:
garnet-control-plane-pending-pr-comment:v1:app.garnet.ai.
Headline. Bold body text, never a heading:
· segment, each count noun pluralized against its own number. The change segment renders on comparison comments only; the timestamp is omitted when the record carries none:
no change, and counts each render only when they apply:
<pre> block — + new, − no longer recorded, unmarked in both:
(dns resolver), a loopback address on port 53, and (instance metadata), one of 169.254.169.254, 169.254.170.2, fd00:ec2::254. Ports, protocol, and PIDs stay in the Garnet Execution Summary and the JSON:
<strong> is lineage attributed to a workflow step below Runner.Worker — the PR’s own workload — and <em> is runner scaffolding. Attribution context, not trust.
No egress, and truncation. Both are stated, never silent:
profile parameter; ignore the campaign parameters after it:
Display rules that change what a name looks like
Display rules that change what a name looks like
Three transforms apply to display only — the Execution Profile, the Garnet Execution Summary, and the JSON keep the recorded value:
- Hostnames are defanged at the final dot:
registry.npmjs.orgrenders asregistry.npmjs[.]org. - Step names lose the runner’s ordinal prefix and any unexpanded workflow expression:
4. Run workload ${{ matrix.name }}renders asRun workload. The comment never shows an ordinal. - Process names lose a trailing run of four or more digits:
provjobd1326539233renders asprovjobd.
Agentic reviewers
Paste one prompt — the reviewer finds the comment, checks the pin, and correlates the diff with what actually ran.- Per-review prompt
- Repo rules (AGENTS.md)
Paste into the reviewer’s instructions, alongside the PR URL:
Custom harnesses and gates
For a reproducible decision instead of a judgment, parse the comment directly. StampHog — PostHog’s merge-gate agent — does exactly that in the demo repository: every static gate green, held solely on recorded egress the diff never mentions.The working consumer
garnet_runtime.py — locates the comment, checks the pin, extracts destinations, splits by attribution. Start here, not from scratch.The harness on a pull request
The harness consuming the record end to end, posting its own decision next to Garnet’s. The same harness on a replayed upstream change.
Harness already locks its own output shape and gates? Keep it — carry the primitive into it instead: (1) fail closed on the three evidence states above, (2) gate on the comment’s own
+A −R delta against the previous profiled commit, (3) make every finding cite its recorded chain and destination.Structured data — the JSON twin
Structured data — the JSON twin
Every fold’s permalink has a JSON twin at the same exact selector:The selector is required. Wrong or missing
?profile=, or a bare /public/runs/<run-id> URL, returns a 404 by design — never a silent fallback. See The public run report.