Skip to content

feat(harness): track successful no-progress loops#72

Merged
senamakel merged 5 commits into
tinyhumansai:mainfrom
senamakel:feat/successful-repeat-progress
Jul 23, 2026
Merged

feat(harness): track successful no-progress loops#72
senamakel merged 5 commits into
tinyhumansai:mainfrom
senamakel:feat/successful-repeat-progress

Conversation

@senamakel

@senamakel senamakel commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • add a reusable SuccessfulRepeatTracker beside the failure-oriented no-progress tracker
  • independently track identical assistant-output batches and successful tool-call batches
  • reset streaks for failed batches and caller-declared polling exemptions
  • provide conservative defaults matching the proven OpenHuman breaker thresholds

The crate owns generic repeat accounting and messages; host middleware remains responsible for canonical signatures, polling-tool classification, and steering/halt presentation.

Validation

  • cargo test successful_repeat --lib
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check

Summary by CodeRabbit

  • New Features
    • Added detection for repeated assistant outputs and successful tool-call batches.
    • Runs can now halt automatically when repeated activity indicates a stuck state.
    • Added configurable repetition thresholds with safe minimum values.
    • Exposed repetition tracking controls for integration with the harness.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20927210-3717-43fb-88a1-437bd314d021

📥 Commits

Reviewing files that changed from the base of the PR and between ac18c6c and 046acdb.

📒 Files selected for processing (4)
  • src/harness/no_progress/mod.rs
  • src/harness/no_progress/successful_repeat.rs
  • src/harness/no_progress/test.rs
  • src/harness/no_progress/types.rs
📝 Walkthrough

Walkthrough

Adds successful-repeat detection for assistant outputs and successful tool-call batches, with configurable thresholds, reset behavior, tests, and public re-exports through the harness API.

Changes

Successful Repeat Detection

Layer / File(s) Summary
Repeat contract and public exports
src/harness/no_progress/successful_repeat.rs, src/harness/no_progress/mod.rs, src/harness/mod.rs
Defines repeat verdicts, thresholds, tracker state, and public module re-exports.
Repeat tracking behavior
src/harness/no_progress/successful_repeat.rs
Tracks consecutive output and successful call-batch signatures, handles exemptions and failures, clamps thresholds, and supports resetting state.
Repeat behavior validation
src/harness/no_progress/successful_repeat.rs
Tests halting thresholds, changed signatures, failed or exempt batches, resets, and zero-threshold behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HarnessIteration
  participant SuccessfulRepeatTracker
  participant Streak
  HarnessIteration->>SuccessfulRepeatTracker: Record output or call-batch signature
  SuccessfulRepeatTracker->>Streak: Update matching repetition streak
  Streak-->>SuccessfulRepeatTracker: Return repetition count
  SuccessfulRepeatTracker-->>HarnessIteration: Continue or Halt
Loading

Possibly related PRs

Poem

I’m a rabbit counting echoes in a row,
When outputs repeat, I know when to say “whoa!”
Tool calls hop in matching lines,
Thresholds guard the warning signs.
Reset the trail, then onward we go!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding harness logic to track successful no-progress loops.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac18c6c8c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/harness/no_progress/successful_repeat.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/harness/no_progress/successful_repeat.rs`:
- Around line 13-16: Update the documentation comments for
DEFAULT_REPEAT_OUTPUT_THRESHOLD and DEFAULT_REPEAT_CALL_THRESHOLD to describe
the configured counts as batches required to halt, matching the behavior
implemented by record_* and the tests; leave the constants unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 22084afd-daf4-489d-81db-3061bb058a11

📥 Commits

Reviewing files that changed from the base of the PR and between 2583fcc and ac18c6c.

📒 Files selected for processing (3)
  • src/harness/mod.rs
  • src/harness/no_progress/mod.rs
  • src/harness/no_progress/successful_repeat.rs

Comment thread src/harness/no_progress/successful_repeat.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b999021bd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/harness/no_progress/successful_repeat.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 465f28a9d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/harness/no_progress/successful_repeat.rs Outdated
Comment thread src/harness/no_progress/successful_repeat.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 286c621b5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/harness/no_progress/successful_repeat.rs Outdated
@senamakel
senamakel merged commit 4276477 into tinyhumansai:main Jul 23, 2026
2 checks passed
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.

1 participant