Skip to content

xtask check-architecture-doc: guard against slash-containing prose false-failing CI #440

Closed

Description

@jussielo-amd

Background

Follow-up from review on #432 (cargo xtask check-architecture-doc).

is_path_candidate (xtask/src/architecture_doc.rs) treats any backtick-quoted span containing / as a path citation unconditionally, with no guard against ordinary prose. Hyphenated bare words got an explicit guard against this exact failure mode (see the is_hyphenated_bare_word handling around architecture_doc.rs:574, protecting against e.g. `read-only` in prose), but nothing analogous exists for slash-containing prose.

So a future edit to docs/architecture.md containing backtick-quoted prose like `read/write`, `and/or`, or `GPU/CPU` would be misread as a path citation and false-fail CI, since none of those exist in the tracked tree.

Confirmed not currently live: docs/architecture.md doesn't contain this pattern today, so this isn't breaking anything yet — it's a latent trap for whoever edits the doc next.

Suggested fix

Extend is_path_candidate (or a helper it calls) with a guard analogous to is_hyphenated_bare_word, requiring path-shaped segments on both sides of / (e.g. each segment itself looking like a plausible path/file/directory component) before treating a slash-containing span as a citation, rather than accepting any slash unconditionally.

Add a regression test with common slash-joined prose phrases (read/write, and/or, GPU/CPU) confirming they're not treated as citations, alongside the existing real path/directory cases.

Reported independently by two reviewers on #432 (Copilot and juhovainio), both flagged non-blocking and suitable for a follow-up rather than expanding that PR further.

Activity

  1. added 7 commits that reference this issue on Oct 2, 2026
    443d36d
    8e893c6
    6d9a61b
    1269086
    265c5da
    6caf9d2
    bddb840
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