Repository navigation
Description
Split from #3908.
Problem: The scheduled sweep calls the model on each run. It makes the call even when the collectors found no new record, and it has no cap on the records of one run. Each run costs tokens, and a long run delays the next one. The body of #3908 asks for the freshness gate and the record limit as settings of the row, and ADR 0021 removes the row, so they do not arrive with the schedule. Why deferred: The gate and the cap change the devops research sweep command. They need their own tests with a fake model client, and they are a second change. The schedule of #3908 works without them. Acceptance criteria: a test shows that the sweep makes no model call when the collectors return no new record; a test shows that the sweep stops at the record limit and reports the number of records that it skipped; a test shows that the sweep makes one model call for each new record under the limit.
Proposed design
Problem statement
The research sweep calls the model on every run, even when the collectors return no new record, and it has no cap on the records of one run. This wastes tokens and makes a long run delay the next sweep. The change adds a freshness gate and a record cap to devops research sweep.
Acceptance criteria
Requirement: No model call without new records
The research sweep SHALL not call the model when the collectors return no new record.
Scenario: Collectors return no new record
- WHEN the collectors return no new record
- THEN the fake model client records zero model calls.
Requirement: Record limit stops the sweep
The research sweep SHALL stop at the record limit and SHALL report the number of records that it skipped.
Scenario: Collectors return more records than the limit
- WHEN the collectors return more new records than the record limit
- THEN the sweep processes exactly the record limit and reports the number of skipped records.
Requirement: One model call for each new record
The research sweep SHALL make one model call for each new record when the count is under the record limit.
Scenario: Collectors return fewer records than the limit
- WHEN the collectors return N new records and N is less than the record limit
- THEN the fake model client records N model calls.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this internal behavior. The change extends the existing devops research sweep command; the written cost is about 2,000-4,000 tokens to build, keep and fix, and less than one hour elapsed.
Key questions
None.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 20, 2026
Both concern the research sweep, but #3908 delivers the schedule while this candidate adds the freshness gate and record cap to the sweep command itself.[-]feat(research): skip the model step when no record is new and cap the record count[/-][+]feat(research): Skip model call when no new record and cap record count[/+]devops-cli-service commentedon Nov 20, 2026
The job shortened the title of this item. The summary had 66 characters, and the limit is 60. The type and the scope stay.
feat(research): skip the model step when no record is new and cap the record countfeat(research): Skip model call when no new record and cap record countdevops-cli-service commentedon Nov 22, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.