Skip to content

fix: raise BotTurnTracker hard cap to 1000#855

Merged
thepagent merged 1 commit into
openabdev:mainfrom
rockexe0000:fix/bot-turn-hard-cap-1000
May 19, 2026
Merged

fix: raise BotTurnTracker hard cap to 1000#855
thepagent merged 1 commit into
openabdev:mainfrom
rockexe0000:fix/bot-turn-hard-cap-1000

Conversation

@rockexe0000

Copy link
Copy Markdown
Contributor

What problem does this solve?

Closes #843

max_bot_turns is documented as a soft limit with a compiled-in hard cap of 1000, but the shared BotTurnTracker still enforced HARD_BOT_TURN_LIMIT = 100. As a result, bot-to-bot conversations configured with max_bot_turns = 1000 still stopped at 100 turns.

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365158868619404/1506223007792627723 — issue #843 contains the reproduction and maintainer confirmation.

At a Glance

config/docs intent
  max_bot_turns = 1000
  hard cap = 1000
        |
        v
src/bot_turns.rs
  HARD_BOT_TURN_LIMIT: 100 -> 1000
        |
        v
BotTurnTracker no longer hard-stops at legacy turn 100

Prior Art & Industry Research

Not applicable — trivial bug fix aligning the shared enforcement constant with existing documentation and PR #741 intent.

Proposed Solution

  • Change HARD_BOT_TURN_LIMIT in src/bot_turns.rs from 100 to 1000.
  • Add a regression test confirming the tracker does not hard-stop at the legacy 100-turn boundary.

Why this approach?

The docs already state that the compiled-in hard cap is 1000. Updating the shared tracker constant fixes the runtime behavior at the actual enforcement point while keeping the existing soft-limit behavior unchanged.

Alternatives Considered

Validation

Rust changes:

  • cargo check passes
  • cargo test passes (including new tests)
  • cargo clippy clean

@shaun-agent

shaun-agent commented May 19, 2026

Copy link
Copy Markdown
Contributor

OpenAB PR Screening

This is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Click 👍 if you find this useful. Human review will be done within 24 hours. We appreciate your support and contribution 🙏

Screening report screened PR #855 and moved project item `PVTI_lADOEFbZWM4BUUALzgtKgBM` from `Incoming` to `PR-Screening`.

GitHub comment: #855 (comment)
Project action: https://github.com/orgs/openabdev/projects/1

Intent

PR #855 fixes a mismatch between documented bot-turn limits and runtime enforcement. max_bot_turns can go up to 1000, but BotTurnTracker still stopped at 100.

Feat

Fix. Raises HARD_BOT_TURN_LIMIT in src/bot_turns.rs from 100 to 1000 and adds regression coverage.

Who It Serves

Discord and Slack users running high-turn bot-to-bot conversations; also deployers and maintainers.

Rewritten Prompt

Update OpenAB’s shared BotTurnTracker hard cap to 1000, preserve soft-limit behavior, and add a regression test proving turn 100 is no longer the hard stop.

Merge Pitch

Low-risk correctness fix with a tiny diff. Main concern is runaway bot loops, but the documented hard cap remains bounded at 1000.

Best-Practice Comparison

OpenClaw/Hermes scheduling patterns do not apply. This is about keeping docs, config, and runtime enforcement aligned.

Implementation Options

Conservative: merge as written.
Balanced: add explicit boundary coverage around 1000/1001.
Ambitious: create a single source of truth for docs/config/runtime limits.

Comparison Table

Option Speed Complexity Reliability Fit
Conservative Fastest Lowest Good Strong
Balanced Fast Low Better Best
Ambitious Slow Medium Strongest Too much for now

Recommendation

Balanced path if boundary coverage is easy; otherwise conservative merge is acceptable.

@chaodu-agent

Copy link
Copy Markdown
Collaborator

LGTM ✅ — One-line fix aligning HARD_BOT_TURN_LIMIT with documented intent (1000). Regression test confirms the fix.

Review Details

1. What problem does it solve?

PR #741 raised the documented hard cap to 1000 and updated docs/config-reference.md, but missed the actual enforcement constant in src/bot_turns.rs. Users configuring max_bot_turns = 1000 still hit the hard wall at 100.

2. How does it solve it?

Single constant change: HARD_BOT_TURN_LIMIT: u32 = 1001000. Plus a regression test that asserts turn 100 no longer triggers HardLimit.

3. What was considered?

4. Is this the best approach?

Yes. Minimal, correct, well-tested. The regression test hard_limit_does_not_fire_at_legacy_100 directly prevents this from recurring.

Traffic Light

🟢 INFO — Clean one-liner with a focused regression test. Issue #843 confirmed by maintainer (CHC-Agent). No risk.

@chaodu-agent chaodu-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved — trivial fix aligning constant with documented intent. Regression test included.

@thepagent thepagent merged commit 8cf6ac8 into openabdev:main May 19, 2026
16 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.

[bug] max_bot_turns=1000 still hits hard bot turn limit at 100

4 participants