Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
docs(skill): distinguish the two Codex pass-signal shapes (#1559)
Call White067e4c6b5b84
diff --git a/.agents/skills/pr-delivery-loop/SKILL.md b/.agents/skills/pr-delivery-loop/SKILL.mdindex 3c7381661..673955515 100644--- a/.agents/skills/pr-delivery-loop/SKILL.md+++ b/.agents/skills/pr-delivery-loop/SKILL.md@@ -169,21 +169,26 @@ turn ends because you armed a watch and are waiting, say exactly that.- The Codex bot usually auto-reviews new pushes, but not reliably. After everypush, confirm a review of the new head is in flight within a few minutes; if- none appears, comment `@codex review`.-- A trigger only counts once the bot reacts 👀 (`eyes`) to that comment — but- **the bot withdraws the reaction when the review completes**, so 👀 is- evidence only inside its own window. Capture the URL returned by- `gh pr comment <pr> --body '@codex review'`, extract that comment's ID, and- query `repos/<o>/<r>/issues/comments/<comment-id>/reactions` directly within ~2- minutes. Require a reaction with `content == "eyes"` whose `user.login` is- `chatgpt-codex-connector` or `chatgpt-codex-connector[bot]`; aggregate counts or- reactions from other users do not prove pickup. Before retriggering because- 👀 is absent, check for a current-head Codex verdict or another in-flight- review signal; a completed review may already have withdrawn 👀. Never use- `issues/<pr>/comments --jq '.[-1]'` to identify the trigger.- Outside that window every historical trigger reads 0 including the ones that- were reviewed, so never infer "it never started" from a reaction count after- the fact — look for a current-head verdict instead.+ none appears, comment `@codex review`. An auto-review that finds something+ submits a review with inline threads, exactly like a triggered one — act on+ it. Only the passing case is asymmetric: it announces through the PR-body+ reaction alone, never the sha-bearing pass comment, which is produced by an+ explicit trigger and by nothing else. Triggering is therefore the only route+ to comment-shaped head-bound pass evidence.+- A trigger only counts once the bot reacts 👀 (`eyes`) to that comment. The+ trigger is the comment ID your own `gh pr comment <pr> --body '@codex review'`+ call returned — identify it by that ID. Never use `issues/<pr>/comments --jq+ '.[-1]'`, and never find one by matching `@codex review` in comment bodies:+ the bot quotes that phrase in the boilerplate appended to its own verdicts, so+ the pattern selects its output as readily as your input. Query+ `repos/<o>/<r>/issues/comments/<comment-id>/reactions` within ~2 minutes and+ require `content == "eyes"` from the Codex bot (`chatgpt-codex-connector` in+ the API, often displayed as `chatgpt-codex-connector[bot]`); aggregate counts+ or other users' reactions do not prove pickup. **The bot withdraws the+ reaction when the review completes**, so 👀 is evidence only inside that+ window — afterwards every trigger reads 0, including the reviewed ones. Never+ infer "it never started" from a reaction count after the fact; look for a+ current-head verdict instead.- Liveness invariant: at every pause there is either a pending bot review ofthe current head, or one you just triggered. Never wait on nothing.- Use `background-watch-hook` to create one durable `--forever` combined PR watch@@ -195,9 +200,12 @@ turn ends because you armed a watch and are waiting, say exactly that.monitoring, and reserve `wait_action.py` for Actions targets that are not attachedto a PR.- Set the durable PR Watch's per-cycle `--timeout 0`. The Harness default is- 21600 seconds, so leaving it implicit turns six hours without PR activity into a- terminal timeout. The waiter's individual GitHub requests remain bounded; an idle- PR is expected state, not a failed cycle.+ 21600 seconds, so leaving it implicit turns six quiet hours into a terminal+ timeout; an idle PR is expected state, not a failed cycle.+- The CI waiter matches every distinct Actions run ID for each requested+ workflow name at the exact SHA and branch. A workflow name is not a unique+ run identity; do not declare CI complete while a second matching run is+ pending or failed.- The one-watch invariant is scoped by owner and concern: one live lane/fixwatch per PR, plus one independent orchestrator gate watch when work isdelegated. Review activity and the PR's exact-head CI are one lane concern@@ -206,69 +214,66 @@ turn ends because you armed a watch and are waiting, say exactly that.cursor state between concurrent watches or count unrelated global monitors asthe lane watch.- Follow `background-watch-hook` for waiter commands, state, baseline seeding,- catch-up,- filtering, settling, retries, and delivery acknowledgement. Those mechanics- belong to the reusable skill; this policy only constrains when and why the- watch is armed.+ catch-up, filtering, settling, retries, and delivery acknowledgement. Those+ mechanics belong to the reusable skill; this policy only constrains when and+ why the watch is armed.- Before the first push or review trigger, use `background-watch-hook` to seed onecomplete owner-specific state file, then arm the forever Watch with that samefile. This is the only routine baseline creation in the loop. Never reseed,rotate, or replace it between rounds: review or CI activity can land while thecurrent follow-up runs, and making the already-arrived event a fresh baseline- silently drops it. The durable delivery acknowledgement advances the state only- after a report was queued, so the next automatic cycle catches the whole handoff- window.+ silently drops it. Catch-up is for deliberately replaying historical activity+ before the loop starts, and a replacement Watch is recovery from a real+ failure — neither is normal per-round operation.- Keep the Watch alive while pushing, replying, and resolving threads. Those ownactions may produce one extra batched callback, but they cannot consume the Watchor leave the real next review unobserved. End every round by using the`background-watch-hook` management commands to verify exactly one live Watch forthis owner, concern, repository, and PR. Do not rely on a remembered Watch ID orone bookkeeping field as proof that its waiter is live.-- Use catch-up only when deliberately processing historical activity before the- durable loop starts. A first-poll baseline after a watched action is not a valid- handoff, and a replacement Watch is recovery from a real failure, not normal- per-round operation.- For whoever gates the PR: a lane run that ended `succeeded` proves nothingabout the loop. A watch-triggered run can finish clean having pushed nothingand armed nothing, leaving the PR with new findings and no watcher on eitherside. When your gate watch fires on a findings review, verify the lane stillhas a live PR watch before concluding it has the round handled.-- The bot has three verdict shapes. A PASS is either (a) a plain issue comment- by the Codex bot (`chatgpt-codex-connector` in the API; often displayed as- `chatgpt-codex-connector[bot]`) whose body says- "Codex Review: Didn't find any major issues" and names+- The bot has three verdict shapes. Findings arrive as a review with inline+ threads. A PASS is either (a) a plain issue comment by the Codex bot whose+ body says "Codex Review: Didn't find any major issues" and names`Reviewed commit: <sha>` equal to the current head, or (b) a `+1` reaction- from that bot on the PR body. Findings arrive as a review with inline- threads. A contributor comment that quotes the pass text is never a verdict.-- The CI waiter matches every distinct Actions run ID for each requested- workflow name at the exact SHA and branch. A workflow name is not a unique- run identity; do not declare CI complete while a second matching run is- pending or failed.-- A `+1` reaction carries no commit sha by itself. Do not push another head while- the current review is pending. Accept the reaction only when the durable Watch- reports it as new after the current head epoch began, the prior-head review was- already terminal, and the PR head is unchanged. Never reseed to manufacture that- boundary. If those facts cannot be established, require the bot-authored- exact-head pass comment instead.-- Keep reaction meanings distinct: 👀 only says a trigger was picked up; the- Codex bot's PR-body `+1` says the review completed without comments. Reactions- from other authors or on other comments are not verdicts.+ from that bot on the PR body. Nothing else is one: not a contributor comment+ quoting the pass text, not a reaction by another author, not a reaction on any+ other comment.+- That PR-body reaction is one state slot, not an append-only log: 👀 while a+ review runs, `+1` once one completes with no comments, each write withdrawing+ the last. So 👀 there means a review is running right now — a more durable+ liveness probe than the 👀 on your trigger comment. The `+1` names no sha, but+ its `created_at` is not stale either: it is when the most recent completed+ review passed, and the only open question is which head that review ran+ against. So do not push another head while a review is pending, and accept the+ reaction when the durable Watch reports it as new after the current head epoch+ began, the prior-head review was already terminal, and the PR head is+ unchanged. Never reseed to manufacture that boundary. When the timeline cannot+ settle it — an intervening head that was never reviewed, say — force the+ binding rather than infer it: comment `@codex review` on the unchanged head+ and take whatever verdict returns, a pass comment naming the sha or a findings+ review naming it. Waiting for that comment instead of triggering waits+ forever. The slot's 👀 → `+1` transition cannot stand in for it either: the+ mandated waiter queries PR-body reactions with `?content=+1`, so it never sees+ the 👀 half.- Do not treat `Reviewed commit:` alone as a pass signal. A findings verdict isa `COMMENTED` review whose body also opens`### 💡 Codex Review … **Reviewed commit:** <sha>`, so a gate that merely- greps for the sha merges over live findings. For a comment-shaped pass, match- the bot author, pass phrase, and exact head together; for a reaction-shaped- pass, require the head-bound waiter evidence above. In both cases, also gate- on every unresolved thread on the PR, including threads opened on earlier or- outdated heads.+ greps for the sha merges over live findings. Match the bot author, pass+ phrase, and exact head together for a comment-shaped pass; require the+ head-bound waiter evidence above for a reaction-shaped one. Neither is enough+ alone: the bot double-passes commits, so close-out also gates on zero+ unresolved threads across the entire PR, including threads opened on earlier+ or outdated heads — never on a quiet latest review.- A review attributed to the repo owner with an **empty body** is a phantom, nota review: replying to a review thread creates a `COMMENTED` review under yourown account, stamped with the current head's `commit_id`. Any check thatselects reviews by head sha will count it as "the bot has started". Filter itout by author and empty body.-- A 0-finding review is not clean. The bot double-passes commits; close-out- requires zero unresolved threads across the entire PR, including threads- opened on earlier or outdated heads, not a quiet latest review.- Resolve every thread you address (reply, then resolve). For intentionalnon-changes the bot keeps re-flagging: keep a **Known-by-design ledger** inthe PR body and answer re-flags by linking the entry.@@ -321,16 +326,18 @@ turn ends because you armed a watch and are waiting, say exactly that.review ran on, so name that head when you act on it. If the branch has movedsince, reconcile the finding against the current head rather than re-doing thefix; the work may already be there.-- An escalation only counts when it is **delivered to the orchestrator**:- a watch-triggered run must send the escalation directly to the orchestrator's- session with `vibe agent run --session-id <orchestrator> --no-callback`, then- verify that send succeeded. Merely finishing the watch-triggered run leaves- the result in the lane session and notifies nobody. While blocked, the PR- waiter observes GitHub activity only; it does not observe Session decisions.- The orchestrator must deliver the circuit-breaker decision explicitly to the- lane session (for example with `vibe agent run --session-id <lane-session>- --message-file <decision> --no-callback`). Keep the GitHub watch armed and- state exactly which decision the lane needs.+- **Delivery rule.** An escalation — and the §5 final report — only counts once+ it is delivered to the orchestrator: a watch-triggered run must send it to the+ orchestrator's session with `vibe agent run --session-id <orchestrator>+ --no-callback`, then verify the send succeeded. Merely finishing the run+ leaves the result in the lane session and notifies nobody. `--no-callback`+ matters: without it the orchestrator's next user-facing reply is auto-queued+ back into YOUR session as a stray instruction. While blocked, the PR waiter+ observes GitHub activity only, never Session decisions, so the orchestrator+ must deliver the circuit-breaker decision explicitly to the lane session (for+ example `vibe agent run --session-id <lane-session> --message-file <decision>+ --no-callback`). Keep the GitHub watch armed and state exactly which decision+ the lane needs.## 5. Close-out — all conditions, then stop@@ -342,16 +349,10 @@ turn ends because you armed a watch and are waiting, say exactly that.on which each thread was opened;4. Post the final report: PR URL, what shipped, evidence layers, residualmanual checks (state what end-to-end verification is deferred to the- orchestrator's integration pass);- **Delivery rule (same as escalations):** the final report must be- DELIVERED to the orchestrator — send it to the orchestrator's session (or- finish the run the orchestrator dispatched with it as the result). When- sending via `vibe agent run --session-id <orchestrator>`, pass- `--no-callback` — otherwise the orchestrator's next user-facing reply is- auto-queued back into YOUR session as a stray instruction. A- watch-triggered run's result text stays in your own session and notifies- NOBODY; ending your close-out round there means the orchestrator never- learns you finished. Verify the send succeeded before stopping.+ orchestrator's integration pass). Deliver it by §4's delivery rule, or+ finish the run the orchestrator dispatched with it as the result; ending a+ watch-triggered round without that send means the orchestrator never learns+ you finished.**Tripwire:** the round where the clean pass finally lands is exactly theround where lanes forget this and stop after tidying watches. When you noticeconditions 1–3 are already true at the start of a watch-triggered round, SENDdiff --git a/tests/test_harness_skill_guidance.py b/tests/test_harness_skill_guidance.pyindex 965f9b709..06f3cb4fd 100644--- a/tests/test_harness_skill_guidance.py+++ b/tests/test_harness_skill_guidance.py@@ -210,5 +210,21 @@ def test_pr_delivery_loop_delegates_waiters_to_background_watch_skill() -> None:assert "disable the Watch's per-cycle timeout" in agentsassert "Never reseed" in bodyassert "never use `--forever`" not in body+ # The PR-body reaction is a level, not an edge, and the sha-bearing pass+ # comment is emitted only in answer to an explicit trigger. Drop either and+ # the loop deadlocks waiting on something nothing will send. Matched against+ # the unwrapped text: the rule is the sentence, not where the line breaks.+ flat = " ".join(body.split())+ assert "one state slot, not an append-only log" in flat+ assert "Waiting for that comment instead of triggering waits forever." in flat+ assert "produced by an explicit trigger and by nothing else" in flat+ # The bot quotes `@codex review` in its own boilerplate, so a body-text search+ # for the trigger matches the verdicts it is supposed to be distinguished from.+ assert "never find one by matching `@codex review` in comment bodies" in flat+ # Only the *passing* auto-review is reaction-only. Broadening that to every+ # auto-review tells an agent to ignore a findings review and keep waiting on+ # a reaction that will never describe it.+ assert "An auto-review that finds something submits a review with inline threads" in flat+ assert "Only the passing case is asymmetric" in flatassert (ROOT / "skills/background-watch-hook/scripts/wait_pr.py").is_file()assert (ROOT / "skills/background-watch-hook/scripts/wait_action.py").is_file()