Blocked-by: #12776 (PR #12937 — meaningful only once the contract narrowing lands).
Found while executing #12776. Filed unassigned; measured on the #12776 branch at 7ed016475.
The observation
The spec's StrategyContext.executeAggregate now declares aggregations[].method: AggregationFunction (the six-value enum), but the two consumer-local CONFIG mirrors in @objectstack/service-analytics still declare the slot as string:
packages/services/service-analytics/src/plugin.ts ~line 125 — AnalyticsServicePlugin's executeAggregate config option (the custom-bridge type an app author implements)packages/services/service-analytics/src/analytics-service.ts ~line 401 — the AnalyticsService config twin, whose own comment says it is "kept in lockstep with StrategyContext.executeAggregate" — no longer true for this member
This is NOT a compile error and NOT unsound: the mirrors type the function an implementor SUPPLIES, and a handler accepting method: string accepts a superset, so assigning it into the narrowed StrategyContext slot stays legal (parameter contravariance). The #12776 PR deliberately did not touch them — consumer config surfaces are that package's own call, outside the ruled file surface.
Why it may deserve a card
Also plugin.ts carries a comment (~line 292) explaining the auto-bridge's runtime parse by pointing at the spec's method: string declaration — that justification text is now historical and should say the parse is defence in depth behind the narrowed type (the #12776 changeset already words it that way).
Refs: #12776 / PR #12937 (the narrowing) - #11833 (the runtime parse the mirrors sit beside).
Blocked-by: #12776 (PR #12937 — meaningful only once the contract narrowing lands).
Found while executing #12776. Filed unassigned; measured on the #12776 branch at
7ed016475.The observation
The spec's
StrategyContext.executeAggregatenow declaresaggregations[].method: AggregationFunction(the six-value enum), but the two consumer-local CONFIG mirrors in@objectstack/service-analyticsstill declare the slot asstring:packages/services/service-analytics/src/plugin.ts~line 125 —AnalyticsServicePlugin'sexecuteAggregateconfig option (the custom-bridge type an app author implements)packages/services/service-analytics/src/analytics-service.ts~line 401 — theAnalyticsServiceconfig twin, whose own comment says it is "kept in lockstep withStrategyContext.executeAggregate" — no longer true for this memberThis is NOT a compile error and NOT unsound: the mirrors type the function an implementor SUPPLIES, and a handler accepting
method: stringaccepts a superset, so assigning it into the narrowedStrategyContextslot stays legal (parameter contravariance). The #12776 PR deliberately did not touch them — consumer config surfaces are that package's own call, outside the ruled file surface.Why it may deserve a card
executeAggregatebridge types their handler against the config mirror, so they still getstring— the compile-time vocabulary finding:StrategyContext.executeAggregatedeclaresaggregations[].methodasstringwhile the engine contract declares the six-valueAggregationFunction#12776 bought for strategy authors does not reach custom-bridge authors until the mirrors narrow too.Also plugin.ts carries a comment (~line 292) explaining the auto-bridge's runtime parse by pointing at the spec's
method: stringdeclaration — that justification text is now historical and should say the parse is defence in depth behind the narrowed type (the #12776 changeset already words it that way).Refs: #12776 / PR #12937 (the narrowing) - #11833 (the runtime parse the mirrors sit beside).