fix(storm-measure): restore the pre-registered OR decision rule
The brief pre-registers "median forbedring >= 30 % pa (a) eller (b) -> adopt. < 15 % -> decline." decideVerdict() required BOTH metrics to clear the adopt bar and BOTH to fall under the decline bar, a rule introduced at execution time (plan Step 11 restated the brief's wording unchanged). The divergence is behavioural, not cosmetic: sources +90% / dimensions +10% is adopt under the brief and was inconclusive in code; sources +2% / dimensions +20% is decline under the brief and was inconclusive in code. Adopt is evaluated before decline, so the OR bars do not conflict where they overlap. docs/storm-measurement.md §2 and the test pins follow the same rule. The stricter AND rule may well be the better decision procedure — but changing it after the fact is exactly what pre-registration exists to prevent. Review finding c37bf50d. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vPSXe88qp5aqWUqbDNWoF
This commit is contained in:
parent
21a96b9e31
commit
4c4457f6e9
3 changed files with 34 additions and 14 deletions
|
|
@ -155,8 +155,13 @@ export function measure(records) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Pre-registered mapping. Adopt requires BOTH metrics to clear the bar: a
|
||||
* breadth win on one axis alone is not the effect the loop claims.
|
||||
* Pre-registered mapping, verbatim from the brief: "median forbedring >= 30 %
|
||||
* på (a) eller (b) → adopt. < 15 % → decline." OR on both sides, adopt
|
||||
* evaluated first — so a strong win on one axis is an adopt even when the
|
||||
* other axis sits under the decline bar. A stricter AND rule may well be the
|
||||
* better decision procedure, but changing it here is changing the
|
||||
* pre-registration after the fact, which is the one thing the constraint
|
||||
* exists to prevent.
|
||||
*
|
||||
* @param {number|null} sourcesGain
|
||||
* @param {number|null} dimensionsGain
|
||||
|
|
@ -165,8 +170,8 @@ export function measure(records) {
|
|||
export function decideVerdict(sourcesGain, dimensionsGain) {
|
||||
if (sourcesGain === null || sourcesGain === undefined) return 'insufficient-data';
|
||||
if (dimensionsGain === null || dimensionsGain === undefined) return 'insufficient-data';
|
||||
if (sourcesGain >= ADOPT_THRESHOLD && dimensionsGain >= ADOPT_THRESHOLD) return 'adopt';
|
||||
if (sourcesGain < DECLINE_THRESHOLD && dimensionsGain < DECLINE_THRESHOLD) return 'decline';
|
||||
if (sourcesGain >= ADOPT_THRESHOLD || dimensionsGain >= ADOPT_THRESHOLD) return 'adopt';
|
||||
if (sourcesGain < DECLINE_THRESHOLD || dimensionsGain < DECLINE_THRESHOLD) return 'decline';
|
||||
return 'inconclusive';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue