Repository navigation
test: country-agnostic CI guard, no workflow changes needed (M3-24) - #32
Merged
Merged
Conversation
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.
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-app. This PR, together with a matching one inkinlock-app, completes it.Changes
packages/sdk/src/__tests__/country-agnostic.test.tsservices/indexer/test/country-agnostic.test.tsBoth fail if
nigeria,naira,ngn, orlagos(case-insensitive, whole-word) appears anywhere in source, excluding*.test.tsfiles. Grounded directly inAGENTS.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 teststep already in both packages' CI (.github/workflows/ci.yml), so no CI workflow file changes were needed: same patternkinlock-app'slib/i18n/inline-strings.test.tsalready 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 buildall 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 diffon 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.