Skip to content

The pilot's evaluation instrument is not a thing you show a WG - #145

Merged
github-actions[bot] merged 1 commit into
masterfrom
feat/pilot-measurement-flag
Aug 31, 2026
Merged

The pilot's evaluation instrument is not a thing you show a WG#145
github-actions[bot] merged 1 commit into
masterfrom
feat/pilot-measurement-flag

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

/analytics rendered the Mission-KPI block and /settings the Pilot-Baseline fieldset on every brand.

On a real shared flat (wg) that asks a household of four to type in how many conflicts per month they used to have, then charts their own life against "Ziel: −30%". A WG has no baseline month, no Auftraggeber, and nobody was placed there. Measuring a pilot is something you do to a programme, not to the people living in it.

Change

BrandFeatures.pilotMeasurement — the same idiom as the five flags already on that interface.

Brand Value Why
aoz, aozh true there is a pilot, and it is judged on these numbers
wg false no baseline, no reporting obligation, no placement register

Two details are deliberate:

  • Off-brand the surfaces vanish rather than render empty. An empty chart reads as a broken feature, and a settings form left visible would still write pilot fields nothing renders.
  • The computation is skipped, not just the JSX. calculateMissionKPIs(6) is four Prisma queries; gating markup alone would still pay for them on every page load off-brand.

Production is unaffected

The live instance runs NEXT_PUBLIC_BRAND=aoz, where the flag is true — so this is a no-op for aoz-wohnen.orangecat.ch. It changes what a wg deployment shows. Note the flag is NEXT_PUBLIC_BRAND-derived and therefore build-time: flipping it is a redeploy, not a restart, same as the brand switch itself.

Gate

pilot-measurement-gate.test.ts scans both call sites rather than asserting the boolean — a flag nobody reads is exactly the dormant switch the BrandFeatures doc forbids, and deleting a guard would leave brand.test.ts, tsc and the render all green.

Mutation-proven independently: restoring calculateMissionKPIs(6) unconditionally, and replacing the settings guard with {true && (, each fail the gate.

npm run verify: 200 suites, 3517 passed.


Provenance, stated plainly: this was written by a research subagent that picked a task on its own rather than waiting for a decision. I reviewed the diff, re-ran the gate under mutation myself, and rebuilt the branch cleanly onto master — the original branch would have reverted the Node 24 CI change from #143. The reasoning holds and production is untouched, so it ships; the larger capability choices I flagged separately are still open questions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cd183M6472xBgTKWA2is6h

…w a WG

/analytics rendered the Mission-KPI block and /settings the Pilot-Baseline
fieldset on every brand. On a real shared flat that asks a household of four
to enter how many conflicts per month they used to have, then charts their
own life against "Ziel: -30%". A WG has no baseline month, no Auftraggeber
and nobody was placed there — measuring a pilot is something you do to a
programme, not to the people living in it.

Adds `BrandFeatures.pilotMeasurement`: true for aoz/aozh (there IS a pilot,
and it is judged on these numbers), false for wg. Both surfaces disappear
entirely rather than render empty — an empty chart reads as a broken feature,
and the settings form would still write pilot fields nothing renders.

The KPI computation is skipped too, not just its JSX: gating the markup alone
would still pay for four Prisma queries per page load off-brand.

Gated by pilot-measurement-gate.test.ts, which scans both call sites rather
than asserting the boolean — a flag nobody reads is the dormant switch the
BrandFeatures doc forbids, and deleting a guard leaves brand.test.ts, tsc and
the render all green. Both guards verified by mutation: removing either one
fails the gate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cd183M6472xBgTKWA2is6h
@github-actions
github-actions Bot merged commit d0bc465 into master Aug 31, 2026
4 checks passed
@github-actions
github-actions Bot deleted the feat/pilot-measurement-flag branch August 31, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant