Repository navigation
Description
Problem or Motivation
16 tests drive the production limits through a scripted model: 500 requests and 1,500 tool calls (src/devops_cli/config/constants.py:3354-3355), and 200 toolbox calls (constants.py:3232). The 12 slowest of them take 108.5 s with no coverage, 5.3-11.6 s each (measured).
9 implement-world tests poll the real PR-monitor timeout, which is 120 polls (src/devops_cli/config/defaults.py:890, 909). Each poll runs a real git rev-parse in PullFake (tests/support/roadmap_implement.py:437). These 9 tests take 48.9 s with the registry cached (measured).
Saving: 50-130 s of CI worker time from the limits and about 45 s from the polls (estimated).
Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.
Proposed Solution & Architectural Design
run_stepandrun_fix_step(src/devops_cli/roadmap/implement/implement_step.py) take an optionallimits: UsageLimits, andToolboxClient(src/devops_cli/roadmap/stage/stage_toolbox.py) takes an optional budget. The constants are the defaults.- The tests pass small limits (for example 6 requests, 12 tool calls and a budget of 8) and keep their relative asserts.
- One test asserts that the defaults equal the constants.
- Set
roadmap.implement.monitor_timeout_secondssmall in the implement-world config. - fix(roadmap): halt implement step on consecutive command refusals #4043 changes
implement_step.pynow. Start after it merges.
Risk: The tests no longer run at the exact production numbers. The test of the defaults covers the wiring.
Target Subsystem
AI & Agentic Review Pipeline (src/devops_cli/roadmap/implement/, src/devops_cli/roadmap/stage/stage_toolbox.py, tests/support/roadmap_implement.py).
Existing Tool Considered
UsageLimits of pydantic-ai, which the code already uses. No new tool. Cost: about 30,000 tokens and 2 hours.
Acceptance Criteria
- Each limit test takes 2 s or less with no coverage.
- Each monitor test polls 5 times or less.
- One test proves that the default limits equal the constants.
Dependencies
None. Start after #4043 merges, because it changes the same file.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(roadmap)scope of the title gives the scope.It saves 95 to 175 s of CI time per run, which is valuable but not a blocking defect.It shortens CI queue time for every pull request by removing 95 to 175 s of idle test work.The change edits test configs, adds one assertion, and sets a small timeout; the author estimates 2 hours.Both reduce CI test duration, but #2699 targets the overall check time while this candidate changes specific limit and monitor tests to use small values.test(roadmap): run the limit and monitor tests with small limits
test(roadmap): pass the usage limits to the attempt in the MCP test