Repository navigation
test: country-agnostic CI guard, no workflow changes needed (M3-24) - #35
Merged
Merged
Conversation
Added lib/country-agnostic.test.ts: fails if nigeria, naira, ngn, or lagos (case-insensitive, whole-word) appears anywhere under app/, components/, lib/, or messages/, excluding test files. Grounded in AGENTS.md's own quick-reference wording, not a general country/ currency-word ban. Runs via the existing pnpm test step already in CI, mirroring lib/i18n/inline-strings.test.ts's pattern for a different check. Verified the guard can actually fail: temporarily added a real violation to lib/constants.ts, confirmed it was caught, reverted, confirmed a clean pass. Matching PR in kinlock-sdk (#32) completes this cross-cutting row.
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 and why
M3-24("CI guard: fail on hard-coded country, currency, anchor, or locale literals outside registry data, tests, and fixtures") is a cross-cutting row owned jointly withkinlock-sdk. This PR, together with kinlock-sdk#32, completes it.Changes
lib/country-agnostic.test.ts: fails ifnigeria,naira,ngn, orlagos(case-insensitive, whole-word) appears anywhere underapp/,components/,lib/, ormessages/, excluding*.test.ts/*.test.tsx.Grounded directly in
AGENTS.md's own quick-reference wording ("Don't assume Nigeria or naira in code, tests, fixtures, or copy"), not a general country/currency-word ban: this app's fixtures and UI deliberately exercise several real markets side by side (multi-country is required, not banned).messages/en.jsonis included in the scan, since "copy" is explicitly named in that same rule.docs/PRD.md/docs/ARCHITECTURE.mdare out of scope, since they legitimately narrate the pre-v0.3 "abroad to Nigeria" product history.Runs via the existing
pnpm teststep already in CI, mirroringlib/i18n/inline-strings.test.ts's existing pattern for a different check (externalized strings). No CI workflow file changes needed.Hard rules / invariants touched
Hard rule 11 (country-agnostic core). This is the automated enforcement of it, not a change to it.
Tests
pnpm lint,pnpm typecheck,pnpm test(166/166),pnpm buildall green.Verified the guard can actually fail, not just trivially pass: temporarily added a real violation (
// TODO: default to Nigeria for now) tolib/constants.ts, ran the suite, confirmed it failed with the exact file and term named, reverted (git diff lib/constants.tsis empty, confirming byte-identical to before), ran again, confirmed a clean pass.Docs / ADR
None needed.
Roadmap
M3-24→DONE(cross-cutting;kinlock-sdk's matching PR marks the same row the same way). Phase 4 App: 14→15 DONE, 7→6 TODO (54%→58%). All rows: 44→45 DONE, 118→117 TODO (25%→26%). Changelog entry added.Assumptions and open questions
None.