Problem
GitHub review evidence parsing does not require valid review-round metadata. If review_round is missing, blank, 0, non-numeric, or left as ${REVIEW_ROUND}, parsing defaults to round 1. This weakens diagnostics and ordering and hides prompt-rendering failures.
Confirmed behavior
extract_review_round() returns None when no valid positive integer line exists.
parse_github_review_evidence() uses extract_review_round(body) or 1.
- The parser validates marker, final sentinel, and head SHA, but not original review-round presence/validity.
Evidence
/Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py: REVIEW_ROUND_RE accepts positive integer review rounds.
/Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py: extract_review_round(text).
/Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py: parsed_round_number = extract_review_round(body) or 1.
/Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/wakeup_runner.py: GitHub comments are parsed through parse_github_review_evidence(...).
Suggested fix
- Treat missing or malformed
review_round as invalid evidence for new comments.
- Preserve legacy handling only if a migration path is explicitly required.
- Surface a precise invalid-evidence reason instead of silently defaulting to round 1.
Acceptance criteria
- Missing review round is rejected or marked invalid, not silently defaulted.
- Literal
${REVIEW_ROUND} is rejected or marked invalid.
- Non-positive and non-numeric rounds are rejected or marked invalid.
- Tests cover valid, missing, malformed, and literal-placeholder review-round metadata.
Review status
This was independently reviewed in /Users/chronoai/Desktop/proposed-main-repo-issues-review-gate.md and classified high confidence.
⟦AI:AUTO-LOOP⟧
ISSUE_RAISED:review-gate-hardening:review-round-parser-default
Problem
GitHub review evidence parsing does not require valid review-round metadata. If
review_roundis missing, blank,0, non-numeric, or left as${REVIEW_ROUND}, parsing defaults to round1. This weakens diagnostics and ordering and hides prompt-rendering failures.Confirmed behavior
extract_review_round()returnsNonewhen no valid positive integer line exists.parse_github_review_evidence()usesextract_review_round(body) or 1.Evidence
/Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py:REVIEW_ROUND_REaccepts positive integer review rounds./Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py:extract_review_round(text)./Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/review_gate_selection.py:parsed_round_number = extract_review_round(body) or 1./Users/chronoai/.claude/skills/consensus-loop/scripts/codex_refactor_loop/wakeup_runner.py: GitHub comments are parsed throughparse_github_review_evidence(...).Suggested fix
review_roundas invalid evidence for new comments.Acceptance criteria
${REVIEW_ROUND}is rejected or marked invalid.Review status
This was independently reviewed in
/Users/chronoai/Desktop/proposed-main-repo-issues-review-gate.mdand classified high confidence.⟦AI:AUTO-LOOP⟧
ISSUE_RAISED:review-gate-hardening:review-round-parser-default