fix(pr): pin agent-meta marker, add harness field
This commit is contained in:
@@ -92,7 +92,12 @@ Then **end the turn**. Do not wait for anything.
|
||||
Each reason is one query. Nothing new: return silently, per
|
||||
`COMMON.md`. Update the state file whenever the phase or head SHA
|
||||
changes. Every body you post ends with the metadata marker from
|
||||
`COMMON.md`.
|
||||
`COMMON.md`, verbatim — the `agent-meta` JSON object, never an
|
||||
invented tag:
|
||||
|
||||
```
|
||||
<!-- agent-meta: {"model":"<model-id>","harness":"<harness>","session":"<sid>"} -->
|
||||
```
|
||||
|
||||
### `reason=comments`
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ when there is work, the skill decides what to do about it.
|
||||
|
||||
`bin/reviewer-poll.ts` runs as a systemd user service and is the only
|
||||
thing polling a forge. It reads metadata — `updated_at`, `state`,
|
||||
`draft`, `mergeable`, head SHA — and touches comment bodies in exactly
|
||||
one case: checking the metadata marker (below) to decide whether new
|
||||
comments are the target session's own. When a PR looks changed it
|
||||
`draft`, `mergeable`, head SHA. It never reads comment bodies, so the
|
||||
metadata marker (below) is for local tooling only. When a PR looks
|
||||
changed it
|
||||
either creates a session for it or sends a one-line hint to the session
|
||||
that already owns it.
|
||||
|
||||
@@ -92,10 +92,16 @@ issue comment, reply — ends with a hidden marker as its last line,
|
||||
after a blank line:
|
||||
|
||||
```
|
||||
<!-- agent-meta: {"model":"<model-id>","session":"<sid>"} -->
|
||||
<!-- agent-meta: {"model":"<model-id>","harness":"<harness>","session":"<sid>"} -->
|
||||
```
|
||||
|
||||
Post that marker verbatim — a JSON object with those keys. Do not
|
||||
invent a different marker, and do not replace it with a bare tag like
|
||||
`<!-- pr-daemon:land -->`; local tooling parses the JSON.
|
||||
|
||||
- `model`: the model id you are running as (e.g. `claude-fable-5`)
|
||||
- `harness`: the agent harness you run in — `claude-code`, `codex`,
|
||||
`pi`, `opencode`
|
||||
- `session`: first 8 chars of your harness's session id —
|
||||
`$CLAUDE_CODE_SESSION_ID`, `$PI_SESSION_ID`, or whatever your harness
|
||||
sets; omit only if none exists
|
||||
|
||||
@@ -122,6 +122,11 @@ this section exists to prevent.
|
||||
|
||||
End the review body and every `comments[]` body with the metadata
|
||||
marker from `COMMON.md` (skip a review body that is otherwise empty).
|
||||
Post it verbatim — the `agent-meta` JSON object, never an invented tag:
|
||||
|
||||
```
|
||||
<!-- agent-meta: {"model":"<model-id>","harness":"<harness>","session":"<sid>"} -->
|
||||
```
|
||||
|
||||
Only after the user's go-ahead on an unlisted repo. Record every id you post
|
||||
in the same step, or the next hint reads your own review as new
|
||||
|
||||
Reference in New Issue
Block a user