Skip to content

DEM-BIND (a'): residual builder + composer — adapter byte-untouched - #32

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

DEM-BIND (a'): residual builder + composer — adapter byte-untouched#32
Gio2050 merged 1 commit into
mainfrom
mission/dem-bind

Conversation

@Gio2050

@Gio2050 Gio2050 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Slot authorization

DEM-GOV §9 slot DEM-BIND, authorized by the founder instruction of 2026-08-22 (verbatim: "Authorized."). Step (a′) of the binding D-DEM-2(5) merge order — merges first because it is referenced by nothing; no runtime consumes these exports until step (c).

Design ruling R1 (stated for the record)

froggy.enrichment_adapter.ts is not edited — byte-identical, provable by empty diff. The gate requires the FLPR-GOV inertness guards and the oracle/byte-equivalence suites (which import the adapter export as their oracle) to pass unchanged, and the owner directive requires the unexpressible half left in place. The residual builder therefore calls the untouched adapter and picks the six fields the mapping cannot express (the five DEM-PRODUCER-reserved placeholders + liquiditySwept).

The D-DEM-2(6) defense: on the live mapping path (from step (c) on), the adapter's expressible computation still executes inside the residual builder and its expressible outputs are discarded — only the interpreter fragment is authoritative. A discarded value is not a fallback: wherever a determination exists the fragment is unconditionally authoritative, and an interpreter refusal means no determination at all (D-DEM-5(7)). This also dissolves the rrMultiplePlanned coupling hazard — it rides the adapter-internal boolean, proven byte-equivalent to the interpreter's over the full non-refusal domain by the 20-probe sweep in this PR.

Gate

  • 302 afi-core tests green; the new 20-probe sweep proves compose(interpret(mapping).fragment, residual) === legacy adapter output byte-for-byte over every band boundary, recode branch, grandfather firing, absent/null namespace, and null-valued source.
  • Adapter file: empty diff (merge condition). Adapter test, FLPR guards, 0.1875 KAT: untouched and green.
  • The composer narrows triggerPatternQuality to the D-EQ-2 grade union 0|1|2|3 — tighter than the plan's "integer", enforcing the emitted-grade law at the seam.

🤖 Generated with Claude Code

DEM-GOV §9 slot DEM-BIND, owner-authorized 2026-08-22. Step (a') of the
D-DEM-2(5) merge order - referenced by nothing; no runtime consumes it yet.

analysts/froggy.residual_builder.ts (NEW - the adapter is NOT edited):
  - FroggyResidualInput: the six fields the mapping cannot express
    (the five DEM-PRODUCER-reserved placeholders + liquiditySwept, the
    two-lane read D-DEM-3(5) expressly reserves).
  - buildFroggyResidualInput: calls the untouched legacy adapter export and
    picks the six residual fields; the expressible outputs are DISCARDED.
    On the live mapping path the fragment is unconditionally authoritative -
    a discarded value is not a fallback (D-DEM-2(6) defense in the header).
  - composeFroggyTrendPullbackInput: fragment + residual -> scorer input,
    fail-closed (D-DEM-5(2)): exactly the four declared targets, declared
    types, triggerPatternQuality narrowed to the D-EQ-2 grade union 0|1|2|3.

analysts/__tests__/froggy.residual_builder.test.ts: 20-probe full-domain
sweep proving compose(interpret(mapping, view).fragment, residual(view))
byte-equals the legacy adapter's full output - every band boundary, every
recode branch, grandfather firings, absent/null namespaces, null-valued
sources, sweep-hint variation - plus composer fail-closed cases.

Gate: froggy.enrichment_adapter.ts byte-identical (empty diff); adapter test
+ FLPR guards untouched; 302 tests green; 0.1875 KAT anchor green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Gio2050
Gio2050 merged commit 81603c6 into main Aug 23, 2026
1 of 2 checks passed
@kilo-code-bot

kilo-code-bot Bot commented Aug 23, 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.

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