Skip to content

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

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-app. This PR, together with a matching one in kinlock-app, completes it.

Changes

  • packages/sdk/src/__tests__/country-agnostic.test.ts
  • services/indexer/test/country-agnostic.test.ts

Both fail if nigeria, naira, ngn, or lagos (case-insensitive, whole-word) appears anywhere in source, excluding *.test.ts files. 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 project's fixtures and app deliberately exercise several real markets side by side (multi-country is required, not banned). Docs (docs/PRD.md, docs/ARCHITECTURE.md) are out of scope, since they legitimately narrate the pre-v0.3 "abroad to Nigeria" history.

Runs via the existing pnpm test step already in both packages' CI (.github/workflows/ci.yml), so no CI workflow file changes were needed: same pattern kinlock-app's lib/i18n/inline-strings.test.ts already uses for its own (different) check.

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 (165/165), pnpm build all green.

Verified both guards can actually fail, not just trivially pass: temporarily added a real violation to one file in each package (packages/sdk/src/errors.ts, services/indexer/src/config.ts), ran the suite, confirmed both failed with the exact file and term named, reverted (git diff on both files is empty, confirming byte-identical to before), ran again, confirmed a clean pass.

Docs / ADR

None needed.

Roadmap

M3-24 → DONE (cross-cutting; kinlock-app's matching PR marks the same row the same way). Phase 4 App (this repo's own copy of that table): 1→2 DONE, 22→21 TODO (4%→8%). All rows: 44→45 DONE, 118→117 TODO (25%→26%). Changelog entry added.

Assumptions and open questions

None.

Added packages/sdk/src/__tests__/country-agnostic.test.ts and
services/indexer/test/country-agnostic.test.ts: fails if nigeria,
naira, ngn, or lagos (case-insensitive, whole-word) appears anywhere
in source, excluding *.test.ts 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 both packages' CI, so
no workflow file changes were needed.

Verified the guard can actually fail: temporarily added a real
violation to a file in each package, confirmed both caught it,
reverted, confirmed a clean pass.
@YazarAyobami
YazarAyobami requested a review from a team as a code owner October 8, 2026 15:11
@YazarAyobami
YazarAyobami merged commit 3078935 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