Skip to content

Pay down the 142 bare #NNNN issue references the code-reference check now counts #3132

Closed

Description

@malibio

Problem

scripts/check-code-references.ts enforces CLAUDE.md's rule against citing GitHub issue numbers in code, but until #2997 its patterns missed a bare #NNNN in prose ("see #990", "the #2242 audit", "#2182: …"). Its header claimed the retroactive triage was complete at baseline 0. It wasn't: 142 lines across ~50 files still cite issue numbers, and #2997 set the issue-number baseline to that real count.

Where they are

Run bun run scripts/check-code-references.ts to see the count. Most are in:

  • packages/agent/src/local_agent/{agent_loop,tools,routing}.rs and packages/agent/tests/live_*.rs / golden_*.rs
  • scripts/eval/fixtures/agent-matrix.ts, scripts/eval/runner.ts
  • packages/desktop-app/src/tests/** (test names and comments)
  • packages/daemon/src/services/local_agent_service.rs, packages/core/src/**

Acceptance criteria

  • Each constraint-bearing reference has its constraint inlined before the number is dropped; provenance-only citations are deleted
  • BASELINES.issueNumberReferences in scripts/check-code-references.ts is lowered as the count drops (to 0 when done), and the header comment is updated to match
  • Can be split across PRs by package; each PR lowers the baseline by what it paid down

Activity

  1. added
    sweep
    on Sep 27, 2026
  2. malibio commented on Sep 27, 2026

    @malibio
    CollaboratorAuthor

    From PR #3133 review: while the backlog is non-zero, a baseline failure lists every matching line (~143) without singling out the new one. Consider having baselineFailures() lead with hits from files changed against origin/main. Becomes moot once the baseline reaches 0.

  3. self-assigned this
    on Sep 29, 2026
  4. mstomar125 commented on Sep 29, 2026

    @mstomar125
    Contributor

    Non-agent part done in PR #3292 (merged): 72 references removed outside packages/agent (constraint-bearing ones inlined, provenance-only dropped, test names renamed); baseline 143 → 71. All 71 remaining references are in packages/agent, left for its owner.

  5. mstomar125 commented on Nov 3, 2026

    @mstomar125
    Contributor

    Picking this up (sweep drain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

sweep

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions