Skip to content

feat(jev): skip code blocks and inline code when finding citations #2003

Description

@newhoggy

Follow-up to #2001, which covered only the primary fix.

Problem

find_citations (src/jev/citations.rs) scans the whole state text, fenced code blocks and inline code spans included. A quoted error message or example such as owner/repo#123 or o/r#1 then becomes a citation. Since #2001 this no longer aborts the run, but it still:

  • sends a pointless gh api graphql lookup, and
  • adds noise to route's reference_fetch_failures. The live omni-dev ai jev route 2000 now reports owner/repo#123, o/r#1 and o/r#2 as failures, all quoted examples.

Proposal

Have find_citations skip fenced code blocks (``` / ~~~) and inline code spans.

Care needed

verify-decision also uses find_citations, both for the comment's citations and in resolve_cites_index. A decision comment that deliberately puts a real reference in backticks (for example `#1614`) would stop being checked against its source. Decide whether both commands skip code, or only route. Pin the choice with tests on both sides.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions