Skip to content

feat(roadmap): extend stage gate returns while the plan improves #4851

Closed

Description

@dan-petty

Problem or Motivation

After #4802 a refused reply gets 2 returns. In 24 of 44 returns every first problem was gone and the item still failed on new problems, and 8 of 10 sampled items had less problem text at the second reply, so some items need a third reply. Other items cannot pass: 0 of 17 stale-test-path problems cleared (a gate defect, #4791), and #4472 repeated one problem. Today each refused reply spends its returns, and an item that a gate defect refuses counts toward the return to New after 3 plan defects.

Proposed Solution & Architectural Design

At each refusal in _returned run the fixable check:

  1. Class each finding with the feat(roadmap): keep the stage gate problems as a list with a code #4846 data file.
  2. Any never or stuck finding -> refuse at once with the reason and no planner ask. A never finding of a known gate defect (stale-test-path while fix(roadmap): stop refusing test paths in base docstrings #4791 is open) gets the class check_suspect: it waits 6 hours and does not count toward the 3 plan defects; a total of 5 item-class failures on one body returns the item to New with the reason.
  3. When the returns used reach roadmap.stage.gate_returns, the point stage.gate_returns (feat(roadmap): add the soft-cap and fix-check chain to decision points #4847) decides one more return: rule = no stuck and no never finding and (every problem of the reply before is gone, or fewer problems, or less problem text); Jev (Noul: yes/no with a probability) 'progressing' and 'fixable'. Step +1, at most 1 extension, hard ceiling 3 returns (4 planner asks), with the fix(roadmap): loosen the caps that turn a stage refusal into a loss #4802 time and drain guards.
  4. The failure text names the stop (stuck , not fixable , ceiling, time). Keep the stage drought rule (a refused kept plan uses no return).

Target Subsystem

SDLC, Git & PR Governance (roadmap stage).

Existing Tool Considered

The #4847 chain and Jev; the #4846 class data file. No new library. Cost to build: about 2M tokens, 1 day.

Acceptance Criteria

  • Replay test of the saved refused record of item 4028 (problems fall): it gets a third return.
  • Replay test of the fix(ci): a narrowed ci test runs many slow tests serially #4472 record (same stale test path): refused at once with class check_suspect and no planner ask.
  • A test: a check_suspect failure does not raise the plan-defect count, and the fifth item-class failure on one body returns the item to New.
  • A test: model down -> the rule decides.
  • A test: no item gets more than 4 planner asks.
  • 7 days after mode on: the share of failed stage rounds that end at the return cap is under 30% (from 66 of about 110), and each extension has an outcome line.

Dependencies

#4802; #4846; #4847; the stage drought fix that stops a refused kept plan from using a gate return (filed by the stage drought work), merged first.

Source: #4843

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It improves an existing process but depends on three other open items and is not a blocking defect.
    • Value: Medium. It cuts wasted planner asks and stops gate defects from counting against plan-defect limits, but only for items that show partial progress.
    • Effort: Medium. The body estimates about 2M tokens and 1 day, touching classification, extension logic, and five acceptance tests.
    • Related: fix(roadmap): loosen the caps that turn a stage refusal into a loss #4802, which asks for a different change. Both change stage gate return behaviour; #4802 raises the static return cap and wait times, while this adds a conditional extension with progress detection and a check_suspect class for known gate defects.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Scope note for this item: the model review of a stage plan has the same hard bound as the gate returns. CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS is 2, and a plan that still has an open finding after the last round opens as a draft with plan/needs-fix.

    Evidence (Loki, stage review round: lines, 24 hours to 2026-11-12): #4472 and #4945 used both review rounds while the plan still improved, and stopped with open findings that return the plan.

    #5066 builds the deterministic part for the review rounds: the setting roadmap.stage.verify_repair_rounds (default 2, a hard ceiling with le=), one more round only while the count of open findings drops from one review to the next (no model call), no round past the ceiling, and no round while the Service drains (#4925). So this item does not need to build the review rounds again. When this item adds the progress-aware extension of the gate returns, it can use the same rule shape for both, and #4866 can add its fixable check on top of #5066.

  6. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Evidence from the stage job (0.127.0), item #5136, 2026-11-13 06:06Z to 06:42Z: the run stopped at the third gate return with class plan_defect (plan_calls 4, gate_returns 3, verify_rounds 1, 4.7M tokens, 36 min). The gate findings fell from 3 to 1, then a different single finding came up: return 1 in=3 gone=2 stuck=1, return 2 in=1 stuck=1, return 3 in=1 gone=1 new=1 (stage_problem_trace_path). This is the case that this item describes: the plan improved, and the fixed limit of 3 returns stopped it. The stage job had 1 success in 3 attempts over the last 6 hours.

  7. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  8. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  9. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 12:38 UTC

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/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions