Skip to content

feat(roadmap): log each fix round and each failed stage item #4535

Closed

Description

@dan-petty

Problem or Motivation

No log line shows what a fix loop of the roadmap jobs did, so the pass rate of a return cannot be measured.

Evidence on origin/main 7234d71:

  • _returned (src/devops_cli/roadmap/stage/stage.py:1160) sends a refused plan back to the model up to CONST_ROADMAP_STAGE_GATE_RETURNS times. It logs each refused reply (stage reply refused: ...), but no line says that a reply passed after a return.
  • _verified (stage.py:1278) runs the model review and up to CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS repair rounds. No line gives the round or its counts of findings.
  • _record_failures (stage.py:2670) writes each failed item to its job record. The Service logs no line for each failed item.
  • _report (src/devops_cli/roadmap/implement/implement_submit.py:285) reports each ended implement Job in a comment and in metrics, but writes no log line for the attempt.
  • _format_error_line (src/devops_cli/roadmap/run.py:1397) keeps only the first line of an error, cut at 256 characters. The stage error names each failed item in one text, so a long reason of the first item hides the others. In a study of 48 hours of Service logs, the failure lines named 433 of 628 failed items.

So only 32 of 54 refused stage runs could be joined to a result, and the pass rate of a return is somewhere between 9% and 37%.

Proposed Solution & Architectural Design

One log line with counts and no model text for each of these events:

  • a stage reply that passed or stayed refused after one or more returns: item, returns, result;
  • a stage review round: item, round, findings, findings that return the plan, open findings;
  • a failed stage item: item, step, failure class;
  • an ended implement attempt: item, Job state, failure class, repair rounds, new tokens, and the runner image digest that the item record holds (implement.job_digest).

Each stage line carries the devops-cli version of the Service. The release workflow builds the Service image only for a release, with the release tag and latest, so the version names one image digest; the Service process cannot read its own digest with no Kubernetes API request.

The error line of a round names every failed item: an error with failed_items adds the numbers after the first line, outside the cut at 256 characters.

Target Subsystem

Roadmap Service: stage job, implement submit, the round error line.

Existing Tool Considered

The standard logging module and the JSON log format of the Service, which Loki reads. No tool is new.

Related: #3650, #3666, #4521.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  2. 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 observability and enables pass-rate measurement but does not block a user-facing flow.
    • Value: Medium. Operators can measure return pass rates and trace failed items, which aids debugging and capacity planning.
    • Effort: Medium. It adds several log lines across stage.py, implement_submit.py, and run.py, plus a small change to the error-line format.
    • Related: fix(roadmap): stage metric and log give no left-out reason #4521, which asks for a different change. Both add log lines to the stage job, but #4521 logs the reason an item is left out while the candidate logs fix rounds, review rounds, failed items, and implement attempts.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 11, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 14:13 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