From 00fd28ba83c8ddae6b04cf48a6f4b5468c88ff7e Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 18 Mar 2026 22:01:50 -0700 Subject: [PATCH] fix: only persist codex-review log when code review actually ran MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't write a codex-review entry to reviews.jsonl when only the adversarial challenge (option B) was selected — there's no gate verdict to record, and a false entry misleads the Review Readiness Dashboard into thinking a code review happened. Co-Authored-By: Claude Opus 4.6 --- review/SKILL.md | 9 ++++++++- review/SKILL.md.tmpl | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/review/SKILL.md b/review/SKILL.md index 2a2e69e0..9bdb4ef3 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -443,13 +443,20 @@ codex exec "Review the changes on this branch against the base branch. Run git d ``` Present the full output verbatim under a `CODEX SAYS (adversarial challenge):` header. -Persist the Codex review result to the review log: +**Only if a code review ran (user chose A or C):** Persist the Codex review result to the review log: ```bash eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) BRANCH_SLUG=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-') mkdir -p ~/.gstack/projects/$SLUG +echo '{"skill":"codex-review","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","status":"STATUS","gate":"GATE"}' >> ~/.gstack/projects/$SLUG/$BRANCH_SLUG-reviews.jsonl ``` +Substitute: STATUS ("clean" if PASS, "issues_found" if FAIL), GATE ("pass" or "fail"). + +**Do NOT persist a codex-review entry when only the adversarial challenge (B) ran** — +there is no gate verdict to record, and a false entry would make the Review Readiness +Dashboard believe a code review happened when it didn't. + If Codex is not available, skip this step silently. --- diff --git a/review/SKILL.md.tmpl b/review/SKILL.md.tmpl index ad435ecf..d379bae3 100644 --- a/review/SKILL.md.tmpl +++ b/review/SKILL.md.tmpl @@ -264,13 +264,20 @@ codex exec "Review the changes on this branch against the base branch. Run git d ``` Present the full output verbatim under a `CODEX SAYS (adversarial challenge):` header. -Persist the Codex review result to the review log: +**Only if a code review ran (user chose A or C):** Persist the Codex review result to the review log: ```bash eval $(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) BRANCH_SLUG=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-') mkdir -p ~/.gstack/projects/$SLUG +echo '{"skill":"codex-review","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","status":"STATUS","gate":"GATE"}' >> ~/.gstack/projects/$SLUG/$BRANCH_SLUG-reviews.jsonl ``` +Substitute: STATUS ("clean" if PASS, "issues_found" if FAIL), GATE ("pass" or "fail"). + +**Do NOT persist a codex-review entry when only the adversarial challenge (B) ran** — +there is no gate verdict to record, and a false entry would make the Review Readiness +Dashboard believe a code review happened when it didn't. + If Codex is not available, skip this step silently. ---