PolicyEngine / PolicyEngine/microcosm

Per-country vocabulary fences for the source-record schema union

Open
#726 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.