ADR-072: Policy Placement Doctrine — Rules Engine vs StateBundle vs Source

Status

Accepted (2026-08-31) — maintainer-directed at the financial-pair G-A review; passed the plan-mode external-review gate (round 2, same day) alongside the plans that apply it. Amended in part by § Amendment — #949 (Proposed 2026-09-20 with the program plan AFCARS 2020 Program (#949); Accepted at its close-out P-E, #1966): a jurisdiction-INVARIANT tier-1 class, rulesets/federal/.

Context

The subsidy programs (ADR-055/056/057) accumulated jurisdiction-flavored behavior in three homes with no recorded placement rule: Rust source (enrollment refusal shapes, reason matrices, the ADR-054 office matrix — a hardcoded county/regional/state triad across ~31 sites), StateBundle reference data (#1072: SubsidyPolicySpec constants), and the rules engine (the program rulesets + operation-discriminated families). The G-A review surfaced it concretely: a plan proposed relaxing an enrollment refusal by editing source, another proposed hardcoding an age predicate, and the office matrix presupposes an administrative-unit design some jurisdictions do not have. Two maintainer directives followed: policy of this shape is ALWAYS rules-engine, never source; and no part of CRAIG may presuppose an admin-unit design.

Decision

Three tiers. Every new behavior names its tier at design time; a reviewer disputes the classification, never the rule. The first external review of this ADR (2026-08-31) found the original two-tier tests overlapped ("could jurisdictions differ?" was also true of tier-2 constants); the tests below are the corrected cut.

Tier Test Home

1 — Legal-policy variance

The BEHAVIOR varies by jurisdiction law/practice: predicates, vocabularies, refusal/acceptance postures, reason + authority matrices, anything answering "may/must this happen HERE". If the SHAPE of the decision (its arms, not just its numbers) can differ lawfully, it is tier 1.

The rules engine — versioned JDM rulesets under rulesets/<jurisdiction>/ (program or operation-discriminated families), promoted via rules-promote, cited via ADR-070. Never Rust source. Since § Amendment — #949 a federal standard that binds every jurisdiction lives under rulesets/federal/.

2 — Reference values

A VALUE varies but the consuming behavior’s shape does not: rates, residence-month floors, proration method selection, code vocabularies. The machinery is identical across jurisdictions; only the datum differs. When a value’s PRESENCE or APPLICABILITY varies (not just its magnitude), that is shape — tier 1. And a number is NOT tier 2 merely for being a number: the reconcile floor’s 12 months parameterizes AUTOMATION REACH, not lawful variation — a jurisdiction tuning it would change what background machinery may do unattended, which is tier 3’s question. The discriminator: "who would lawfully want this different?" — a legislature (tier 1/2) or an operator (tier 3, refused).

StateBundle reference data (the #1072 pattern: compiled, boot-resolved, fail-closed). Re-affirmed, not relitigated.

3 — Technical safety caps

An ENGINEERING property of the machinery that holds in every deployment because the system’s correctness depends on it: double-pay exclusivity, idempotency identities, crash-atomicity, lock protocols — and bounded-automation caps like the reconcile floor’s "background generation reaches at most 12 months back". Tier-3 claims are engineering claims, NOT legal ones: the 12-month cap does not assert that no jurisdiction may pay older months (backpay exists exactly for that) — it asserts that AUTOMATION never does it unattended.

Source + DB constraints + the invariant catalog. Configurability here would be a defect.

Administrative authority: tier 1, single source

The office matrix is tier-1 policy in a tier-3 costume. A jurisdiction-configurable administrative-authority program (its own epic + plan-mode plan) replaces the hardcoded triad with a jurisdiction-declared unit hierarchy + per-action floors, fail-closed when unconfigured — DELIVERED as ADR-074 (epic &86, 2026-09-12): the triad is deleted, the family is the single source. SINGLE SOURCE OF TRUTH: the authority declaration is RULESET data (an operation-discriminated authority family — versioned, promotable, auditable like every other tier-1 surface); StateBundles do NOT double-declare it (the review flagged "bundle/ruleset-declared" as two sources — resolved: ruleset). Until the seam is operational, no new hardcoded authority floor may be added; work needing one (backpay) waits.

Program opened (2026-09-12, #1614 / epic &86): the family is {j}-administrative-authority — ONE first-hit table declaring the office hierarchy in metadata.authority.offices[] and every per-action floor, resolved in-process by craig-financial and re-checked by key equality under the row lock; see ADR-074 / plan administrative-authority (COMPLETE 2026-09-12; epic &86 closed). The backpay wait ended on the plan’s mechanical unblock criterion (U1 content bootstrapped + U2 merged — the seven clauses evidenced on #1115).

Applications recorded at ruling time

  • Backpay F0: late-enrollment acceptance = a late_enrollment rules-engine arm (GA accepts, ⁂ #1073; arm-absent = refuse). The reconcile floor stays tier 3.

  • Hard-checks U2: the age predicate = an age_eligibility rules-engine decision (GA: under-18 / 18-with-valid-education-terms). DOB fetch, refusal codes, budget mechanics stay source.

  • eligibility.evaluated: the wire is per-child always; determinations evaluate per-child (child facts are child-varying — copying one child’s verdict to siblings is wrong money, not a lawful simplification).

  • Age basis: coverage start at every boundary (ERR: the placement’s started_on; SG/NRSG: transfer_on), ⁂ #1073.

  • FMAP: tier 2 — effective-dated FmapRateSpec bundle data, federal_register-cited; the ruleset placeholder rate retired.

  • Foster-home expiry (#1639, ruled 2026-09-02 — both machines, gating): the derivations (effective_license_status from license_expires; training currency from foster_home_training.expires_at) and the expiring/expired producers are tier 3; WHICH expiry blocks matching vs activation, grace windows and per-type exemptions are tier 1 — license_gate / training_gate decisions in a <j>-placement-eligibility ruleset (#1641 / #1642).

  • CSEC/trafficking allegation vocabulary (#1630, ruled 2026-09-03 — the three-token ruling superseded the 2026-09-02 two-token one): the fleet enum gains sex_trafficking (NCANDS ChMal 7), labor_trafficking (ChMal 8 Other) and sexual_exploitation (ChMal 4); a single human_trafficking token was REJECTED as the wrong federal grain. The tokens are a tier-2 vocabulary value whose shape does not vary (NCANDS-mapped); WHICH token waives WHICH screening criterion stays the tier-1 <j>-intake-screening arms — PAMMS 3.2’s "human trafficking (labor or sex)" is encoded as two rows of identical shape in georgia.

  • Investigation response deadlines (#895, ruled 2026-09-03; plan approved 2026-09-08): the per-priority window spec, the per-child→intake roll-up (incl. whether a supervisor-attested priority counts when the criteria return none) and the override permission / role floor / reason / bounds are tier 1 — one table each in <j>-response-priority, <j>-response-window and <j>-response-deadline-override (GA and TX override arms CLOSED, ⁂ #1073); the calendar arithmetic, the timeliness band and the idempotent apply are tier 3; holiday calendars are tier-2 bundle data (StateBundle::holiday_calendar()); the caller-typed deadline and the legacy referral priority vocabulary are retired pre-1.0.

Consequences

  • Design reviews get a mechanical first question ("which tier?") and the fig-leaf middle ground — a knob in front of hardcoded policy — is named and rejected.

  • craig-financial becomes a rules-engine consumer (actor-relay evaluation); the rules-client crate grows a typed evaluate; cases' raw call sites migrate later (filed follow-up).

  • The authority program’s discovery unit audits existing tier-1-in-source residue (the office matrix, the reason matrices) for migration; new residue is a review defect.

  • ADR-023/024’s data-driven-policy posture gains its enforcement edge: which data home, with a test per tier.

Amendment — #1672 (2026-09-06): admissibility of a human disposition is a tier-1 table

Ruling. Whether a human screening disposition is admissible against the jurisdiction’s criteria is TIER-1 policy: a disposition-admissibility decision table in the {j}-intake-screening ruleset, consulted at the screening-decision act. Advisory versus binding, and which role may record which disposition, are ROWS of that table (Georgia’s one row is advisory until the criteria are policy-complete, #1693); the flip is a ruleset promotion, never a code change.

What the code enforces (structural, tier 3).

  • The act evaluates the criteria PER SUBJECT — every child flagged is_victim, else every listed child (with child_is_victim = false so a binding row can hold on it), else the report itself — and persists name + revision + version + one evaluation id per subject.

  • Admissibility rows are per-subject PROHIBITIONS ANDed across the evaluated subjects: a row that fires false for ANY evaluated subject refuses the disposition (409, the basis verbatim). A rule of the form "no evaluated child qualifies", or any rule that reads non-victim children, needs a report-level aggregate input or a code change — scoped to #1693.

  • The actor role is DERIVED from the acting worker’s realm roles through the ruleset’s actor_roles mapping (highest rank wins); a caller never asserts it.

  • A non-blank rationale is required in every jurisdiction: an unreasoned disposition is unauditable (Policy 3.2:69 / :125 corroborates; the requirement is structural, so the ruleset carries no rationale_provided input).

  • INSUFFICIENT_INFORMATION + screened_in stays convertible under the advisory row; the derived response time is #1693’s.

  • The attested document is bounded (32 facts), validated against the ruleset’s attestable subset BEFORE the consult, and the server-derived keys (SERVER_DERIVED_FACT_KEYS) are refused on the wire regardless of what a promoted ruleset lists as attestable.

Amendment — #1641/#1642 (2026-09-07): foster-home expiry is derived on the clock, gated by the ruleset, noticed once per key

Ruling. (#1639, 2026-09-02, option (a); the 2026-09-07 gate rulings on plan placement-expiry.) CRAIG owns foster-home license AND training expiry, and expiry GATES matching and activation. The derivations and the expiring/expired producers are tier 3; WHICH expiry blocks matching vs activation, grace windows and per-type exemptions are tier 1 — license_gate (v1.0) and training_gate (v1.1) in {j}-placement-eligibility, every policy row cited (PAMMS 14.9 / 14.13 / 14.15 / 14.23; 26 TAC ch. 749 incl. §749.831(e); the catch-all rows ride the exception ledger as plumbing). Georgia (⁂ #1073): a DERIVED license expiry refuses both, grace 0; an EXPIRED or UNDATED cpr_first_aid refuses both (undated = unverifiable); every other type’s lapse or missing date admits; a type never recorded admits (#1723).

What the code enforces (structural, tier 3).

  • Derived, never stored. effective_license_status is a SQL CASE bound to the jurisdiction business date on EVERY FosterHome read (strict <: the expiry date itself is still licensed); training currency is derived per (home, type) from active rows with completed_at ⇐ today — dated rows by max(expires_at), only-undated ⇒ undated, none ⇒ absent — and a future completed_at is refused at the API. Nothing is written back; a renewal changes the next read.

  • Household proxy. foster_home_training carries no caregiver identity while 14.9 requires EACH caregiver’s certification; per-type currency stands in for it and is documented as such (#1722 on the provider model).

  • Candidate scope is ruleset-declared (#1721, 2026-09-08 — superseding this amendment’s 2026-09-07 residue note). Matching’s SQL scope is the jurisdiction’s matching-scope table — an input-less first-hit table in {j}-placement-eligibility v1.2 whose one row answers matching_scope_statuses, consulted ONCE per search with a facts-free document before the candidate scan and bound as license_status = ANY(…); a free bed stays a SQL fact (capacity is not policy). Georgia and Texas declare ["active"], so their non-active license_gate rows still decide at activation only — by declaration, no longer by construction: a jurisdiction that names pending reaches those rows' license_admits_matching without a code change.

  • The verdict is bound to facts. The consult runs BEFORE the claim transaction (after the ADR-062 replay precheck — a replay never touches rules); the facts re-derived under the home row lock must EQUAL the consulted facts (409 concurrent-modification); a BEFORE trigger takes the parent home’s lock on every training write, so the serialization is DB-enforced across binary versions.

  • Closed tokens, cross-field rules. none | license_expired | license_not_active | training_expired | training_unverifiable; admits == false ⇒ a reason, admits == true ⇒ none, license_expired ⇒ days_past_license_expiry > 0, training_* ⇒ some type in the facts is expired / undated; a missing required key or an unknown token is a named 500, never a defaulted verdict (zen omits a null output — hence the none sentinel, plan erratum 2026-09-07). Refusal order: license, training, then the untyped capacity 400.

  • The sweep consults nothing. lead_days is WHEN to warn, never WHETHER an expiry blocks; one notice per (home, kind, expires_on[, training_type]), the event staged inside the notice transaction; the training leg is independent of the license window.

  • Owned consequence. readonly gets 403 rules-consult-denied on matching (the rules-side rule_evaluation create row denies it) — fail-closed, recorded as a pre-1.0 CHANGED.

Amendment — #1721 (2026-09-08): the matching candidate scope is a tier-1 table

The candidate-scope residue recorded on 2026-09-07 is retired: WHICH stored statuses matching may present is tier 1 and lives in the matching-scope table of {j}-placement-eligibility (v1.2); the SQL binds the evaluated list. No other tier assignment changes.

Amendment — #895 (2026-09-09): investigation response deadlines are derived through three tier-1 tables; the override is an arm

Ruling. (#895, 2026-09-03, maintainer; the plan-approval answers of 2026-09-08 on plan investigation-response-deadlines, archived.) The response deadline is DERIVED from the screening priority token through a per-jurisdiction ruleset — a window spec per priority (anchor = receipt; hours | weekdays | calendar days; receipt-day-is-day-one; skip-weekends; skip-holidays; end-of-day) — and the caller-typed response_due_at is removed pre-1.0; OVERRIDE is a first-class ruleset-governed, audited act whose permission, role floor, reason requirement and bounds are arms (absent arm = refuse), Georgia’s arm CLOSED until DFCS confirms; holiday calendars are StateBundle reference data. "If it’s a reasonable feature, it needs to be a configurable rule and not hardcoded." Plan approval added: derive + persist + a read-time timeliness band, no scheduler; the override ships now with the GA and TX arms closed; decision-less referrals get the architecturally correct answer — a referral is born by conversion only, direct creation and craig_reference::Priority are retired, a supervisor-attested priority at the screening decision covers the advisory screen-ins, and staff phone intake gets an attributed report-entry path with the actual receipt.

What shipped (tier 1). Three rulesets per jurisdiction, ONE decision table each, closed input schemas, required output schemas, every policy row cited (ADR-070): {j}-response-priority — the per-child → intake roll-up consulted at conversion (present.<TOKEN> booleans most-urgent-first, so FIRST-HIT ORDER IS the most-urgent-wins policy; then the supervisory attested arm — Georgia cicc_supervisor | county_director | regional_fps, Texas swi_supervisor | county_director | regional, on a screened-in decision; then the NONE catch-all); {j}-response-window — the spec consulted at investigation open (Georgia IMMEDIATE / PRIORITY_24HR → 24 HOURS, STANDARD → 5 WEEKDAYS with the receipt day as day one, weekends skipped, holidays INCLUDED, end of day — PAMMS 3.32 verbatim; Texas P1 → 24 HOURS, P2 → 72 HOURS — SWI 4310 / 4320; the NONE catch-all); {j}-response-deadline-override — Georgia and Texas ONE catch-all refuse row (CLOSED), testonia, the fixture, carrying the tree’s only open arm and its only holiday-skipping window so both seams are exercised. {j}-intake-screening (GA v1.4 / TX v1.3) declares the closed response_priority output enum — the ONE token vocabulary the response rulesets and the decision act’s attested priority share; the screening surface is NOT READY without it.

What the code enforces (tier 3). The referral’s response_priority + all-or-none provenance is written at conversion after a pre-transaction consult AS THE ACTING WORKER under the S2S hop budget, the effective decision revalidated under the report row lock (409 screening-decision-superseded); the decision act records attested_response_priority validated against the surface’s enum minus NONE and hashed into its intent. The investigation open consults the window AFTER the ADR-062 precheck (a replay never touches rules), derives through craig_common::deadline::derive_deadline on the report’s receipt with the jurisdiction clock and the bundle calendar, and persists deadline
window provenance in the claim transaction; a pre-cutover UNDERIVED referral rolls up lazily under a compare-and-set, one without a decision is 409 response-priority-underivable, a NONE window is 409 response-window-undefined naming the basis. Fail-closed everywhere: rules unreachable / 5xx / 429 / budget → 503, a relayed 403 → rules-consult-denied, an absent ruleset, a drifted output or an uncovered holiday calendar → a named 500 — never a defaulted token, never a guessed deadline. response_timeliness (on_track | overdue | met | met_late) is computed by the v_investigations view at read time from first_contact_at, response_due_at and now(), never stored. The override is authz Update + attrs.operation = override_response_deadline (operation-scoped rows plus admin’s standing wildcard row; the generic supervisor / assigned-caseworker grants — Texas: supervisor
regional_supervisor — narrowed to operation-ABSENT) (#1904 deleted the realm-flat regional_supervisor override row — the operation rides the director rows; the Texas regional CHECK row keeps i_operation == null, ADR-077 D7), the actor’s policy role from the screening surface (admin unmapped → 403), ONE arm consult over service-derived facts (base = COALESCE(response_due_original, response_due_at), the whole-hour ceiling of the delta), refusals 403 refused / 422 reason / 409 bounds, then the claim transaction: the row locked FOR NO KEY UPDATE, every consulted fact re-derived (409 concurrent-modification), response_due_original kept, the strict case.investigation_response_deadline_overridden event staged beside the write. Holiday calendars are tier-2 bundle data (StateBundle::holiday_calendar(), defaulted empty) parsed fail-fast at cases boot into a HolidayReference Extension.

⁂ readings recorded on #1073 (the rows carry them as `derivation`s). Most-urgent-wins across children (the manual assigns one response time per intake; CRAIG evaluates per child); a supervisory attested priority counts only when the criteria return none, by the role sets above (Texas keeps the evaluated P1 / P2 rows ABOVE the attested row — ruling the other way is a row reorder by promotion); a non-weekday receipt makes day one the next weekday; "end of the fifth weekday" is the last microsecond before local midnight; the receipt anchor is the report’s receipt instant (the staff-attested actual receipt for phone intakes); the override arms CLOSED — Georgia because PAMMS 3.32’s CISS review governs the RECOMMENDATION and PAMMS 3.2’s County Director override "does not extend to changing the assigned response time", Texas because CPS 2291.5 extends completion, not response, and CPS 2143’s CPI re-assessment changes the token, not the deadline.

Recorded deviations (the plan’s errata). The roll-up table’s node id is priority-rollup (the intake-screening file already owns a response-priority node); WEEKDAYS applies the flags exactly as written and refuses a skip_weekends: false row as contract drift; map_consult_error in api/investigations/response.rs carries the placement class table in its OWN structure, not a byte copy; verify-seed’s view tolerance is pinned by construction (its seed identity never interned investigations) while `boot_verify’s is an executed test; the Georgia and Texas `state_office operation rows are admitted at authz but unreachable today (no intake-screening surface maps the role — 403 screening-actor-unmapped before the consult); the i_operation: "== null" ABSENT cell is the first in any shipped ruleset; and the Texas supervisor operation row is CASE-SCOPED (i_supervises == true, the file’s doctrine — fail-closed today since investigations carry no supervisor sub) with the realm-flat regional_supervisor carrying the operation instead, where the plan listed a flat role set (#1904 deleted the realm-flat regional_supervisor override row — the operation rides the director rows; the Texas regional CHECK row keeps i_operation == null, ADR-077 D7).

Amendment — #972 (2026-09-11): the matching child criteria are tier-1 tables

The client-supplied child_age / icwa_required / sibling_group_size prefilters were tier-1 policy in SQL costume: WHICH child facts matching requires, prefers or ignores (age band, ICWA — person OR case carrier, sibling group) is tier 1 and moves into {j}-placement-eligibility v1.3 as per-request child_criteria tables applied mechanically by the SQL (require / prefer / ignore); the facts themselves come from the authoritative record under the acting worker’s relayed credentials, never from the client — see ADR-073 / plan identity-based-matching. No other tier assignment changes.

As built (#1776): the four v1.3 first-hit tables are child-age-band → age_band, child-icwa → icwa, child-sibling → sibling and child-matchability → child_refusal_reason (an OPEN vocabulary — none = matchable; any other string is a jurisdiction’s reason, relayed verbatim as 409 child-not-matchable), answered by the ONE merged per-request consult that replaced the #1721 facts-free scope consult (MatchingProbe { child } under placement-matching-criteria / the child id at matching and at a home-less activation; ActivationProbe = the home facts beside child under placement-eligibility / the home at a with-home activation). craig-placement binds each mode token mechanically — require ⇒ a WHERE arm of MATCHING_FILTER_SQL, prefer ⇒ a rank prefix of MATCHING_ORDER_SQL ahead of the kinship / free-bed order, ignore ⇒ neither ($2 / $3 / $6 TEXT tokens beside $1, the child’s age) — and re-applies the require arms to the home in memory at activation (home_meets_child_criteria, 409 child-criteria-violated, after license and training, before capacity), so no criterion token is hard-coded in placement.

Amendment — #949 — A federal standard is a jurisdiction-invariant tier-1 class (Proposed, 2026-09-20)

Standing. Proposed 2026-09-20 with the approved program plan afcars-program (#949, epic &99). Accepted at the program’s close-out P-E (#1966); the class lands in P-A (#1962).

The class. The tier-1 test asks whether the SHAPE of a decision is legal text rather than engineering; the AFCARS 2020 standard (45 CFR 1355.41–1355.47 + the ACF technical bulletins — the element dictionary, applicability, the two §1355.46(a) exemptions, consistency and recurrence checks, report periods) is legal text that binds EVERY title IV-E agency identically. It is therefore tier 1 — versioned, promoted, cited under ADR-070, drift-checked — but not jurisdiction-flavoured, so it takes a fourth ruleset directory, rulesets/federal/ (RULESET_DIRS, the seed bootstrap, the policy defaults and BLOCKING_JURISDICTIONS learn it; no scenario pack), holding federal-afcars-2020. Carrying it as compiled constants was rejected: a compiled dictionary is neither citable row-by-row nor drift-checked, and the 2024 amendment (89 FR 96588, effective 2028-10-01) shows the standard is itself effective-dated. Per-jurisdiction variance is confined to {j}-afcars-crosswalk — one first-hit table per state vocabulary, verified at runtime AND in rules check for domain totality, value-set membership and embedded collapse citations. Adding a jurisdiction is a CODE change plus a crosswalk, never configuration alone (the dir list, the blocking list, the business clock, a compiled bundle — since #2207 the business clock IS the compiled bundle’s business_timezone() declaration, read by craig_common::BusinessClock, not a craig-common mapping arm), and an unregistered clock refuses at the surface. The doctrine’s three tiers are unchanged; the federal class is tier 1 with the jurisdiction axis collapsed. Design detail: AFCARS 2020 Program (#949) § A1–A4.

Amendment — #1719 (2026-10-12): the IV-E determination inputs are declared by the ruleset

Ruling. The inputs a worker answers for a Title IV-E determination are tier-1 vocabulary: WHICH facts, at which scope (the case or each child), of which kind (yes / no, a closed token set, a non-negative number, a date) and in which words. The jurisdiction’s {j}-ive-eligibility ruleset declares them in metadata.ive.inputs[], beside a closed inputNode schema (Rule Set Patterns § metadata.ive). Scope is the policy meaning, never the key’s spelling: a fact whose value can lawfully differ between siblings is child-scoped. Examples are citizenship and the removal and judicial findings of each child’s own order. The IV-E template and the BFF name no input key, craig-cases injects only registry keys (below), and no bundle message carries an input’s words. The labels follow the #1672 attestable-facts precedent: they are the ruleset’s own words. Georgia’s term-ive-ctw-first-order overlay is therefore retired, and its TAFC clause lives in the input’s description.

What the code enforces (structural, tier 3).

  • The declaration grammar and the strict Draft-7 subset. One projection, craig_cases_contracts::ive_surface::project_ive_surface, serves both cargo xtask rules check (mandatory since #1719 for every ruleset whose file stem or name ends -ive-eligibility) and craig-cases at runtime.

  • The closed registry of server-derived keys, IVE_SERVER_KEYS (child_age, ssa_deprivation_evidence at #1719). HOW the server derives a key is engineering (tier 3). WHETHER a jurisdiction reads it is tier 1, so a key is injected only where the ruleset’s schema lists it, and a worker never supplies one.

  • A blank answer is an absent key, never false. What an unanswered fact means is a row of the ruleset, not a default in code.

  • Every answer is validated against its declared property, with the Draft-7 validator zen enforces, before any consult.

  • The act is bound to the full (rule_set_id, revision) identity the worker was shown. A different active identity is a 409 ive-policy-moved, both before the consult (the surface check) and during it (craig-rules' expect, #2325). No act is decided under a policy the worker did not see.

Consequences. Adding, re-scoping or relabelling an input is a ruleset promotion, never a code change. A new server derivation is a code change (a registry entry and its writer) plus a ruleset that lists it. Closing a schema is a cutover: the images go first, then the ruleset, and rollback is the ruleset first (Deployment Guide § IV-E determination inputs cutover). Design detail: IV-E Determination Inputs D1–D6.

Amendment — #2999 (2026-11-08): the configuration layers left CRAIG’s source

ADR-087 U4 (#2955) moved the configuration layers out of CRAIG’s source. A rulesets/<j>/<file> path above now names <file> in layer <j>: the federal, Georgia and Texas layers are the craig-config-{federal,georgia,texas} repositories, pinned in config-sources.lock and fetched to target/config/layers/<j>/ by cargo xtask config fetch, and the synthetic testonia layer is fixtures/config/testonia/. The federal class is the federal layer; RULESET_DIRS gave way to the layer view’s directories. The decision above is unchanged.

Amendment — #2956 (2026-11-15): tier 2 is config bundle data

Tier 2’s home changes; its test does not. The table above gives it as "StateBundle reference data (the #1072 pattern: compiled, boot-resolved, fail-closed)". It is now config bundle data: files under bundle/ in the jurisdiction’s configuration layer (ADR-087), one file per kind of reference data, listed in the bundle/ file map.

  • Boot-resolved. Each service loads the bundle once at boot through craig_config_bundle::ConfigBundle, which implements the StateBundle trait over the files. The trait and its consumers are unchanged, so every tier-2 reading above ("bundle data", "a bundle declaration") stands; only where the data is written moved. A changed value is a signed commit in the configuration repository and a restart, not a CRAIG release.

  • Fail-closed. A service refuses to start without a configuration source, on a layer that is missing or not at its pinned commit, and on any refused bundle file (an unknown file name, an unknown key, an unknown enum token, a duplicate, a broken reference between files). An absent file means the trait’s default for that item, and the consumers' refusals for missing data stand (no FMAP rates, no holiday calendar, no crosswalk).

  • Stamped by the layer SHA. The bundle is part of the configuration snapshot, so the commit it was read from is the layer SHA the service reports on GET /version and craig-rules records on each ruleset snapshot.

  • The jurisdiction is named once. The layer’s manifest names it. CRAIGACTIVE_STATE_BUNDLES and CRAIG_<SVC>JURISDICTION are no longer read; no compiled bundle exists to select.

  • Partner adapters stay source. An adapter is code a file cannot state. Georgia’s are the crate craig-partners-ga, compiled into craig-exchange behind the partners-ga feature and selected by the jurisdiction’s bundle/adapters.toml; craig-exchange refuses boot on a name no compiled crate provides. The outbound trigger matrix is data (bundle/outbound_triggers.toml), checked against the registered adapters at boot.

  • Accepted global state: the business-clock registry. The trait’s data types are &'static, so a loaded bundle is leaked once per process, and the business timezone it declares is installed into a set-once process registry in craig_common::clock before the router is built. BusinessClock::for_jurisdiction reads that registry. Installing the zone a jurisdiction already has is a no-op and a different zone is refused, so the registry cannot change under a running process. This is process-global state, accepted because the clock’s call sites take a jurisdiction name and no handle, and a deployment has one jurisdiction for its lifetime.

The tier tests, tier 1 and tier 3 are unchanged.

Amendment — #3196 (2026-11-29): what a partner crate is, is specified (ADR-089)

ADR-089 amends the clause "Partner adapters stay source" of the amendment above. Adapters are still code, and they still stay in CRAIG’s source until #3200 decides where a jurisdiction’s partner crates live. What changes is the boundary the clause drew. A partner crate implements contracts the product owns, for every kind of leg and not only the adapter; a jurisdiction’s aggregator contributes one partner set; and craig-exchange holds no partner’s legs, error types or tokens. Boot checks the adapter list and the trigger matrix against that set.

Amendment — #3200 (2026-11-30): partner adapters leave CRAIG’s source (ADR-090)

ADR-090 amends the clause "Partner adapters stay source" and the amendment above, which kept adapters in CRAIG’s source until #3200 decided. Adapters are still code a configuration file cannot state. They become the jurisdiction’s own code: WebAssembly modules in its configuration layer, built from Rust source held in the same layer, which craig-exchange loads at boot. Boot still refuses a layer whose bundle/adapters.toml lists a kind no loaded set provides. Product source then names no jurisdiction’s partner, and the stated exception to that rule ends. Until the plan’s switch lands, the tree is as the amendment above describes it.

Edit this page · latest