# 10. The compliance-window filter is a report-view parameter, not a Scenario constraint

Date: 2026-07-07

## Status

Accepted

## Context

A recurring landlord question on Reporting: *"what if we don't do works on
properties whose EPC keeps them compliant, from a government perspective,
beyond 2030?"* — i.e. exclude homes that can demonstrate the target band with
an in-date certificate past a cut-off date, and see what the scenario costs
without them.

Two places this could live: as a **constraint on the Scenario** (the optimiser
never plans works for those homes) or as a **filter on the report view** (the
modelling is unchanged; the report recomputes as if those homes' plans were
dropped).

## Decision

**A report-view parameter** on the scenario metrics endpoint (alongside
`hideNonCompliant` and the lodged-baseline toggle), configurable in the UI:

- **Membership rule**: a home is "compliant beyond the window" iff its
  **lodged** certificate shows the selected band or better (default **C**)
  **and** remains valid past the selected date (default **1 Jan 2030**). Both
  band and date are user-configurable. `predicted` homes never qualify — there
  is no certificate to rely on (see EPC provenance in CONTEXT.md).
- **Scenario-side only**: skipped homes' plans drop out of the works-list
  aggregates (costs, funding, benefits, homes upgraded) and they hold their
  current band in the after-distribution. Current-stock figures are untouched;
  the filter only exists when a scenario is selected.

## Alternatives considered

- **Scenario constraint (optimiser skips the homes)**: the "true" answer — the
  engine would redistribute budget across the remaining stock. Rejected here
  because Scenario configuration is immutable ([ADR-0003]) and adding a
  post-hoc exclusion would either mutate that config or mint a near-duplicate
  Scenario per date/band permutation. It also couples an exploratory,
  slider-like question to a full modelling round-trip.
- **Whole-report filter**: hide the homes from every figure including current
  stock. Rejected: the portfolio's home count would disagree with every other
  surface, and the landlord's question is about works, not about the stock.

## Consequences

- The filtered works list is an **approximation**: plans were optimised with
  the skipped homes in scope, so shared-cost effects (e.g. scaffolding
  batching) are not re-optimised away. Acceptable for an exploratory filter;
  the exact answer is future work — a re-model with an explicit exclusion set,
  which would be a new Scenario capability, not this filter.
- The parameter travels in the URL, so filtered views are shareable and the
  PDF can reproduce them.
- If landlords start committing budgets against filtered numbers rather than
  exploring with them, that is the signal to build the re-model path.

[ADR-0003]: ./0003-app-authored-scenarios.md
