DEM-PRODUCER-HTF (core): delete the neutral bias literals; resolve the "unknown" branch - #38
Merged
Merged
Conversation
…eralize the composer DEM-GOV §9 DEM-PRODUCER-PLAN (owner-authorized 2026-08-25; afi-governance #55): the planned R:R is a PROVIDER fact the technical lane produces from the submitted afi.trade-plan.v1 and the registered mapping binds — never synthesized from analyst inputs again. - froggy.enrichment_adapter.ts: the synthesis at the old :282-283 is deleted; the builder returns FroggyAdapterOutput (Omit<…,'rrMultiplePlanned'>); the view type gains technical.plan (the lane's verified plan facts, read only through the mapping). - froggy.residual_builder.ts: residual Pick shrinks to the five still- unexpressible fields; the composer is mapping-version-agnostic and fail-closed — fragment ∪ residual must partition the ten scorer-input fields exactly and every value must lie in its declared domain (predicate-valued table: no scorer-input field is ever assigned a literal here). - froggy.trend_pullback_v1.ts: scoreFroggyTrendPullbackFromEnriched (the adapter-only convenience path) is deleted — the adapter no longer emits a full input; the rubric no longer imports the adapter. - tests: the registered 1.1.0 mapping as shared test data (inline, drift- checked against the sibling registry file when present); the residual builder suite proves compose(fragment, residual) == adapter output + the mapping-bound R:R (fired default recorded when the producer emitted none); composer refusal cases (missing / extra / dual-source / out-of-domain). No scoring-law value moves. afi-core suite 312/312. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed literal DEM-GOV §9 DEM-PRODUCER-CANDLE (owner-authorized 2026-08-25; afi-governance #55) — the act D5-GOV D-D5-1 reserved. Merge after dem/plan-core, and after the reactor's PLAN wave has merged. - froggy.enrichment_adapter.ts: BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB and its ?? read are DELETED, as is the `haFlatBackConfirmed: false` literal. Both are now computed technical-lane facts the registered mapping binds (required). FroggyAdapterOutput drops them; the view type gains the lane's brokeEmaWithBody / haFlatBack / haFlatBackConfirmed facts. - froggy.residual_builder.ts: the residual Pick shrinks to the HTF bias placeholders + liquiditySwept — three fields. - tests: mapping 1.2.0 in the shared support module (required binds); probes carry the candle facts and vary them; a view WITHOUT them now REFUSES at the interpreter (required-source-absent) instead of taking a stub — pinned in both the residual-builder and adapter suites. afi-core 313/313. No scoring-law value moves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e "unknown" branch
DEM-GOV §9 DEM-PRODUCER-HTF (owner-authorized 2026-08-25; afi-governance #55)
— the mission DIR-GOV D-DIR-3's scope-guard reserved. Merge after the CANDLE
wave.
- froggy.enrichment_adapter.ts: the `weeklyBias = "neutral" as const` and
`dailyBias = "neutral" as const` literals are DELETED. Both are now computed
technical-lane facts (higher-timeframe trend) that the registered mapping
RECODES into the rubric's bias vocabulary. The view type gains technical.htf
{daily,weekly}. NOTHING this builder returns is a placeholder any more.
- froggy.residual_builder.ts: the residual is now ONE field, liquiditySwept —
the two-lane read D-DEM-3(5) expressly reserves. The D-DEM-4(2) placeholder
inventory is EMPTY.
- froggy.trend_pullback_v1.ts: the "unknown"-direction branch semantics are
RESOLVED as DIR-GOV's scope-guard requires (they could not be settled while
both biases were hardcoded and the branch unreachable): with real HTF facts
the four cases are exhaustive — long/short when both timeframes agree,
neutral when either has no directional bias, and "unknown" when both are
directional and DISAGREE (a higher-timeframe CONFLICT: the analyst declining
to call a direction, not an error and not an absence). It feeds no axis and
never reaches scoredSignal.direction. No code changed — the branch is
documented and pinned.
- tests: mapping 1.3.0 in the shared support (the bullish->long / bearish->short
/ range->neutral vocabulary translation lives in the MAPPING, never in the
producer, D-DEM-3); probes for aligned / conflicting / range / absent-window
HTF; five new direction-verdict tests including the conflict branch and a
proof that the verdict moves no axis.
afi-core 322/322. No scoring-law value moves.
Co-Authored-By: Claude Fable 5 <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.
Wave 3 of 4 —
DEM-PRODUCER-HTF, step 1 of 3. Merge after the CANDLE wave.The accepted row and gate
What leaves afi-core here
The last two placeholders —
weeklyBias = "neutral" as constanddailyBias = "neutral" as const— are deleted. The residual is now one field:liquiditySwept, the two-lane read D-DEM-3(5) expressly reserves. The D-DEM-4(2) placeholder inventory is empty.The
"unknown"branch, resolvedDIR-GOV's scope-guard required this slot to settle the
"unknown"-direction branch — impossible while both biases were hardcoded and the branch unreachable. With real facts the four cases are exhaustive and each means something:It feeds no axis (the axes are computed before it) and never reaches
scoredSignal.direction, which carries the submitted side. Five new tests pin all four cases, including a proof that the verdict moves no axis and that only an aligned non-neutral pair lifts structure by+0.4.afi-core 322/322; typecheck green.
🤖 Generated with Claude Code