DEM-BIND (a'): residual builder + composer — adapter byte-untouched - #32
Merged
Conversation
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>
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsis 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
rrMultiplePlannedcoupling 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
compose(interpret(mapping).fragment, residual) === legacy adapter outputbyte-for-byte over every band boundary, recode branch, grandfather firing, absent/null namespace, and null-valued source.0.1875KAT: untouched and green.triggerPatternQualityto the D-EQ-2 grade union0|1|2|3— tighter than the plan's "integer", enforcing the emitted-grade law at the seam.🤖 Generated with Claude Code