Skip to content

test(tier3): run the Bedrock judge-deadline retry test on a manual clock - #393

Merged
rng1995 merged 1 commit into
mainfrom
naren/deflake-bedrock-deadline-retry-test
Nov 9, 2026
Merged

rng1995 merged 1 commit into
mainfrom
naren/deflake-bedrock-deadline-retry-test

Conversation

@rng1995

@rng1995 rng1995 commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

test_bedrock_converse_aborts_when_judge_deadline_exhausted_before_retry sets a real 0.5 s judge deadline and expects the retry-backoff check to stop the call ("LLM judge time budget exhausted before retry"). Importing boto3 and building the first bedrock-runtime client happen after that deadline is set. On a loaded host that takes longer than 0.5 s, so the pre-request check fires first with "LLM judge time budget exhausted" and the assertion fails.

This test now replaces the verifier's time module with a manual clock, the same pattern tests/tier3/test_judge_policies.py already uses. Monotonic time moves only when the code sleeps, so setup cost never counts against the deadline.

Evidence

  • The Python 3.14 job on feat(plugin): recognize native OpenClaw manifests in the private plugin helpers #391 failed this way (run 42444856804, job 128621574850). That PR does not touch the judge template or this test.
  • On a busy macOS host the old test failed every run on clean main. Building the first client took 7–9 s there.
  • With the manual clock it passes every run, including on that host.
  • Disabling the backoff deadline check in templates/eval.py still fails the test, so it keeps guarding the behavior.

Testing

  • tests/test_retry.py and tests/tier3/test_judge_policies.py: 152 passed.
  • ruff check and ruff format --check pass.

Test-only change, so no CHANGELOG entry (as in #358).

🤖 Generated with Claude Code

test_bedrock_converse_aborts_when_judge_deadline_exhausted_before_retry set
a real 0.5 s judge deadline and expected the retry-backoff check to fire.
Importing boto3 and building the first bedrock-runtime client happen after
that deadline is set, and can take longer than 0.5 s on a loaded host (seen
on PR #391's Python 3.14 job; every run on a busy macOS host). The
pre-request check then fired first with "LLM judge time budget exhausted"
and the assertion on "... before retry" failed.

Replace the verifier's time module with a manual clock for this test, as
tests/tier3/test_judge_policies.py already does, so setup cost never counts
against the deadline. Removing the backoff deadline check still fails the
test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 merged commit 35ef01e into main Nov 9, 2026
19 checks passed
@rng1995
rng1995 deleted the naren/deflake-bedrock-deadline-retry-test branch November 9, 2026 03:01
rng1995 added a commit that referenced this pull request Nov 9, 2026
Bring in #393, which runs the Bedrock judge-deadline retry test on a
manual clock so the Python 3.14 job no longer fails on it. No conflicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
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