Skip to content

Goal gate fails closed on unreadable events.jsonl (#200)#205

Merged
richard-devbot merged 1 commit into
mainfrom
feat/goal-gate-failclosed-200
Jul 6, 2026
Merged

Goal gate fails closed on unreadable events.jsonl (#200)#205
richard-devbot merged 1 commit into
mainfrom
feat/goal-gate-failclosed-200

Conversation

@richard-devbot

Copy link
Copy Markdown
Owner

From PR #198's adversarial review (finding F1, should-fix). A recipe-driven run proves goal context only through events.jsonl; the tolerant reader returned [] on read failure, so a corrupt/lost event log silently disarmed the stage-11 goal gate (fail-open).

activeGoalContext now distinguishes an absent log (a genuine non-goal run — stays optional) from one that exists but is unreadable or yields zero parseable events (indeterminate → goal_activity_indeterminate FAIL). A legitimately empty log is not corrupt. Folds in the N1 doc nit: goal-activity is permanent, documented in HARNESS.md.

Closes #200.

🤖 Generated with Claude Code

)

Goal-activity detection read events.jsonl through a tolerant reader that
returns [] on failure, so a corrupt/lost event log on a recipe-driven run
made the stage-11 gate report 'no active goal' and PASS without requiring
goal_evaluation — fail-open. activeGoalContext now distinguishes an absent
log (genuine non-goal run) from one that exists but yields zero parseable
events or can't be read (indeterminate), and the gate returns a
goal_activity_indeterminate FAIL. Documents the permanent-activity + fail-
closed behavior in HARNESS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@richard-devbot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4fa77906-5745-4b45-8ed9-e80542cfb1b0

📥 Commits

Reviewing files that changed from the base of the PR and between 38ef36b and b58d372.

📒 Files selected for processing (3)
  • docs/HARNESS.md
  • src/core/harness/goal-check.js
  • tests/harness-goal-check.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/goal-gate-failclosed-200

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@richard-devbot richard-devbot merged commit e61efd2 into main Jul 6, 2026
7 checks passed
@richard-devbot richard-devbot deleted the feat/goal-gate-failclosed-200 branch July 6, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goal gate: fail-closed (or named check) when events.jsonl is unreadable on a recipe-driven run

2 participants