diff --git a/src/pipeline/nodes/laneView.ts b/src/pipeline/nodes/laneView.ts index 3ed533c..5abf022 100644 --- a/src/pipeline/nodes/laneView.ts +++ b/src/pipeline/nodes/laneView.ts @@ -7,7 +7,7 @@ * * These are pure functions over validated governed results. They contain no * vendor logic, no I/O, and no scoring: the scorer-visible values they carry - * (technical.emaDistancePct / isInValueSweetSpot / brokeEmaWithBody=false, + * (technical.emaDistancePct / isInValueSweetSpot / brokeEmaWithBody stub, * pattern.patternName / patternConfidence, sentiment.tags) are projected * byte-identically to the pre-activation runtime. The view ADDITIONALLY * carries projected-but-unread lane context (technical.atr14 / trendBias, @@ -16,7 +16,10 @@ * change view shape, never scored values — reading any of them in the adapter * is a separately governed change. */ -import type { FroggyEnrichedView } from "afi-core/analysts/froggy.enrichment_adapter.js"; +import { + BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB, + type FroggyEnrichedView, +} from "afi-core/analysts/froggy.enrichment_adapter.js"; import type { TechnicalLensV1 } from "../../types/UssLenses.js"; /** Governed sentiment axis observation (afi.enrichment.sentiment.v1 item). */ @@ -60,7 +63,8 @@ export interface AiMlLanePayload { /** * technical governed result → view.technical (BYTE-IDENTICAL to the - * pre-activation merge mapping: brokeEmaWithBody pinned false, same renames). + * pre-activation merge mapping: brokeEmaWithBody pinned to the declared + * unimplemented stub, same renames). */ export function viewTechnical( payload: TechnicalLensV1["payload"] | null | undefined @@ -69,7 +73,10 @@ export function viewTechnical( return { emaDistancePct: payload.emaDistancePct, isInValueSweetSpot: payload.isInValueSweetSpot, - brokeEmaWithBody: false, + // D5 / D5-GOV zero-movement: explicit unimplemented-input stub — NOT a + // computed candle fact. See BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB in + // afi-core/analysts/froggy.enrichment_adapter.ts. + brokeEmaWithBody: BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB, indicators: { rsi: payload.rsi14, ema_20: payload.ema20, diff --git a/src/pipeline/nodes/mergeEnrichedView.ts b/src/pipeline/nodes/mergeEnrichedView.ts index 58226f5..1627e1b 100644 --- a/src/pipeline/nodes/mergeEnrichedView.ts +++ b/src/pipeline/nodes/mergeEnrichedView.ts @@ -6,7 +6,7 @@ * news, aiMl) into the analyst-facing FroggyEnrichedView + USS lenses + * _priceFeedMetadata. The scorer-visible values are projected through the * shared laneView helpers BYTE-IDENTICALLY to the pre-activation runtime - * (technical emaDistancePct / isInValueSweetSpot / brokeEmaWithBody=false and + * (technical emaDistancePct / isInValueSweetSpot / brokeEmaWithBody stub and * indicator renames; pattern patternName / patternConfidence from the * candlestick block; sentiment tags from the closed axis-tag vocabulary), so * analyst scoring, UWR, and the ScoredSignal projection are unchanged. diff --git a/test/providers/fiveLaneAdapters.test.ts b/test/providers/fiveLaneAdapters.test.ts index 63e2044..c6f22aa 100644 --- a/test/providers/fiveLaneAdapters.test.ts +++ b/test/providers/fiveLaneAdapters.test.ts @@ -831,12 +831,16 @@ describe("FLPR-GOV — laneView projections + inertness", () => { } }); - it("viewTechnical pins brokeEmaWithBody=false, preserves the scorer-visible renames, and projects the unread context fields", () => { + it("viewTechnical pins brokeEmaWithBody to the declared unimplemented stub, preserves scorer-visible renames, and projects unread context", () => { + const { BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB } = require("afi-core/analysts/froggy.enrichment_adapter.js") as { + BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB: false; + }; + expect(BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB).toBe(false); const view = viewTechnical({ emaDistancePct: 1.2, isInValueSweetSpot: true, rsi14: 55, ema20: 100, ema50: 98, volumeRatio: 1.1, atr14: 42.5, trendBias: "bullish" } as never)!; expect(view).toEqual({ emaDistancePct: 1.2, isInValueSweetSpot: true, - brokeEmaWithBody: false, + brokeEmaWithBody: BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB, indicators: { rsi: 55, ema_20: 100, ema_50: 98, volume_ratio: 1.1 }, atr14: 42.5, trendBias: "bullish",