PolicyEngine / PolicyEngine/microcosm
Per-country vocabulary fences for the source-record schema union
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
From the sol half of the #698 merge review (q2): the sources schema's
kind-discriminated union is deliberately shared across US/UK/BE, so adding
any country's operation kind makes it admissible (structurally) in every
country's documents. Closed-world shapes and the byte-identity/compatibility
gates pin actual payloads, so this is admission-widening rather than a
behavior defect — but a per-country vocabulary fence (each country package
declares which kinds its stages may use; the loader refuses others) would
make cross-country vocabulary leakage fail closed at load time instead of
relying on downstream gates.
Non-blocking finding from the #698 review; candidate F1/F2 hardening.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced #698 merge review, then trace the sources schema's kind-discriminated union, the US/UK/BE country packages, and the loader. Define the country-specific vocabulary declarations and verify that a document using a kind outside its country's vocabulary is rejected at load time without weakening the existing compatibility gates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100