Repository navigation
Guard against real clinic codes in identifiers; add CODESTYLE.md - #29
Merged
Merged
Conversation
A test now fails when a tracked file holds a patient identifier whose country and clinic code match the clinic reference file. It found one leftover in the rebuild-findings fixture, replaced with a stand-in. CODESTYLE.md records the explicit-canonical-config rule for review, and CLAUDE.md names dev as the trunk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tests/test_no_real_patient_identifiers.py: fails when any tracked file contains a patient identifier whose country and clinic code together match a clinic inreference_data/clinic_data.xlsx. Matches underscore and hyphen separators and any casing. Reference data itself is exempt.CODESTYLE.md(new): review standards. First rule: when several source spellings map to one concept, declare one canonical name with its aliases (as the synonym YAMLs do); never let list order pick the winner, and raise on an ambiguity the config cannot resolve.CLAUDE.md: namesdevas the trunk (it still saidmigration) and points toCODESTYLE.md.Why
The repository is public. Patient identifiers are pseudonymous, but anyone holding a clinic's patient list can resolve them. The history rewrite removed the real ones; this test keeps them from coming back. It matches on the country and clinic pair, not the clinic code alone, because two real clinic codes start with Q, the letter the stand-ins use.
Limit: identifiers built at runtime from a format string are invisible to the check; review still has to catch those.
Verification
just lint,just format-check,just check: pass.just test: 1401 passed, 1 skipped.