Skip to content

test: country-agnostic CI guard, no workflow changes needed (M3-24) - #35

Merged
YazarAyobami merged 1 commit into
mainfrom
feat/m3-24-country-agnostic-guard
Oct 8, 2026
Merged

YazarAyobami merged 1 commit into
mainfrom
feat/m3-24-country-agnostic-guard

Conversation

@YazarAyobami

Copy link
Copy Markdown
Contributor

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 with kinlock-sdk. This PR, together with kinlock-sdk#32, completes it.

Changes

  • 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.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.json is included in the scan, since "copy" is explicitly named in that same rule. docs/PRD.md/docs/ARCHITECTURE.md are out of scope, since they legitimately narrate the pre-v0.3 "abroad to Nigeria" product history.

Runs via the existing pnpm test step already in CI, mirroring lib/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 build all green.

Verified the guard can actually fail, not just trivially pass: temporarily added a real violation (// TODO: default to Nigeria for now) to lib/constants.ts, ran the suite, confirmed it failed with the exact file and term named, reverted (git diff lib/constants.ts is 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.

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.
@YazarAyobami
YazarAyobami requested a review from a team as a code owner October 8, 2026 15:13
@YazarAyobami
YazarAyobami merged commit da6a325 into main Oct 8, 2026
4 checks passed
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.

2 participants