Skip to content

fix(roadmap): a citation quote in its own code span fails #4297

Closed

Description

@dan-petty

Problem

The citation check of the stage job refuses a line citation that follows the stage prompt.

The prompt (src/devops_cli/ai/tasks/roadmap_stage_change.md) says: "write the citation as path:line:text, with the text of that line in a code span". A model can read this as the path and the line, and then the text in a code span of its own: src/x.py:12: followed by def f(): pass in backticks. _LINE_CITATION in src/devops_cli/roadmap/stage/stage_change.py reads the text up to the next backtick. For this form the text is a space, so the check says "cites src/x.py with fewer than 3 characters of the line", and the model cannot see what is wrong.

Evidence: the Service logs of the stage job (Loki, 24 hours), word for word. #3406: five sentences "The feasibility of the plan cites src/devops_cli/roadmap/stage/stage_probe.py with fewer than 3 characters of the line." (also premise.py, stage_models.py, stage.py, messages.py). #3532: seven such sentences. #3462 and #3612 have one each. I did not see the replies, so the form is read from the gate and the prompt, and the live check after the change tests it. The citation gate counted 12.3 refusals in the last 6 hours.

Expected

  • A line citation whose text is empty after path:line: takes its text from the code span that follows, with the closing backtick of the citation and white space between them allowed.
  • The text is compared to the line as before. A text of fewer than 3 characters, and a text that the line does not hold, are still refused.

Acceptance criteria

  • uv run devops ci test tests/roadmap/stage/test_roadmap_stage_citation_quote.py passes. It fails on the base.
  • uv run devops roadmap eval stage --replay keeps its result: every gate refuses what it must refuse, and 5 of 5 good plans pass.

Existing tool considered

No library reads the citation form of this project. The change adds one pattern next to _LINE_CITATION. 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/high
    effort/low
    on Nov 9, 2026
  2. dan-petty commented on Nov 9, 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: P1-High. 12.3 gate refusals in 6 hours block valid plans from passing the stage job.
    • Value: High. Valid plans are refused repeatedly, blocking the roadmap workflow for all users.
    • Effort: Low. One new pattern next to _LINE_CITATION plus a test file, about 45 minutes.
    • Related: fix(roadmap): the trace gate refuses a read file's citation #4290, which asks for a different change. Both fix citation parsing in the stage job gates, but #4290 fixes the trace gate path comparison while this fixes the citation check text extraction.
  3. added
    priority/p1-high
    status/in-progress
    and removed
    status/new
    on Nov 9, 2026
  4. removed
    status/in-progress
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor
  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-10 01:54 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/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions