Skip to contentWolf-Rayet

Decision records

ADR-0015 Scope ground derives from stacking context

Superseded by ADR-00162026-08-27Phase 3

#Context

The substrate-floor check infers each Scope's ground from the modal rendered value and fails on deviation from the theme substrate — an anti-gaming measure against under-declared grounds. ADR-0011 recorded its limitation: it cannot distinguish a legitimate raised surface from a dishonest declaration. 06-overlay-violation made the limitation concrete: a scrim large enough to matter necessarily changes its Scope's modal ground, so a legitimate overlay reads as a mis-declared substrate, and every theme sits within 0.031–0.045 of the 0.05 tolerance in ordinary scenes. The check needs a ground it can trust without inferring it from the pixels it is auditing.

#Decision

A Scope's ground is derived from its declared stacking context — the declaration ADR-0013 already requires — never stated as a free value. base and raised ground on the theme substrate; overlay grounds on the scrim composite: scrim color over backdrop at the scrim alpha, computed from shipped tokens. The engine measures emission deviation from the derived ground, and the substrate-floor check becomes a verification that the rendered modal ground matches the derived ground within platform tolerance — a mis-declaration still fails, because the pixels will not match the ground the declaration predicts, while a legitimate overlay passes because they will. No Scope carries a numeric ground anywhere: the stacking context is the entire declaration surface, and it is an enumerated set.

#Rejected options

Free-form declared ground (a Scope states its anchor lightness). Maximally flexible. Rejected because it is the exploit: a Scope declaring a dark ground under light content emits for free, which is substrate laundering — the same move ADR-009 refused at the content boundary, refused here at the ground.

Raise the modal-inference tolerance. One-line fix for 06. Rejected because it dilutes the anti-gaming check in every scene to excuse one legitimate case, and the margins are already thin — 0.031 against 0.05 leaves no room to raise anything without blinding the check.

Exempt overlay Scopes from the floor check. Surgical. Rejected because an exemption keyed to a declaration is an invitation: declare overlay, skip the audit — the laundering path rebuilt with a context name as the key.

#Consequences

The Scope contract in the Phase 3 types carries stacking context as a required property, and the engine reads it as the ground authority; the composition lint verifies every Scope declares exactly one. 06-overlay-violation is the acceptance test: its substrate-floor false positive must disappear while its emission failure stands unchanged, and no value in the Phase 0 or themed baselines may move for scenes whose contexts are all base. The scope-dilution residual and ADR-005's under-declaration routing are untouched — this ADR fixes the ground, not the levels. Touches the Emission load and Salience rows' shared measurement path; adds no new check kind.