Skip to content

fix(roadmap): the stage gate log names each refused claim #5433

Closed

Description

@dan-petty

Problem Description

When a stage plan fails at a gate, no log, comment or record says which claims the gate refused. Only the gate and code counts are logged (log_gate_returns in src/devops_cli/roadmap/round_log.py, #4846).

Case of 2026-11-13, release v0.129.0, item #1976:

  • stage gate returns: ... returns=3 result=refused gates=trace:10 codes=stage_problem_trace_path:10
  • stage gate findings: ... return=3 in=8 gone=1 stuck=7 new=3
  • roadmap job result: job=stage item=#1976 result=failed class=plan_defect plan_calls=4 gate_returns=3 verify_rounds=0 tokens=3795139 seconds=1734

The trace gate refused 10 claims of the form "The Feasibility section states that {path} was read, but the run did not read it", and 7 of them stayed through the returns. Nobody can tell from this evidence if the planner claimed reads that it did not make, or if the gate refused true reads (the false-positive forms of #4590). Stage is the job with the lowest success (1 of 4 in 6 hours), and plan_defect is its top failure class, so each such failure must be classifiable.

Expected vs Actual Behavior

Expected: for each refused reply, the log names each finding: its gate, its code and its subject (for example the path or the tool that the trace gate names), masked and cut to a fixed length. Then a person or the shepherd can classify a gate failure as a planner fault or a gate fault from Loki alone.

Actual: only counts are logged.

Proposed Solution

  • Log one line for each finding of the last refused reply, or add the subjects to the existing line: gate, code, subject (the path, tool or command that the problem names), passed through mask_secrets and cut to 200 characters each, at most 20 findings for each reply.
  • Keep the counts line as it is, so the shepherd queries keep working.
  • No plan text and no model text go into the log (telemetry privacy rule): only the subject that the gate names.

Acceptance Criteria

  • A test proves that a refused reply with trace findings logs the path of each finding, and that a subject longer than 200 characters is cut.
  • A test proves that a reply with a secret-like subject logs the masked value.
  • uv run devops ci fail-to-pass --base origin/main shows the new tests fail on the base.

Existing Tool Considered

The standard logging module and mask_secrets (src/devops_cli/security/sanitizer.py) already in use. No new tool. Cost to build (estimate): 0.2 M tokens and 1 hour.

Related

#4590 (trace gate false positives), #4846 (the gate counts), #1976.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 13, 2026
  4. added a commit that references this issue on Nov 13, 2026
    09424e7
  5. added
    status/in-review
    and removed
    status/in-progress
    on Nov 13, 2026
  6. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  7. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

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