Skip to content

fix(diagnostics): remove private issue refs in checks and add AST guard - #207

Merged
Paul-Kyle merged 2 commits into
phasespace-labs:mainfrom
Kaap10:fix/issue-205-diagnostics-bare-issue-refs
Sep 12, 2026
Merged

Paul-Kyle merged 2 commits into
phasespace-labs:mainfrom
Kaap10:fix/issue-205-diagnostics-bare-issue-refs

Conversation

@Kaap10

@Kaap10 Kaap10 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #205

Summary of Changes

  • Cleaned up 10 bare #NNN issue references across git_identity.py, memory_dir.py, and recall_write_health.py (including module constant and remediation text).
  • Added AST test guard test_no_issue_refs_in_diagnostics_strings in tests/test_no_issue_refs_user_surface.py scoped to palinode/diagnostics/.
  • Added changelog entry under ## Unreleased > ### Fixed in docs/CHANGELOG.md.

Verification

  • Verified test guard fails before fix and passes after.
  • All unit & changelog tests passed (66/66 passed).
  • ruff check and bandit passed with zero errors.

@Paul-Kyle
Paul-Kyle merged commit d57b7cf into phasespace-labs:main Sep 12, 2026
13 checks passed
@Paul-Kyle

Copy link
Copy Markdown
Member

Merged — thank you, this is a clean piece of work.

Two things I want to name specifically. Scoping the guard to palinode/diagnostics/ at the directory boundary is exactly right: a repo-wide version can't work, because it would reject this same file's test_bare_number_is_rejected fixture, and you sidestepped that structurally rather than with an exclusion list. And you reused _issue_refs instead of writing a second definition of what counts as unfollowable — that distinction is deliberately single-sourced, so extending the guard without forking it is the right instinct.

You also updated the existing linked_issue == "#190" assertion in test_diagnostics_skeleton.py alongside the implementation, in its own clearly-named commit. Carrying the test surface with the change instead of leaving it to the reviewer is the part that made this reviewable in one pass.

One note for anyone reading this back: the guard covers docstrings as well as ordinary literals, since both are string constants to the AST. That's the behaviour we want — worth knowing so it isn't a surprise the first time a docstring trips it.

I'll add you to AUTHORS.md. If you'd like another issue, say so and I'll point you at one.

@Kaap10

Kaap10 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Paul-Kyle! Appreciate the detailed review, feedback, and the add to AUTHORS.md.

I'd love to take on another issue #169 - please feel free to point me at one whenever convenient!
I've commented on #169 as well!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor: check results cite private-tracker issue numbers, one of which links to an unrelated public issue

2 participants