mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 08:31:44 +01:00
/review on Codex with OpenAI models no longer blocks a review that ran its adversarial pass (GST-3375) (#4622)
/review on Codex no longer blocks or logs a miss for sessions that really ran the adversarial review, when the model is an OpenAI one. Why: Codex encrypts the message it sends a new subagent for OpenAI models, so the check never saw the review brief's text; it now accepts a started subagent named `adversarial` whose message is encrypted. Nothing to do: Claude Code's check is unchanged, and a plaintext, missing, failed or differently named subagent still counts as missing. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
bd77c8ccaa
commit
de9a7b4adc
13 files changed
+196
-44
No files matched your search
@@ -100,7 +100,7 @@ The hook reads `destructive_guard` every time it runs, so `gstack-config set des
|
||||
**Contracts on Codex** use the same Stop hook, with the same one block per skill run, records and fail-open rules; Codex sends it the same `stop_hook_active` and `last_assistant_message` keys and takes the same block answer. The transcript is Codex's rollout file (`~/.codex/sessions/<yyyy>/<mm>/<dd>/rollout-*.jsonl`), and the checker tells it from a Claude Code transcript by what the file holds (a rollout starts with a `session_meta` record), never by its path. On Codex:
|
||||
|
||||
- A **load** is Codex injecting a `gstack-*` skill into the conversation as a `<skill>` message (the app server's skill input does this), or the model reading one with a shell command such as `cat ~/.codex/skills/gstack-review/SKILL.md`. `codex exec '$review ...'` also injects the skill as a `<skill>` message (codex-cli 0.170); a mention of the folder name instead of the listed name is plain text, so then the skill loads only when the model reads it.
|
||||
- A **dispatch** is a call to Codex's own `spawn_agent` that started an agent: its result names an `agent_id` (the `multi_agent_v1` tools) or, when Codex serves the tool in its `collaboration` namespace (as it does for gpt-6.1-sol), a `task_name`. One that failed (its result names neither), or a tool of the same name from another namespace, doesn't count.
|
||||
- A **dispatch** is a call to Codex's own `spawn_agent` that started an agent: its result names an `agent_id` (the `multi_agent_v1` tools) or, when Codex serves the tool in its `collaboration` namespace (as it does for gpt-6.1-sol), a `task_name`. One that failed (its result names neither), or a tool of the same name from another namespace, doesn't count. For OpenAI models Codex encrypts the message of a `collaboration` spawn (openai/codex#26210), so the brief's text is in neither rollout; an item with a `task_name` then counts a started spawn whose message is ciphertext and whose agent has that name (/review's adversarial pass is `adversarial`). A plaintext message is still held to `match`.
|
||||
- **The contract** comes from gstack's own copy of the skill (`<gstack>/review/SKILL.md`), because Codex's installed `SKILL.md` keeps only its name and description.
|
||||
- **/review's `specialists-dispatched` item is skipped**, because Codex doesn't run /review's specialist reviewers yet. The adversarial pass and the report are checked as on Claude Code, and the block text names `spawn_agent` and `wait_agent` where Claude Code's names an Agent dispatch.
|
||||
- **A subagent's own rollout is never checked**: its first record names the parent thread.
|
||||
@@ -121,7 +121,7 @@ Every item has an `id` (lowercase letters, digits, `.`, `_`, `-`) and a `kind`,
|
||||
|---|---|---|
|
||||
| `report_labels` | `heading`, `labels[]` | The last assistant message containing the heading has a `Label: value` line for every label, and no value is empty or a placeholder (`[...]`, `<...>`, TBD, TODO, `...`, or a template like `DONE \| BLOCKED`) |
|
||||
| `selected_specialists_dispatched` | optional `marker`, `empty_marker` | The selection line was printed in an assistant message or a Bash result (never a fetched page or file), its names are plain (letters, digits, spaces, `_`, `.`, `-`, at most 40 characters), and each specialist it names has an Agent dispatch that mentions it. The marker is literal text in which a whole-word N stands for a number; the default is `Dispatching N specialists:`. N = 0 (`Dispatching 0 specialists: (small diff)`) or a "specialists skipped" line means zero specialists were selected, which passes. Text in parentheses is not a name (`Dispatching 1 specialists: State Machines (small diff)` selects State Machines) |
|
||||
| `agent_dispatch` | `match` (regular expression, case-insensitive) | An Agent dispatch's description or prompt matches `match`. A `marker` is rejected until the checker can bind it to the dispatch it names (GST-1242) |
|
||||
| `agent_dispatch` | `match` (regular expression, case-insensitive), optional `task_name` | An Agent dispatch's description or prompt matches `match`. On Codex only, a started `spawn_agent` whose message Codex encrypted counts when its agent is named `task_name` (lowercase letters, digits, `_`, `-`). A `marker` is rejected until the checker can bind it to the dispatch it names (GST-1242) |
|
||||
|
||||
There is no item for "run a test after your last edit". /verify asks for that in its text, and Opus 5.5 and GPT-6.1 Sol already did it in 96% and 89% of runs; a Stop-hook item for it added no measurable gain (gstack-evals#356), so it was removed. A contract that still lists `check_after_last_edit` keeps its other items. The checker skips that item and prints `SKILL_CONTRACT_SKIPPED <SKILL.md>: <item id>: ...` on stderr each time it reads the contract (the Stop hook and `check`). A contract whose only items use that kind is invalid.
|
||||
|
||||
|
||||
Reference in new issue
Block a user