Skip to content

feat(research): Skip model call when no new record and cap record count #6569

Open

Description

@devops-cli-service

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

  1. added
    type/feature
    source/agent
    on Nov 20, 2026
  2. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    status/new
    value/medium
    effort/medium
    scope/research
    priority/p2-medium
    on Nov 20, 2026
  4. changed the title [-]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[/+] on Nov 20, 2026
  5. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 66 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(research): skip the model step when no record is new and cap the record count
    • After: feat(research): Skip model call when no new record and cap record count
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/researchsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions