Skip to content

DEM-CONTRACT (1/2): the deterministic enrichment-mapping interpreter (D-DEM-2(4)) - #31

Merged
Gio2050 merged 1 commit into
mainfrom
mission/dem-contract
Aug 23, 2026
Merged

DEM-CONTRACT (1/2): the deterministic enrichment-mapping interpreter (D-DEM-2(4))#31
Gio2050 merged 1 commit into
mainfrom
mission/dem-contract

Conversation

@Gio2050

@Gio2050 Gio2050 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Slot authorization

DEM-GOV §9 slot DEM-CONTRACT, authorized by the founder instruction of 2026-08-12 recorded in the decision's Status line (option-2 pattern: first slot authorized by the commissioning instruction, FCP-GOV precedent). Companion: afi-config PR (2/2) — the contract family. This PR merges first (referenced by nothing; the D-DEM-2(5)(a) rationale).

What this is

The pure, total, side-effect-free mapping interpreter — the kernel that will one day replace the bespoke froggy.enrichment_adapter.ts seam with registered data (that replacement is DEM-BIND, a separately owner-gated slot; no runtime invokes this yet, per the slot text).

  • Closed operator vocabulary (bind/band/recode + optionality defaults + namespace-defaults) — computation is inexpressible by construction (D-DEM-3(2)).
  • Normative absence semantics matching the adapter's ??/!= null behavior exactly — including the live projection's key-written-with-undefined class. This was the adversarial review's one blocking finding on the plan; without it, DEM-BIND's byte-for-byte gate would have been unsatisfiable.
  • Two declared divergences (present wrong-type / present non-finite → refusal) pin the byte-for-byte obligation to the typed finite domain.
  • D-DEM-5(3) fired-default set computed (consumed by nothing yet): absent-member firings are fired defaults; recode fallback on a present value is not (AR-GOV D-AR-3).

Gate (slot row, decision :198)

  • afi-core suite: 279 green, including the totality proof over the 12-vector invalid set with exact machine-checkable reasons, purity proofs, and the adapter-oracle byte-equality across every absence class.
  • The dev-only sibling-checkout describe ran active against the companion branch: inline mirrors deep-equal the canonical vector files.
  • Zero bytes anywhere in afi-reactor: git status clean, full 691-test suite green untouched, 312da118…126e06 pin passing, plain-grep negatives for enrichment-mapping/mappingRef/EnrichmentMappingInterpreter all empty.

🤖 Generated with Claude Code

…-2(4))

DEM-GOV §9 slot DEM-CONTRACT, owner-authorized 2026-08-12. PURE by decision:
no fs, no afi-config dependency, no I/O - the caller supplies the parsed
mapping document and enriched view. No runtime invokes this yet (slot text);
the runtime seam is DEM-BIND, separately owner-gated.

validators/EnrichmentMappingInterpreter.ts
  - Closed operator vocabulary bind/band/recode (+ default inside a bind's
    optionality; namespace-default as the top-level list) per D-DEM-3(1);
    computation is inexpressible by construction (D-DEM-3(2)); the producer
    escape hatch is a reference, never code (D-DEM-3(3)); one source path
    per binding (D-DEM-3(5)).
  - Normative ABSENCE definition matching the retired adapter's ??/!= null
    semantics exactly (namespace missing/undefined/null; own key missing;
    value undefined or null) - including the live projection's
    key-written-with-undefined class. Two DECLARED divergences pin DEM-BIND's
    byte-for-byte obligation to the typed finite domain: present wrong-type
    refuses (source-type-mismatch), present non-finite refuses
    (non-finite-number).
  - Fired-default set per D-DEM-5(3): bind-optionality firings and
    band/recode absent-member firings; recode fallback on a PRESENT
    unrecognized value is NOT fired (AR-GOV D-AR-3 total-table law).
  - Totality: every call ends in a deep-frozen result or a thrown
    EnrichmentMappingError with a machine-checkable reason - that class only.
    Own-property read-once discipline throughout (UwrProfileLoader idiom).

validators/__tests__/EnrichmentMappingInterpreter.test.ts
  - Totality over the 12 inline invalid-vector mirrors with exact reasons;
    hostile non-objects; purity (frozen inputs, structuredClone compare,
    determinism); adapter-oracle byte-equality on the expressible subset
    across band boundaries, recode branches, grandfather firings, absent/null
    namespaces, null-valued sources, and undefined-valued own keys; result
    immutability; and a dev-only sibling-checkout describe that deep-equals
    each mirror against the canonical afi-config vector files (drift fails
    mechanically whenever the sibling exists).

Gate: 279 tests green (sibling integration ACTIVE against the companion
afi-config branch); zero bytes anywhere in afi-reactor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kilo-code-bot

kilo-code-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

@Gio2050
Gio2050 merged commit 60f4caf into main Aug 23, 2026
1 of 2 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.

1 participant