Skip to content

fix(roadmap): log why a stage reply holds only placeholders #4313

Closed

Description

@dan-petty

Problem

More than half of the failures of the stage job in 7 days are replies that hold only placeholders, and the cause is not known.

In the failure texts of the stage job (Loki, service_name=roadmap-service, 2026-11-04 to 2026-11-09), 84 of 161 failures that the checks caused hold the sentence "The text of why is the placeholder x" or "... placeholder" (or test) for why, existing_tool, feasibility and the implementation of group 1, with "skip_specs is false, and the reply gives no spec delta". The latest ones are from 2026-11-09 at 16:24 (#3570) and 12:47 (#3717, #3727). #4204 made the job stop such an item at once, with no second request, and #4260 and #4269 keep the refused replies. Nothing records why the model answers with a placeholder.

Candidates that the code allows, none shown by evidence: the tools end when the messages fill the context window (#3037) and the run is forced to answer; a request after the limit of tool calls; a gateway fallback to another model. The logs of one refusal say "request=71 input_tokens=188657 tools_offered=True" for #3414 on 2026-11-09, so a long run is real.

Expected

  • The log line of a degenerate reply (_note_refused with result degenerate) also gives the stop reason of the run, the number of tool calls, whether the tools were ended for the context window, and the model that answered (served_by).
  • With that line, one more day of logs shows which cause holds, and a later change fixes it at the source.

Acceptance criteria

  • A test of a degenerate reply shows the new fields in the log record. It fails today.
  • uv run devops roadmap eval stage --replay keeps its result.

Existing tool considered

RunTrace in src/devops_cli/roadmap/agent_run.py already holds the counts. The change prints them. Cost: about 15 000 tokens to build, 2 000 to keep, and 45 minutes.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 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/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It unblocks diagnosis of the top failure mode but is not itself a user-facing fix.
    • Value: Medium. It enables identification of the root cause of 84 of 161 stage failures.
    • Effort: Low. The body states about 45 minutes and 15 000 tokens to build.
    • Related: fix(roadmap): remove the cause of placeholder stage replies #4205, which asks for a different change. Both address placeholder stage replies; #4205 fixes the cause, the candidate adds log fields to diagnose it.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 10, 2026
  4. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Evidence for #4313 (Loki and Prometheus, read 2026-11-10 02:00Z)

    What the logs show.

    What changed at that time. #4238 (merged 16:57Z, deployed some time after it) made the window estimate follow the real input. Before it, the estimate was about 1.4 times the real input, so the run took the function tools from the model at about 105 000 real tokens. devops_cli_roadmap_tool_limit_hits_total{limit="window"} was 20 to 37 per 3 hours until 16:47Z and fell to 7.8 and then 2.1 per 3 hours after it.

    Finding. The placeholder replies most likely come from a forced answer: the run withdrew the tools too early, and the model had to fill the output tool before it had read the code. The proof needs the new line: limit=window with result=degenerate. If the line shows another stop reason, the cause is another one. This pull request adds the facts; it does not change the planner.

    Not checked. tool_choice and max_tokens of the gateway request are not in the logs; finish_reason will show a stop at the length.

  5. removed
    status/in-progress
    owner/agent
    on Nov 10, 2026
  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-10 03:32 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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions