@productbrain/cli 0.1.0-beta.3107 → 0.1.0-beta.3113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scoreboard/diagnose.d.ts +30 -93
- package/dist/scoreboard/diagnose.d.ts.map +1 -1
- package/dist/scoreboard/diagnose.js +140 -89
- package/dist/scoreboard/diagnose.js.map +1 -1
- package/dist/scoreboard/diagnose.test.d.ts +3 -2
- package/dist/scoreboard/diagnose.test.d.ts.map +1 -1
- package/dist/scoreboard/diagnose.test.js +81 -43
- package/dist/scoreboard/diagnose.test.js.map +1 -1
- package/dist/scoreboard/floors.d.ts +47 -0
- package/dist/scoreboard/floors.d.ts.map +1 -0
- package/dist/scoreboard/floors.js +33 -0
- package/dist/scoreboard/floors.js.map +1 -0
- package/package.json +1 -1
|
@@ -6,41 +6,6 @@
|
|
|
6
6
|
* node scripts/sync-scoreboard-core.mjs
|
|
7
7
|
* A content-hash drift gate (scripts/check-mcp-lib-drift.mjs) fails CI if this drifts.
|
|
8
8
|
*/
|
|
9
|
-
/**
|
|
10
|
-
* Flywheel scoreboard — the DIAGNOSIS LAYER (spec §2d), SHARED SSOT.
|
|
11
|
-
*
|
|
12
|
-
* This is the layer that turns a raw number into the agent closing the loop. It is a PURE
|
|
13
|
-
* mapping (no I/O — no fs, no node, no Convex runtime) from the data-layer payload
|
|
14
|
-
* (M1/M2/M3/materialization, from the internal `scoreboard` action) PLUS the CLI-computed M5
|
|
15
|
-
* local-drift, to per-metric diagnoses: `{ status, reading, cause, nextAction }`.
|
|
16
|
-
*
|
|
17
|
-
* WHY THIS LIVES IN ITS OWN WORKSPACE PACKAGE (`@product-brain/scoreboard-core`): the diagnosis
|
|
18
|
-
* is consumed by BOTH the `pb` CLI (`packages/cli`, pretty + --json) AND the Cortex page
|
|
19
|
-
* (`src/routes/(app)/w/[slug]/scoreboard`). A shared workspace package is the repo's convention
|
|
20
|
-
* for framework-agnostic logic two non-Convex surfaces share (mirrors `@product-brain/doc-ast`).
|
|
21
|
-
* The CLI cannot import across the monorepo boundary at publish time, so it consumes this body
|
|
22
|
-
* through a committed copy guarded by a content-hash drift check (the same pattern mcp-server uses
|
|
23
|
-
* for `convex/lib/flags_core.ts` → `src/flags.ts`). The SvelteKit app imports it directly.
|
|
24
|
-
*
|
|
25
|
-
* NOTHING HERE TOUCHES fs/node/Convex — the CLI-only `computeLocalDrift` (which stats
|
|
26
|
-
* `.productbrain/`) stays in `packages/cli/src/scoreboard/localDrift.ts`. `diagnoseM5` itself is
|
|
27
|
-
* pure (it maps a LocalDriftM5 → diagnosis) and lives here; only the fs *collection* of that
|
|
28
|
-
* LocalDriftM5 is CLI-only.
|
|
29
|
-
*
|
|
30
|
-
* HONESTY OVER FLATTERY (spec §0, §2c). The hard rules this layer encodes:
|
|
31
|
-
* - NO flip threshold is pinned yet (DEC-1282). Where a flip would decide ok/degraded, we
|
|
32
|
-
* render `awaiting` ("threshold unpinned — pin against live distribution"), NEVER an
|
|
33
|
-
* invented number. The RAW reading is always shown.
|
|
34
|
-
* - M4 (WP-487 Slice 2, FEAT-1374: the organic rework meter) is now IN the data payload —
|
|
35
|
-
* raw distribution only, `unmeasured` with nothing served yet, `awaiting` otherwise (no
|
|
36
|
-
* first-time-good floor is pinned), NEVER a fake green, NEVER a causality claim.
|
|
37
|
-
* - A STANDING `unmeasured` line for coaching/moat quality (TEN-2377): four green tiles ≠ a
|
|
38
|
-
* healthy moat. The board must not imply moat health.
|
|
39
|
-
* - Every `degraded`/`awaiting` carries a concrete `nextAction`.
|
|
40
|
-
*
|
|
41
|
-
* Pure + exported so the diagnosis unit tests assert the awaiting/unmeasured/degraded mapping
|
|
42
|
-
* without any network or filesystem.
|
|
43
|
-
*/
|
|
44
9
|
/** A metric's diagnosis status. */
|
|
45
10
|
export type DiagnosisStatus = 'ok' | 'degraded' | 'awaiting' | 'unmeasured';
|
|
46
11
|
export interface MetricDiagnosis {
|
|
@@ -67,12 +32,8 @@ export interface M1Payload {
|
|
|
67
32
|
draftShare: number | null;
|
|
68
33
|
windowMs: number;
|
|
69
34
|
servedRowCount: number;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* Optional so an older payload fails SOFT. When this is > 0 and the mix is empty, the operator
|
|
73
|
-
* has been serving — just not on the one path M1 measures — and the diagnosis must say so
|
|
74
|
-
* rather than repeat "drive a serve".
|
|
75
|
-
*/
|
|
35
|
+
/** TEN-2449: rows rendered but outside M1's covered serve (`orient/cli/brief`). Optional so an
|
|
36
|
+
* older payload fails SOFT; when >0 with an empty mix, say so instead of "drive a serve". */
|
|
76
37
|
excludedOutOfCoverage?: number;
|
|
77
38
|
}
|
|
78
39
|
export interface M2Payload {
|
|
@@ -131,11 +92,9 @@ export interface M4Payload {
|
|
|
131
92
|
};
|
|
132
93
|
}
|
|
133
94
|
/**
|
|
134
|
-
* WP-499 Slice B (TEN-2743, §2.5): advisories/verdicts/detection-coverage/override-rate.
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* `humanBar.meets` is the one legitimate bar-comparison field, read as-is from the server,
|
|
138
|
-
* never a second verdict computed here.
|
|
95
|
+
* WP-499 Slice B (TEN-2743, §2.5): advisories/verdicts/detection-coverage/override-rate. Mirrors
|
|
96
|
+
* `convex/scoreboard/aggregates.ts`'s `CoherenceResult` structurally. NO thresholds baked in
|
|
97
|
+
* (DEC-1282) — `humanBar.meets` is read as-is from the server, never a second local verdict.
|
|
139
98
|
*/
|
|
140
99
|
export interface CoherencePayload {
|
|
141
100
|
openConflictCount: number;
|
|
@@ -143,8 +102,8 @@ export interface CoherencePayload {
|
|
|
143
102
|
reviewed: number;
|
|
144
103
|
real: number;
|
|
145
104
|
falseAlarm: number;
|
|
146
|
-
/** PR #422 review (
|
|
147
|
-
*
|
|
105
|
+
/** PR #422 review (P2): reviewed/real/falseAlarm/humanBar above are a SAMPLE (not complete)
|
|
106
|
+
* whenever true — render a qualifier, never present as complete. */
|
|
148
107
|
reviewedTruncated: boolean;
|
|
149
108
|
humanBar: {
|
|
150
109
|
meets: boolean;
|
|
@@ -174,73 +133,57 @@ export interface ScoreboardPayload {
|
|
|
174
133
|
coherence: CoherencePayload;
|
|
175
134
|
}
|
|
176
135
|
/**
|
|
177
|
-
* The CLI-computed M5 local-pull drift (A5). Produced by computeLocalDrift() (NOT the data
|
|
178
|
-
*
|
|
179
|
-
* materialization) was unavailable; the diagnosis fails soft to `awaiting`.
|
|
136
|
+
* The CLI-computed M5 local-pull drift (A5). Produced by computeLocalDrift() (NOT the data layer
|
|
137
|
+
* — DEC-1284). `null` fields mean local/server data was unavailable; fails soft to `awaiting`.
|
|
180
138
|
*/
|
|
181
139
|
export interface LocalDriftM5 {
|
|
182
|
-
/** Newest mtime across the local `.productbrain/` projection files, ms epoch. Null = absent. */
|
|
183
140
|
localProjectionMtime: number | null;
|
|
184
|
-
/** Server-side projection generation time (materialization.latestMaterializedAt). */
|
|
185
141
|
serverMaterializedAt: number | null;
|
|
186
|
-
/** How far the local pull lags the server projection, ms (server − local). Null when undeterminable. */
|
|
187
142
|
localLagMs: number | null;
|
|
188
|
-
/** Absolute age of the local projection vs now, ms. Null when the projection is absent. */
|
|
189
143
|
localAgeMs: number | null;
|
|
190
|
-
/** Set when `.productbrain/` could not be located/stat'd — diagnosis = awaiting, not a fake ok. */
|
|
191
144
|
unavailableReason?: string;
|
|
192
145
|
}
|
|
193
146
|
/**
|
|
194
|
-
* M1 — retrieval truth-state mix. The no-domain-share flip (INS-1775 floor) is UNPINNED
|
|
195
|
-
*
|
|
196
|
-
* serves it is `unmeasured` (nothing served yet). The named cause for a high no-domain share is
|
|
197
|
-
* "domains unratified".
|
|
147
|
+
* M1 — retrieval truth-state mix. The no-domain-share flip (INS-1775 floor) is UNPINNED — `awaiting`
|
|
148
|
+
* whenever there is data (never invent the 50% floor); `unmeasured` with zero serves.
|
|
198
149
|
*/
|
|
199
150
|
export declare function diagnoseM1(m1: M1Payload): MetricDiagnosis;
|
|
200
151
|
/**
|
|
201
|
-
* M2 — ranking agreement
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* unpinned, but the structural ok/degraded does not need a number (0 vs non-0 is exact).
|
|
152
|
+
* M2 — ranking agreement. A clean structural signal: post-unify full parity (0 divergent buckets)
|
|
153
|
+
* is the EXPECTED steady state (`ok`); non-zero divergence is the regression signal (`degraded`) —
|
|
154
|
+
* exact, no number to pin.
|
|
205
155
|
*/
|
|
206
156
|
export declare function diagnoseM2(m2: M2Payload): MetricDiagnosis;
|
|
207
157
|
/**
|
|
208
|
-
* M3 — draft-to-SSOT rate. The in-session-ratify floor (ASM-45 rolling-20 window) is
|
|
209
|
-
*
|
|
158
|
+
* M3 — draft-to-SSOT rate. The in-session-ratify floor (ASM-45 rolling-20 window) is PINNED
|
|
159
|
+
* per DEC-1513 (`M3_IN_SESSION_FLOOR`) — a determinable reading renders a real `ok`/`degraded`
|
|
160
|
+
* verdict. Zero captures → `unmeasured`. An undeterminable rate (null) fails soft to `awaiting`.
|
|
210
161
|
*/
|
|
211
162
|
export declare function diagnoseM3(m3: M3Payload): MetricDiagnosis;
|
|
212
163
|
/**
|
|
213
164
|
* M4 — organic rework meter (WP-487 Slice 2, FEAT-1374). Joins served governance against
|
|
214
|
-
* later-reported rework signals
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
* first-time-good"). `unmeasured` when nothing has been served in the window yet (no coverage
|
|
218
|
-
* population to judge, mirrors diagnoseM1's zero-mix gate); `awaiting` whenever there IS data,
|
|
219
|
-
* since no first-time-good floor is pinned yet — the raw share is always shown, never replaced
|
|
220
|
-
* by an invented threshold.
|
|
165
|
+
* later-reported rework signals in a frozen 72h window (TEN-2728); RAW distribution + a
|
|
166
|
+
* false-attribution counter, never a verdict (DEC-1282) and never causality (association only).
|
|
167
|
+
* `unmeasured` with nothing served; `awaiting` otherwise (no floor pinned yet).
|
|
221
168
|
*/
|
|
222
169
|
export declare function diagnoseM4(m4: M4Payload): MetricDiagnosis;
|
|
223
170
|
/**
|
|
224
171
|
* M5 — projection staleness, computed as LOCAL-PULL drift at the CLI (DEC-1284). The staleness-age
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* reason — fail-soft, never a fake ok.
|
|
172
|
+
* floor is PINNED per DEC-1513 (`M5_LOCAL_AGE_FLOOR_DAYS`) — a determinable reading renders a real
|
|
173
|
+
* `ok`/`degraded` verdict. Unavailable local/server data → `unmeasured` with the reason, fail-soft.
|
|
228
174
|
*/
|
|
229
175
|
export declare function diagnoseM5(m5: LocalDriftM5): MetricDiagnosis;
|
|
230
176
|
/**
|
|
231
177
|
* M5 (server view) — the Cortex page has NO local filesystem, so it cannot compute the spec's
|
|
232
178
|
* local-pull drift (DEC-1284). It reads only the server-side projection-generation building block
|
|
233
|
-
* (`materialization.latestMaterializedAt` / age)
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* staleness-age flip is UNPINNED → `awaiting` when there is a materialization; `unmeasured` when
|
|
179
|
+
* (`materialization.latestMaterializedAt` / age) — adding NO new truth (spec §2d). Deliberately a
|
|
180
|
+
* DIFFERENT, HONEST framing from `diagnoseM5`: SERVER-generation age, never local-pull staleness.
|
|
181
|
+
* The staleness-age floor is PINNED per DEC-1513 (`M5_SERVER_AGE_FLOOR_DAYS`); `unmeasured` when
|
|
237
182
|
* the workspace has never materialized.
|
|
238
183
|
*/
|
|
239
184
|
export declare function diagnoseM5FromServer(materialization: MaterializationPayload): MetricDiagnosis;
|
|
240
|
-
/**
|
|
241
|
-
*
|
|
242
|
-
* it is a permanent honesty marker so four green tiles are never read as "the moat is healthy".
|
|
243
|
-
*/
|
|
185
|
+
/** The STANDING coaching/moat-quality `unmeasured` line (TEN-2377) — a permanent honesty marker
|
|
186
|
+
* so four green tiles are never read as "the moat is healthy". */
|
|
244
187
|
export declare function diagnoseCoachingMoat(): MetricDiagnosis;
|
|
245
188
|
/** The full diagnosis bundle the CLI renders + emits in --json. */
|
|
246
189
|
export interface ScoreboardDiagnosis {
|
|
@@ -252,15 +195,9 @@ export interface ScoreboardDiagnosis {
|
|
|
252
195
|
/** Standing honesty marker — coaching/moat quality is unmeasured. */
|
|
253
196
|
moat: MetricDiagnosis;
|
|
254
197
|
}
|
|
255
|
-
/**
|
|
256
|
-
* diagnose — the whole mapping: data-layer payload + CLI-computed M5 local-drift → per-metric
|
|
257
|
-
* diagnoses + the standing M4-awaiting + coaching-unmeasured lines. Pure.
|
|
258
|
-
*/
|
|
198
|
+
/** diagnose — data-layer payload + CLI-computed M5 local-drift → per-metric diagnoses. Pure. */
|
|
259
199
|
export declare function diagnose(payload: ScoreboardPayload, m5: LocalDriftM5): ScoreboardDiagnosis;
|
|
260
|
-
/**
|
|
261
|
-
*
|
|
262
|
-
* so M5 is the server-generation-age view (`diagnoseM5FromServer`) rather than the CLI local-pull
|
|
263
|
-
* drift. Everything else is identical to `diagnose`. Pure, browser-safe.
|
|
264
|
-
*/
|
|
200
|
+
/** diagnoseFromServer — Cortex has NO local fs, so M5 uses `diagnoseM5FromServer`'s
|
|
201
|
+
* server-generation-age view instead of local-pull drift. Otherwise identical to `diagnose`. */
|
|
265
202
|
export declare function diagnoseFromServer(payload: ScoreboardPayload): ScoreboardDiagnosis;
|
|
266
203
|
//# sourceMappingURL=diagnose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/scoreboard/diagnose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/scoreboard/diagnose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA0CH,mCAAmC;AACnC,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5E,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,E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;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,sBAAsB,GAAG,eAAe,CAoC7F;AAED;mEACmE;AACnE,wBAAgB,oBAAoB,IAAI,eAAe,CAUtD;AAED,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,qEAAqE;IACrE,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,gGAAgG;AAChG,wBAAgB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,EAAE,YAAY,GAAG,mBAAmB,CAS1F;AAED;iGACiG;AACjG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,mBAAmB,CASlF"}
|
|
@@ -6,34 +6,59 @@
|
|
|
6
6
|
* node scripts/sync-scoreboard-core.mjs
|
|
7
7
|
* A content-hash drift gate (scripts/check-mcp-lib-drift.mjs) fails CI if this drifts.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Flywheel scoreboard — the DIAGNOSIS LAYER (spec §2d), SHARED SSOT.
|
|
11
|
+
*
|
|
12
|
+
* This is the layer that turns a raw number into the agent closing the loop. It is a PURE
|
|
13
|
+
* mapping (no I/O — no fs, no node, no Convex runtime) from the data-layer payload
|
|
14
|
+
* (M1/M2/M3/materialization, from the internal `scoreboard` action) PLUS the CLI-computed M5
|
|
15
|
+
* local-drift, to per-metric diagnoses: `{ status, reading, cause, nextAction }`.
|
|
16
|
+
*
|
|
17
|
+
* WHY THIS LIVES IN ITS OWN WORKSPACE PACKAGE (`@product-brain/scoreboard-core`): the diagnosis
|
|
18
|
+
* is consumed by BOTH the `pb` CLI (`packages/cli`, pretty + --json) AND the Cortex page
|
|
19
|
+
* (`src/routes/(app)/w/[slug]/scoreboard`). A shared workspace package is the repo's convention
|
|
20
|
+
* for framework-agnostic logic two non-Convex surfaces share (mirrors `@product-brain/doc-ast`).
|
|
21
|
+
* The CLI cannot import across the monorepo boundary at publish time, so it consumes this body
|
|
22
|
+
* through a committed copy guarded by a content-hash drift check (the same pattern mcp-server uses
|
|
23
|
+
* for `convex/lib/flags_core.ts` → `src/flags.ts`). The SvelteKit app imports it directly.
|
|
24
|
+
*
|
|
25
|
+
* NOTHING HERE TOUCHES fs/node/Convex — the CLI-only `computeLocalDrift` (which stats
|
|
26
|
+
* `.productbrain/`) stays in `packages/cli/src/scoreboard/localDrift.ts`. `diagnoseM5` itself is
|
|
27
|
+
* pure (it maps a LocalDriftM5 → diagnosis) and lives here; only the fs *collection* of that
|
|
28
|
+
* LocalDriftM5 is CLI-only.
|
|
29
|
+
*
|
|
30
|
+
* HONESTY OVER FLATTERY (spec §0, §2c). The hard rules this layer encodes:
|
|
31
|
+
* - Most flip thresholds remain UNPINNED (DEC-1282): `awaiting`, NEVER an invented number;
|
|
32
|
+
* the RAW reading is always shown. **Exception (DEC-1513, 2026-07-26):** M3's in-session
|
|
33
|
+
* floor and M5's two age floors ARE pinned (`./floors.ts`) — `diagnoseM3`/`diagnoseM5`/
|
|
34
|
+
* `diagnoseM5FromServer` render a real `ok`/`degraded` verdict. DEC-1282's
|
|
35
|
+
* advisory-never-blocking semantics still hold — a pinned floor only changes `status`.
|
|
36
|
+
* - M4 (WP-487 Slice 2, FEAT-1374: the organic rework meter) is now IN the data payload —
|
|
37
|
+
* raw distribution only, `unmeasured` with nothing served yet, `awaiting` otherwise (no
|
|
38
|
+
* first-time-good floor is pinned), NEVER a fake green, NEVER a causality claim.
|
|
39
|
+
* - A STANDING `unmeasured` line for coaching/moat quality (TEN-2377): four green tiles ≠ a
|
|
40
|
+
* healthy moat. The board must not imply moat health.
|
|
41
|
+
* - Every `degraded`/`awaiting` carries a concrete `nextAction`.
|
|
42
|
+
*
|
|
43
|
+
* Pure + exported so the diagnosis unit tests assert the awaiting/unmeasured/degraded mapping
|
|
44
|
+
* without any network or filesystem.
|
|
45
|
+
*/
|
|
46
|
+
import { M3_IN_SESSION_FLOOR, M5_LOCAL_AGE_FLOOR_DAYS, M5_SERVER_AGE_FLOOR_DAYS } from './floors.js';
|
|
47
|
+
// User-facing copy carries NO raw Chain IDs (chain-id-leak guard) — the CLI prints `cause`/
|
|
48
|
+
// `nextAction`/`reading` verbatim to any tenant's terminal; IDs are cited in comments only.
|
|
13
49
|
const UNPINNED = 'threshold unpinned — pin against the live distribution';
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// nextAction) but NOT Cortex — +page.svelte:171 renders only tile.reading + a static tooltip.
|
|
22
|
-
// Surfacing PROPOSED state there is real, disclosed follow-up work, out of WP-527's scope.
|
|
23
|
-
// M3 in-session-ratify: observed 0% in every Product-OS run so far — a conservative early bar.
|
|
24
|
-
const M3_PROPOSED_IN_SESSION_FLOOR = 0.1;
|
|
25
|
-
// M5 has TWO INCOMPARABLE age instruments (diagnoseM5's local-pull drift vs diagnoseM5FromServer's
|
|
26
|
-
// server-generation age) — each gets its OWN single-observation calibration below, never a
|
|
27
|
-
// cross-instrument "trend" (the bug this fixed: Run 1's local-age and Run 3's materialization-age
|
|
28
|
-
// are different measurements, not two points on one series). Local-pull: only on-record reading is
|
|
29
|
-
// 14.1d (Run 1). Server-generation: only on-record reading is ~5.1d (Run 3's materialization age).
|
|
30
|
-
const M5_PROPOSED_LOCAL_AGE_FLOOR_DAYS = 10;
|
|
31
|
-
const M5_PROPOSED_SERVER_AGE_FLOOR_DAYS = 7;
|
|
50
|
+
// DEC-1513 (2026-07-26) pinned M3's and M5's floors — see ./floors.ts for values/rationale/
|
|
51
|
+
// how-to-tune. VISIBILITY GAP (carried from WP-527): reaches the `pb scoreboard` CLI but NOT
|
|
52
|
+
// Cortex (+page.svelte:171 renders only tile.reading) — disclosed follow-up, out of scope here.
|
|
53
|
+
const DAY_MS = 1000 * 60 * 60 * 24;
|
|
54
|
+
function isDeterminate(n) {
|
|
55
|
+
return typeof n === 'number' && Number.isFinite(n);
|
|
56
|
+
}
|
|
32
57
|
function pct(n) {
|
|
33
|
-
return n
|
|
58
|
+
return isDeterminate(n) ? `${(n * 100).toFixed(0)}%` : 'n/a';
|
|
34
59
|
}
|
|
35
60
|
function ms(n) {
|
|
36
|
-
if (n
|
|
61
|
+
if (!isDeterminate(n))
|
|
37
62
|
return 'n/a';
|
|
38
63
|
const h = n / (1000 * 60 * 60);
|
|
39
64
|
if (h < 1)
|
|
@@ -42,18 +67,23 @@ function ms(n) {
|
|
|
42
67
|
return `${h.toFixed(1)}h`;
|
|
43
68
|
return `${(h / 24).toFixed(1)}d`;
|
|
44
69
|
}
|
|
70
|
+
function pctPrecise(n, floorValue) {
|
|
71
|
+
if (!isDeterminate(n))
|
|
72
|
+
return 'n/a';
|
|
73
|
+
if (n === floorValue)
|
|
74
|
+
return pct(n);
|
|
75
|
+
const decimals = [0, 1, 2, 3].find((d) => (n * 100).toFixed(d) !== (floorValue * 100).toFixed(d)) ?? 3;
|
|
76
|
+
return `${(n * 100).toFixed(decimals)}%`;
|
|
77
|
+
}
|
|
45
78
|
/**
|
|
46
|
-
* M1 — retrieval truth-state mix. The no-domain-share flip (INS-1775 floor) is UNPINNED
|
|
47
|
-
*
|
|
48
|
-
* serves it is `unmeasured` (nothing served yet). The named cause for a high no-domain share is
|
|
49
|
-
* "domains unratified".
|
|
79
|
+
* M1 — retrieval truth-state mix. The no-domain-share flip (INS-1775 floor) is UNPINNED — `awaiting`
|
|
80
|
+
* whenever there is data (never invent the 50% floor); `unmeasured` with zero serves.
|
|
50
81
|
*/
|
|
51
82
|
export function diagnoseM1(m1) {
|
|
52
83
|
const reading = `served=${m1.mix.total} · audited=${pct(m1.auditedShare)} · draft=${pct(m1.draftShare)} · ` +
|
|
53
84
|
`no-domain=${pct(m1.noDomainShare)} (window ${ms(m1.windowMs)})`;
|
|
54
85
|
if (m1.mix.total === 0) {
|
|
55
|
-
// TEN-2449: M1 counts ONE serve shape
|
|
56
|
-
// the operator forever: that surface is uninstrumented, so serving it can never move M1.
|
|
86
|
+
// TEN-2449: M1 counts ONE serve shape; naming start_pb would loop the operator forever.
|
|
57
87
|
const outOfCoverage = m1.excludedOutOfCoverage ?? 0;
|
|
58
88
|
return {
|
|
59
89
|
metric: 'M1',
|
|
@@ -77,10 +107,9 @@ export function diagnoseM1(m1) {
|
|
|
77
107
|
};
|
|
78
108
|
}
|
|
79
109
|
/**
|
|
80
|
-
* M2 — ranking agreement
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* unpinned, but the structural ok/degraded does not need a number (0 vs non-0 is exact).
|
|
110
|
+
* M2 — ranking agreement. A clean structural signal: post-unify full parity (0 divergent buckets)
|
|
111
|
+
* is the EXPECTED steady state (`ok`); non-zero divergence is the regression signal (`degraded`) —
|
|
112
|
+
* exact, no number to pin.
|
|
84
113
|
*/
|
|
85
114
|
export function diagnoseM2(m2) {
|
|
86
115
|
const reading = `divergentBuckets=${m2.divergentBuckets} · fullParity=${m2.fullParity}${m2.task ? ` · task="${m2.task}"` : ''}`;
|
|
@@ -105,11 +134,12 @@ export function diagnoseM2(m2) {
|
|
|
105
134
|
};
|
|
106
135
|
}
|
|
107
136
|
/**
|
|
108
|
-
* M3 — draft-to-SSOT rate. The in-session-ratify floor (ASM-45 rolling-20 window) is
|
|
109
|
-
*
|
|
137
|
+
* M3 — draft-to-SSOT rate. The in-session-ratify floor (ASM-45 rolling-20 window) is PINNED
|
|
138
|
+
* per DEC-1513 (`M3_IN_SESSION_FLOOR`) — a determinable reading renders a real `ok`/`degraded`
|
|
139
|
+
* verdict. Zero captures → `unmeasured`. An undeterminable rate (null) fails soft to `awaiting`.
|
|
110
140
|
*/
|
|
111
141
|
export function diagnoseM3(m3) {
|
|
112
|
-
const reading = `captured=${m3.capturedCount} · in-session=${
|
|
142
|
+
const reading = `captured=${m3.capturedCount} · in-session=${pctPrecise(m3.inSessionRatifiedRate, M3_IN_SESSION_FLOOR.value)} · ` +
|
|
113
143
|
`ever=${pct(m3.everRatifiedRate)} (over ${m3.sessionsConsidered}/${m3.sessionWindow} sessions)`;
|
|
114
144
|
if (m3.capturedCount === 0) {
|
|
115
145
|
return {
|
|
@@ -121,27 +151,34 @@ export function diagnoseM3(m3) {
|
|
|
121
151
|
nextAction: 'capture in-session (pb capture), then re-read after the human accepts in Cortex',
|
|
122
152
|
};
|
|
123
153
|
}
|
|
154
|
+
if (!isDeterminate(m3.inSessionRatifiedRate)) {
|
|
155
|
+
return {
|
|
156
|
+
metric: 'M3',
|
|
157
|
+
label: 'Draft-to-SSOT rate',
|
|
158
|
+
status: 'awaiting',
|
|
159
|
+
reading,
|
|
160
|
+
cause: `in-session ratify rate undeterminable — pinned floor ${pct(M3_IN_SESSION_FLOOR.value)} cannot be compared`,
|
|
161
|
+
nextAction: 'capture in-session (pb capture), then re-read once a rate is computable',
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const meets = m3.inSessionRatifiedRate >= M3_IN_SESSION_FLOOR.value;
|
|
124
165
|
return {
|
|
125
166
|
metric: 'M3',
|
|
126
167
|
label: 'Draft-to-SSOT rate',
|
|
127
|
-
status: '
|
|
168
|
+
status: meets ? 'ok' : 'degraded',
|
|
128
169
|
reading,
|
|
129
|
-
// ASM-45
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
nextAction:
|
|
170
|
+
// ASM-45 + DEC-1513 govern this metric — cited in comments only (chain-id-leak guard).
|
|
171
|
+
cause: meets
|
|
172
|
+
? `in-session ratify rate ${pctPrecise(m3.inSessionRatifiedRate, M3_IN_SESSION_FLOOR.value)} meets the pinned floor ${pct(M3_IN_SESSION_FLOOR.value)} (rolling-20-session design)`
|
|
173
|
+
: `in-session ratify rate ${pctPrecise(m3.inSessionRatifiedRate, M3_IN_SESSION_FLOOR.value)} is below the pinned floor ${pct(M3_IN_SESSION_FLOOR.value)} (rolling-20-session design) — the draft-graveyard pattern is confirmed`,
|
|
174
|
+
nextAction: meets ? '' : 'accept/promote captures in Cortex to raise the in-session ratify rate',
|
|
134
175
|
};
|
|
135
176
|
}
|
|
136
177
|
/**
|
|
137
178
|
* M4 — organic rework meter (WP-487 Slice 2, FEAT-1374). Joins served governance against
|
|
138
|
-
* later-reported rework signals
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* first-time-good"). `unmeasured` when nothing has been served in the window yet (no coverage
|
|
142
|
-
* population to judge, mirrors diagnoseM1's zero-mix gate); `awaiting` whenever there IS data,
|
|
143
|
-
* since no first-time-good floor is pinned yet — the raw share is always shown, never replaced
|
|
144
|
-
* by an invented threshold.
|
|
179
|
+
* later-reported rework signals in a frozen 72h window (TEN-2728); RAW distribution + a
|
|
180
|
+
* false-attribution counter, never a verdict (DEC-1282) and never causality (association only).
|
|
181
|
+
* `unmeasured` with nothing served; `awaiting` otherwise (no floor pinned yet).
|
|
145
182
|
*/
|
|
146
183
|
export function diagnoseM4(m4) {
|
|
147
184
|
const reading = `served=${m4.servedCount} (decided=${m4.decidedCount}, pending=${m4.pendingObservationCount}, ` +
|
|
@@ -164,21 +201,18 @@ export function diagnoseM4(m4) {
|
|
|
164
201
|
label: 'Organic rework meter (first-time-good)',
|
|
165
202
|
status: 'awaiting',
|
|
166
203
|
reading,
|
|
167
|
-
// No first-time-good floor
|
|
168
|
-
// to claim one — WP-C spec §5/§9). No causality claim: a served row followed by rework within
|
|
169
|
-
// the window is an ASSOCIATION, never asserted as "the served context caused the rework".
|
|
204
|
+
// No first-time-good floor pinned yet (WP-C spec §5/§9). ASSOCIATION only, never causality.
|
|
170
205
|
cause: `first-time-good floor ${UNPINNED}; a high false-attribution rate means many rework signals have no served-context evidence to join against — read the share with that caveat, not as a verdict`,
|
|
171
206
|
nextAction: 'pin the first-time-good floor once a predeclared observation window completes (WP-C spec §9); if false-attribution stays high, the pb-reported signal may be missing real rework events a CI/git signal would catch (spec §6 tripwire)',
|
|
172
207
|
};
|
|
173
208
|
}
|
|
174
209
|
/**
|
|
175
210
|
* M5 — projection staleness, computed as LOCAL-PULL drift at the CLI (DEC-1284). The staleness-age
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* reason — fail-soft, never a fake ok.
|
|
211
|
+
* floor is PINNED per DEC-1513 (`M5_LOCAL_AGE_FLOOR_DAYS`) — a determinable reading renders a real
|
|
212
|
+
* `ok`/`degraded` verdict. Unavailable local/server data → `unmeasured` with the reason, fail-soft.
|
|
179
213
|
*/
|
|
180
214
|
export function diagnoseM5(m5) {
|
|
181
|
-
if (m5.unavailableReason || m5.localProjectionMtime
|
|
215
|
+
if (m5.unavailableReason || !isDeterminate(m5.localProjectionMtime)) {
|
|
182
216
|
return {
|
|
183
217
|
metric: 'M5',
|
|
184
218
|
label: 'Projection staleness (local-pull drift)',
|
|
@@ -188,12 +222,9 @@ export function diagnoseM5(m5) {
|
|
|
188
222
|
nextAction: 'run from a worktree with a materialized .productbrain/ (pb handshake), then re-read',
|
|
189
223
|
};
|
|
190
224
|
}
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
|
|
194
|
-
// rather than `awaiting` with a `local-lag=n/a` that implies the drift is merely awaiting a
|
|
195
|
-
// threshold. local-age is still surfaced as the one signal we can honestly read.
|
|
196
|
-
if (m5.serverMaterializedAt === null || m5.localLagMs === null) {
|
|
225
|
+
// No server materialization → the local-pull DRIFT (server−local) is undeterminable —
|
|
226
|
+
// `unmeasured`, not `awaiting` with a misleading local-lag=n/a. local-age is still surfaced.
|
|
227
|
+
if (!isDeterminate(m5.serverMaterializedAt) || !isDeterminate(m5.localLagMs)) {
|
|
197
228
|
return {
|
|
198
229
|
metric: 'M5',
|
|
199
230
|
label: 'Projection staleness (local-pull drift)',
|
|
@@ -206,26 +237,40 @@ export function diagnoseM5(m5) {
|
|
|
206
237
|
const lag = m5.localLagMs;
|
|
207
238
|
const age = m5.localAgeMs;
|
|
208
239
|
const reading = `local-lag=${ms(lag)} (server−local) · local-age=${ms(age)}`;
|
|
240
|
+
if (!isDeterminate(age)) {
|
|
241
|
+
// Type-level fail-soft — undeterminable, never a fake ok/degraded.
|
|
242
|
+
return {
|
|
243
|
+
metric: 'M5',
|
|
244
|
+
label: 'Projection staleness (local-pull drift)',
|
|
245
|
+
status: 'awaiting',
|
|
246
|
+
reading,
|
|
247
|
+
cause: `local-age undeterminable — pinned staleness floor ${M5_LOCAL_AGE_FLOOR_DAYS.value}d cannot be compared`,
|
|
248
|
+
nextAction: 're-run pb handshake to re-pull the projection, then re-read',
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
const ageDays = age / DAY_MS;
|
|
252
|
+
const meets = ageDays <= M5_LOCAL_AGE_FLOOR_DAYS.value;
|
|
209
253
|
return {
|
|
210
254
|
metric: 'M5',
|
|
211
255
|
label: 'Projection staleness (local-pull drift)',
|
|
212
|
-
status: '
|
|
256
|
+
status: meets ? 'ok' : 'degraded',
|
|
213
257
|
reading,
|
|
214
|
-
cause:
|
|
215
|
-
|
|
258
|
+
cause: meets
|
|
259
|
+
? `local-age ${ms(age)} is at/under the pinned staleness floor ${M5_LOCAL_AGE_FLOOR_DAYS.value}d`
|
|
260
|
+
: `local-age ${ms(age)} exceeds the pinned staleness floor ${M5_LOCAL_AGE_FLOOR_DAYS.value}d — this is the one metric where PB can be staler than the never-drifting CLAUDE.md file`,
|
|
261
|
+
nextAction: meets ? '' : 're-run pb handshake to re-pull the projection',
|
|
216
262
|
};
|
|
217
263
|
}
|
|
218
264
|
/**
|
|
219
265
|
* M5 (server view) — the Cortex page has NO local filesystem, so it cannot compute the spec's
|
|
220
266
|
* local-pull drift (DEC-1284). It reads only the server-side projection-generation building block
|
|
221
|
-
* (`materialization.latestMaterializedAt` / age)
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
* staleness-age flip is UNPINNED → `awaiting` when there is a materialization; `unmeasured` when
|
|
267
|
+
* (`materialization.latestMaterializedAt` / age) — adding NO new truth (spec §2d). Deliberately a
|
|
268
|
+
* DIFFERENT, HONEST framing from `diagnoseM5`: SERVER-generation age, never local-pull staleness.
|
|
269
|
+
* The staleness-age floor is PINNED per DEC-1513 (`M5_SERVER_AGE_FLOOR_DAYS`); `unmeasured` when
|
|
225
270
|
* the workspace has never materialized.
|
|
226
271
|
*/
|
|
227
272
|
export function diagnoseM5FromServer(materialization) {
|
|
228
|
-
if (materialization.latestMaterializedAt
|
|
273
|
+
if (!isDeterminate(materialization.latestMaterializedAt)) {
|
|
229
274
|
return {
|
|
230
275
|
metric: 'M5',
|
|
231
276
|
label: 'Projection staleness (server generation age)',
|
|
@@ -236,35 +281,44 @@ export function diagnoseM5FromServer(materialization) {
|
|
|
236
281
|
};
|
|
237
282
|
}
|
|
238
283
|
const age = materialization.materializationAgeMs;
|
|
284
|
+
if (!isDeterminate(age)) {
|
|
285
|
+
// Type-level fail-soft — undeterminable, never a fake ok/degraded.
|
|
286
|
+
return {
|
|
287
|
+
metric: 'M5',
|
|
288
|
+
label: 'Projection staleness (server generation age)',
|
|
289
|
+
status: 'awaiting',
|
|
290
|
+
reading: 'server-generation age=n/a (browser view: local-pull drift is CLI-only)',
|
|
291
|
+
cause: `server-generation age undeterminable — pinned staleness floor ${M5_SERVER_AGE_FLOOR_DAYS.value}d cannot be compared`,
|
|
292
|
+
nextAction: 're-run pb handshake to re-generate the projection, then re-read',
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
const ageDays = age / DAY_MS;
|
|
296
|
+
const meets = ageDays <= M5_SERVER_AGE_FLOOR_DAYS.value;
|
|
239
297
|
return {
|
|
240
298
|
metric: 'M5',
|
|
241
299
|
label: 'Projection staleness (server generation age)',
|
|
242
|
-
status: '
|
|
300
|
+
status: meets ? 'ok' : 'degraded',
|
|
243
301
|
reading: `server-generation age=${ms(age)} (browser view: local-pull drift is CLI-only)`,
|
|
244
|
-
cause:
|
|
245
|
-
|
|
302
|
+
cause: meets
|
|
303
|
+
? `server-generation age ${ms(age)} is at/under the pinned staleness floor ${M5_SERVER_AGE_FLOOR_DAYS.value}d`
|
|
304
|
+
: `server-generation age ${ms(age)} exceeds the pinned staleness floor ${M5_SERVER_AGE_FLOOR_DAYS.value}d — this is the one metric where PB can be staler than the never-drifting CLAUDE.md file`,
|
|
305
|
+
nextAction: meets ? '' : 're-run pb handshake to re-generate the projection',
|
|
246
306
|
};
|
|
247
307
|
}
|
|
248
|
-
/**
|
|
249
|
-
*
|
|
250
|
-
* it is a permanent honesty marker so four green tiles are never read as "the moat is healthy".
|
|
251
|
-
*/
|
|
308
|
+
/** The STANDING coaching/moat-quality `unmeasured` line (TEN-2377) — a permanent honesty marker
|
|
309
|
+
* so four green tiles are never read as "the moat is healthy". */
|
|
252
310
|
export function diagnoseCoachingMoat() {
|
|
253
311
|
return {
|
|
254
312
|
metric: 'MOAT',
|
|
255
313
|
label: 'Coaching / moat quality',
|
|
256
314
|
status: 'unmeasured',
|
|
257
|
-
//
|
|
258
|
-
// blind-padding-rate test. Both cited in comments, kept out of the user-facing strings.
|
|
315
|
+
// TEN-2377 / ASM-46's blind-padding-rate test — cited in comments only.
|
|
259
316
|
reading: 'structurally unmeasured',
|
|
260
317
|
cause: 'the coach skips decision/standard/business-rule (the WHY-moat types) — a counter would flatter the board',
|
|
261
318
|
nextAction: 'do NOT read four green tiles as a healthy moat; the real instrument is the blind-padding-rate test',
|
|
262
319
|
};
|
|
263
320
|
}
|
|
264
|
-
/**
|
|
265
|
-
* diagnose — the whole mapping: data-layer payload + CLI-computed M5 local-drift → per-metric
|
|
266
|
-
* diagnoses + the standing M4-awaiting + coaching-unmeasured lines. Pure.
|
|
267
|
-
*/
|
|
321
|
+
/** diagnose — data-layer payload + CLI-computed M5 local-drift → per-metric diagnoses. Pure. */
|
|
268
322
|
export function diagnose(payload, m5) {
|
|
269
323
|
return {
|
|
270
324
|
m1: diagnoseM1(payload.m1),
|
|
@@ -275,11 +329,8 @@ export function diagnose(payload, m5) {
|
|
|
275
329
|
moat: diagnoseCoachingMoat(),
|
|
276
330
|
};
|
|
277
331
|
}
|
|
278
|
-
/**
|
|
279
|
-
*
|
|
280
|
-
* so M5 is the server-generation-age view (`diagnoseM5FromServer`) rather than the CLI local-pull
|
|
281
|
-
* drift. Everything else is identical to `diagnose`. Pure, browser-safe.
|
|
282
|
-
*/
|
|
332
|
+
/** diagnoseFromServer — Cortex has NO local fs, so M5 uses `diagnoseM5FromServer`'s
|
|
333
|
+
* server-generation-age view instead of local-pull drift. Otherwise identical to `diagnose`. */
|
|
283
334
|
export function diagnoseFromServer(payload) {
|
|
284
335
|
return {
|
|
285
336
|
m1: diagnoseM1(payload.m1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/scoreboard/diagnose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/scoreboard/diagnose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAoIrG,4FAA4F;AAC5F,4FAA4F;AAC5F,MAAM,QAAQ,GAAG,wDAAwD,CAAC;AAE1E,4FAA4F;AAC5F,6FAA6F;AAC7F,gGAAgG;AAChG,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACnC,SAAS,aAAa,CAAC,CAA4B;IACjD,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AACD,SAAS,GAAG,CAAC,CAA4B;IACvC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,C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AO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC;QAClB,IAAI,EAAE,oBAAoB,EAAE;KAC7B,CAAC;AACJ,CAAC;AAED;iGACiG;AACjG,MAAM,UAAU,kBAAkB,CAAC,OAA0B;IAC3D,OAAO;QACL,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;QACjD,IAAI,EAAE,oBAAoB,EAAE;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Asserts the pure metric→{status,reading,cause,nextAction} mapping, with explicit coverage of
|
|
5
5
|
* the awaiting / unmeasured / degraded / ok states and the honesty invariants:
|
|
6
|
-
* -
|
|
7
|
-
* number, and the raw reading is always present.
|
|
6
|
+
* - Most flip thresholds remain unpinned (DEC-1282) → judged readings are `awaiting`, never an
|
|
7
|
+
* invented number, and the raw reading is always present. M3's in-session-ratify floor and
|
|
8
|
+
* M5's two age floors are the pinned exception (DEC-1513, WP-525) — see below.
|
|
8
9
|
* - M4 (WP-487 Slice 2, FEAT-1374: the organic rework meter) reports raw distribution only —
|
|
9
10
|
* `unmeasured` with nothing served yet, `awaiting` otherwise, never a fake green, never a
|
|
10
11
|
* causality claim.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.test.d.ts","sourceRoot":"","sources":["../../src/scoreboard/diagnose.test.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"diagnose.test.d.ts","sourceRoot":"","sources":["../../src/scoreboard/diagnose.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Asserts the pure metric→{status,reading,cause,nextAction} mapping, with explicit coverage of
|
|
5
5
|
* the awaiting / unmeasured / degraded / ok states and the honesty invariants:
|
|
6
|
-
* -
|
|
7
|
-
* number, and the raw reading is always present.
|
|
6
|
+
* - Most flip thresholds remain unpinned (DEC-1282) → judged readings are `awaiting`, never an
|
|
7
|
+
* invented number, and the raw reading is always present. M3's in-session-ratify floor and
|
|
8
|
+
* M5's two age floors are the pinned exception (DEC-1513, WP-525) — see below.
|
|
8
9
|
* - M4 (WP-487 Slice 2, FEAT-1374: the organic rework meter) reports raw distribution only —
|
|
9
10
|
* `unmeasured` with nothing served yet, `awaiting` otherwise, never a fake green, never a
|
|
10
11
|
* causality claim.
|
|
@@ -76,38 +77,56 @@ describe('diagnoseM2', () => {
|
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
79
|
describe('diagnoseM3', () => {
|
|
79
|
-
it('is
|
|
80
|
+
it('is degraded when the in-session ratify rate is below the pinned floor (DEC-1513)', () => {
|
|
80
81
|
const m3 = {
|
|
81
82
|
capturedCount: 8,
|
|
82
83
|
everRatifiedCount: 3,
|
|
83
84
|
inSessionRatifiedCount: 1,
|
|
84
85
|
everRatifiedRate: 0.375,
|
|
85
|
-
inSessionRatifiedRate: 0.
|
|
86
|
+
inSessionRatifiedRate: 0.05, // below the 10% pinned floor
|
|
86
87
|
sessionWindow: 20,
|
|
87
88
|
sessionsConsidered: 12,
|
|
88
89
|
};
|
|
89
90
|
const d = diagnoseM3(m3);
|
|
90
|
-
expect(d.status).toBe('
|
|
91
|
+
expect(d.status).toBe('degraded');
|
|
91
92
|
expect(d.reading).toContain('captured=8');
|
|
92
|
-
expect(d.cause).toMatch(/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
expect(d.nextAction).toMatch(/10%/);
|
|
99
|
-
// PR #477 review round 1 (codex P2): this is a SHARED function with no workspaceId — the
|
|
100
|
-
// calibration number must never read as if it came from the calling workspace's own
|
|
101
|
-
// history (a different tenant would see the same "every measured run" claim wrongly).
|
|
102
|
-
expect(d.cause).toMatch(/Product-OS calibration/);
|
|
103
|
-
expect(d.cause).toMatch(/not this workspace's own history/);
|
|
104
|
-
// PR #477 review round 2 (codex P2): round 1 only scoped `cause` — `nextAction` must be
|
|
105
|
-
// scoped too, since the CLI formatter prints it verbatim to every tenant just the same.
|
|
106
|
-
expect(d.nextAction).toMatch(/not derived from this workspace/);
|
|
107
|
-
// chain-id-leak guard: the user-facing strings carry no raw Chain IDs.
|
|
93
|
+
expect(d.cause).toMatch(/pinned floor/i);
|
|
94
|
+
expect(d.cause).toMatch(/10%/);
|
|
95
|
+
expect(d.cause).not.toMatch(/awaiting founder accept|PROPOSED pin/);
|
|
96
|
+
expect(d.nextAction).toMatch(/accept\/promote/i);
|
|
97
|
+
// chain-id-leak guard: the user-facing strings carry no raw Chain IDs (DEC-1513 is cited
|
|
98
|
+
// in code comments only, per this file's header — never interpolated into the string).
|
|
108
99
|
expect(d.cause).not.toMatch(/\b[A-Z]{2,5}-\d+\b/);
|
|
109
100
|
expect(d.nextAction).not.toMatch(/\b[A-Z]{2,5}-\d+\b/);
|
|
110
101
|
});
|
|
102
|
+
it('is ok when the in-session ratify rate meets the pinned floor (DEC-1513)', () => {
|
|
103
|
+
const m3 = {
|
|
104
|
+
capturedCount: 8,
|
|
105
|
+
everRatifiedCount: 3,
|
|
106
|
+
inSessionRatifiedCount: 1,
|
|
107
|
+
everRatifiedRate: 0.375,
|
|
108
|
+
inSessionRatifiedRate: 0.125, // above the 10% pinned floor
|
|
109
|
+
sessionWindow: 20,
|
|
110
|
+
sessionsConsidered: 12,
|
|
111
|
+
};
|
|
112
|
+
const d = diagnoseM3(m3);
|
|
113
|
+
expect(d.status).toBe('ok');
|
|
114
|
+
expect(d.nextAction).toBe('');
|
|
115
|
+
expect(d.cause).toMatch(/pinned floor/i);
|
|
116
|
+
});
|
|
117
|
+
it('fails soft to awaiting when the in-session rate is undeterminable (null) despite captures', () => {
|
|
118
|
+
const m3 = {
|
|
119
|
+
capturedCount: 8,
|
|
120
|
+
everRatifiedCount: 3,
|
|
121
|
+
inSessionRatifiedCount: 1,
|
|
122
|
+
everRatifiedRate: 0.375,
|
|
123
|
+
inSessionRatifiedRate: null,
|
|
124
|
+
sessionWindow: 20,
|
|
125
|
+
sessionsConsidered: 12,
|
|
126
|
+
};
|
|
127
|
+
const d = diagnoseM3(m3);
|
|
128
|
+
expect(d.status).toBe('awaiting');
|
|
129
|
+
});
|
|
111
130
|
it('is unmeasured with zero captures', () => {
|
|
112
131
|
const m3 = {
|
|
113
132
|
capturedCount: 0,
|
|
@@ -197,28 +216,37 @@ describe('diagnoseM5', () => {
|
|
|
197
216
|
expect(d.status).toBe('unmeasured');
|
|
198
217
|
expect(d.reading).toContain('no .productbrain/');
|
|
199
218
|
});
|
|
200
|
-
it('is
|
|
219
|
+
it('is degraded when local-age exceeds the pinned floor (DEC-1513, real: ~14.1d > 10d)', () => {
|
|
220
|
+
// 10d, not 7d: this is the LOCAL-pull instrument's own single-observation calibration
|
|
221
|
+
// (PR #477 review fix, codex P2 — a prior draft mixed local-age and server-generation-age
|
|
222
|
+
// readings as if they were one series; each instrument now gets its own honest number).
|
|
223
|
+
const DAY = 1000 * 60 * 60 * 24;
|
|
201
224
|
const m5 = {
|
|
202
225
|
localProjectionMtime: 1_000,
|
|
203
226
|
serverMaterializedAt: 2_000,
|
|
204
227
|
localLagMs: 1_000,
|
|
205
|
-
localAgeMs:
|
|
228
|
+
localAgeMs: 14.1 * DAY,
|
|
206
229
|
};
|
|
207
230
|
const d = diagnoseM5(m5);
|
|
208
|
-
expect(d.status).toBe('
|
|
209
|
-
expect(d.cause).toMatch(/
|
|
231
|
+
expect(d.status).toBe('degraded');
|
|
232
|
+
expect(d.cause).toMatch(/pinned staleness floor 10d/);
|
|
210
233
|
// The CLAUDE.md-can't-drift framing is preserved.
|
|
211
234
|
expect(d.cause).toMatch(/CLAUDE\.md/);
|
|
212
|
-
|
|
213
|
-
// 10d, not 7d: this is the LOCAL-pull instrument's own single-observation calibration
|
|
214
|
-
// (PR #477 review fix, codex P2 — a prior draft mixed local-age and server-generation-age
|
|
215
|
-
// readings as if they were one series; each instrument now gets its own honest number).
|
|
216
|
-
expect(d.cause).toMatch(/PROPOSED pin 10d/);
|
|
217
|
-
expect(d.cause).toMatch(/awaiting founder accept/);
|
|
218
|
-
expect(d.cause).toMatch(/Product-OS calibration/);
|
|
219
|
-
expect(d.cause).toMatch(/not a trend/);
|
|
235
|
+
expect(d.cause).not.toMatch(/awaiting founder accept|PROPOSED pin|unpinned/i);
|
|
220
236
|
expect(d.cause).not.toMatch(/\b[A-Z]{2,5}-\d+\b/);
|
|
221
237
|
});
|
|
238
|
+
it('is ok when local-age is at/under the pinned floor (DEC-1513)', () => {
|
|
239
|
+
const DAY = 1000 * 60 * 60 * 24;
|
|
240
|
+
const m5 = {
|
|
241
|
+
localProjectionMtime: 1_000,
|
|
242
|
+
serverMaterializedAt: 2_000,
|
|
243
|
+
localLagMs: 1_000,
|
|
244
|
+
localAgeMs: 5 * DAY,
|
|
245
|
+
};
|
|
246
|
+
const d = diagnoseM5(m5);
|
|
247
|
+
expect(d.status).toBe('ok');
|
|
248
|
+
expect(d.nextAction).toBe('');
|
|
249
|
+
});
|
|
222
250
|
it('is unmeasured (not awaiting) when the local projection exists but there is no server reference', () => {
|
|
223
251
|
// Local projection present, but no server materialization to diff against → the local-pull
|
|
224
252
|
// DRIFT (server−local) is undeterminable, so the honest status is unmeasured, not a misleading
|
|
@@ -236,23 +264,33 @@ describe('diagnoseM5', () => {
|
|
|
236
264
|
});
|
|
237
265
|
});
|
|
238
266
|
describe('diagnoseM5FromServer', () => {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
267
|
+
// PR #477 review fix (codex P2): diagnoseM5 (local-pull drift) and diagnoseM5FromServer
|
|
268
|
+
// (server-generation age) are two DIFFERENT instruments, each with its own pinned floor
|
|
269
|
+
// (DEC-1513) — 7d here, 10d for diagnoseM5 above. Never a shared "trend" number.
|
|
270
|
+
it('is ok when server-generation age is under its OWN pinned floor (DEC-1513, real: ~5.1d < 7d)', () => {
|
|
271
|
+
const DAY = 1000 * 60 * 60 * 24;
|
|
243
272
|
const materialization = {
|
|
244
273
|
latestMaterializedAt: 1_000,
|
|
245
|
-
materializationAgeMs:
|
|
274
|
+
materializationAgeMs: 5.1 * DAY,
|
|
246
275
|
now: 3_000,
|
|
247
276
|
};
|
|
248
277
|
const d = diagnoseM5FromServer(materialization);
|
|
249
|
-
expect(d.status).toBe('
|
|
250
|
-
expect(d.cause).toMatch(/
|
|
251
|
-
expect(d.
|
|
252
|
-
expect(d.cause).toMatch(/Product-OS calibration/);
|
|
253
|
-
expect(d.cause).toMatch(/server-generation-age reading/);
|
|
278
|
+
expect(d.status).toBe('ok');
|
|
279
|
+
expect(d.cause).toMatch(/pinned staleness floor 7d/);
|
|
280
|
+
expect(d.nextAction).toBe('');
|
|
254
281
|
expect(d.cause).not.toMatch(/\b[A-Z]{2,5}-\d+\b/);
|
|
255
282
|
});
|
|
283
|
+
it('is degraded when server-generation age exceeds its OWN pinned floor (DEC-1513)', () => {
|
|
284
|
+
const DAY = 1000 * 60 * 60 * 24;
|
|
285
|
+
const materialization = {
|
|
286
|
+
latestMaterializedAt: 1_000,
|
|
287
|
+
materializationAgeMs: 8 * DAY,
|
|
288
|
+
now: 3_000,
|
|
289
|
+
};
|
|
290
|
+
const d = diagnoseM5FromServer(materialization);
|
|
291
|
+
expect(d.status).toBe('degraded');
|
|
292
|
+
expect(d.cause).not.toMatch(/awaiting founder accept|PROPOSED pin|unpinned/i);
|
|
293
|
+
});
|
|
256
294
|
});
|
|
257
295
|
describe('diagnoseCoachingMoat', () => {
|
|
258
296
|
it('is a standing unmeasured line — four green tiles != healthy moat (TEN-2377)', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.test.js","sourceRoot":"","sources":["../../src/scoreboard/diagnose.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,GAQrB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,GAAc;IAC5B,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrD,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,GAAG;IACjB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAClC,cAAc,EAAE,EAAE;CACnB,CAAC;AAEF,MAAM,OAAO,GAAc;IACzB,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;IACpD,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAClC,cAAc,EAAE,CAAC;CAClB,CAAC;AAEF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;QAC7E,MAAM,CAAC,GAAG,UAAU,CAAC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* Canonical SSOT for the flywheel scoreboard diagnosis (consumed by BOTH the published
|
|
4
|
+
* `pb` CLI and the Cortex page). The CLI cannot import the workspace package at publish time
|
|
5
|
+
* (tsc, no bundler), so it carries this committed copy. Edit the source, then run:
|
|
6
|
+
* node scripts/sync-scoreboard-core.mjs
|
|
7
|
+
* A content-hash drift gate (scripts/check-mcp-lib-drift.mjs) fails CI if this drifts.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Pinned scoreboard floors — DEC-1513 (founder accepted 2026-07-26, WP-525 kernel truth
|
|
11
|
+
* sweep).
|
|
12
|
+
*
|
|
13
|
+
* HOW TO TUNE: edit a `value` below and open ONE PR. This file is the single place these
|
|
14
|
+
* three numbers live — `packages/scoreboard-core/src/index.ts` imports and reads them,
|
|
15
|
+
* never redefines or re-derives them. After editing, run:
|
|
16
|
+
* node scripts/sync-scoreboard-core.mjs
|
|
17
|
+
* to re-sync the published CLI copies (packages/cli/src/scoreboard/{diagnose,floors}.ts).
|
|
18
|
+
* `npm run check:mcp-lib-drift` (part of CI) fails the PR if a copy falls out of sync.
|
|
19
|
+
*
|
|
20
|
+
* NAMED SUCCESSOR (not built): a single shared, global calibration accepted from
|
|
21
|
+
* Product-OS's OWN observed distribution (docs/evals/PRESS-RELEASE-EVAL.md) — it is NOT
|
|
22
|
+
* proven to generalize to every tenant workspace. DEC-1513 accepts these three values as
|
|
23
|
+
* the workspace-wide floor with that explicit caveat; a future PER-WORKSPACE override is
|
|
24
|
+
* the named next step, not shipped here.
|
|
25
|
+
*
|
|
26
|
+
* DEC-1282 still governs the SEMANTICS: a diagnosis is advisory-never-blocking. Pinning
|
|
27
|
+
* these floors only lets diagnoseM3/diagnoseM5/diagnoseM5FromServer compute a real
|
|
28
|
+
* ok/degraded verdict instead of `awaiting` — it does not gate, block, or fail anything.
|
|
29
|
+
*/
|
|
30
|
+
/** A single pinned floor: the number plus why/when/who accepted it. */
|
|
31
|
+
export interface PinnedFloor {
|
|
32
|
+
/** The pinned numeric floor. */
|
|
33
|
+
value: number;
|
|
34
|
+
/** Why this number, in one line — cites the calibration evidence, never invents one. */
|
|
35
|
+
rationale: string;
|
|
36
|
+
/** When the founder accepted it (ISO date). */
|
|
37
|
+
acceptedDate: string;
|
|
38
|
+
/** The Chain decision that accepted it. */
|
|
39
|
+
decision: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const M3_IN_SESSION_FLOOR: PinnedFloor;
|
|
42
|
+
/** M5 has TWO INCOMPARABLE age instruments — see diagnoseM5 vs diagnoseM5FromServer in
|
|
43
|
+
* index.ts. Each carries its OWN single-observation calibration; never treat one as a
|
|
44
|
+
* proxy for the other or as two points on a shared trend. */
|
|
45
|
+
export declare const M5_LOCAL_AGE_FLOOR_DAYS: PinnedFloor;
|
|
46
|
+
export declare const M5_SERVER_AGE_FLOOR_DAYS: PinnedFloor;
|
|
47
|
+
//# sourceMappingURL=floors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floors.d.ts","sourceRoot":"","sources":["../../src/scoreboard/floors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uEAAuE;AACvE,MAAM,WAAW,WAAW;IAC3B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,EAAE,WAOjC,CAAC;AAEF;;8DAE8D;AAC9D,eAAO,MAAM,uBAAuB,EAAE,WAOrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAOtC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SYNCED from packages/scoreboard-core/src/floors.ts — DO NOT EDIT HERE.
|
|
3
|
+
* Canonical SSOT for the flywheel scoreboard diagnosis (consumed by BOTH the published
|
|
4
|
+
* `pb` CLI and the Cortex page). The CLI cannot import the workspace package at publish time
|
|
5
|
+
* (tsc, no bundler), so it carries this committed copy. Edit the source, then run:
|
|
6
|
+
* node scripts/sync-scoreboard-core.mjs
|
|
7
|
+
* A content-hash drift gate (scripts/check-mcp-lib-drift.mjs) fails CI if this drifts.
|
|
8
|
+
*/
|
|
9
|
+
export const M3_IN_SESSION_FLOOR = {
|
|
10
|
+
value: 0.1,
|
|
11
|
+
rationale: "Product-OS calibration baseline (docs/evals/PRESS-RELEASE-EVAL.md): in-session ratify rate observed 0% " +
|
|
12
|
+
'in every Product-OS run so far — a conservative early bar, not derived from any other workspace\'s history.',
|
|
13
|
+
acceptedDate: '2026-07-26',
|
|
14
|
+
decision: 'DEC-1513',
|
|
15
|
+
};
|
|
16
|
+
/** M5 has TWO INCOMPARABLE age instruments — see diagnoseM5 vs diagnoseM5FromServer in
|
|
17
|
+
* index.ts. Each carries its OWN single-observation calibration; never treat one as a
|
|
18
|
+
* proxy for the other or as two points on a shared trend. */
|
|
19
|
+
export const M5_LOCAL_AGE_FLOOR_DAYS = {
|
|
20
|
+
value: 10,
|
|
21
|
+
rationale: 'Product-OS calibration: one on-record local-pull-drift age reading (14.1d, Run 1, docs/evals/' +
|
|
22
|
+
"PRESS-RELEASE-EVAL.md) — a single observation, not a trend.",
|
|
23
|
+
acceptedDate: '2026-07-26',
|
|
24
|
+
decision: 'DEC-1513',
|
|
25
|
+
};
|
|
26
|
+
export const M5_SERVER_AGE_FLOOR_DAYS = {
|
|
27
|
+
value: 7,
|
|
28
|
+
rationale: 'Product-OS calibration: one on-record server-generation-age reading (~5.1d, Run 3\'s materialization age, ' +
|
|
29
|
+
'docs/evals/PRESS-RELEASE-EVAL.md) — a single observation, not a trend.',
|
|
30
|
+
acceptedDate: '2026-07-26',
|
|
31
|
+
decision: 'DEC-1513',
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=floors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floors.js","sourceRoot":"","sources":["../../src/scoreboard/floors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoCH,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC/C,KAAK,EAAE,GAAG;IACV,SAAS,EACR,yGAAyG;QACzG,6GAA6G;IAC9G,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,UAAU;CACpB,CAAC;AAEF;;8DAE8D;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAgB;IACnD,KAAK,EAAE,EAAE;IACT,SAAS,EACR,+FAA+F;QAC/F,6DAA6D;IAC9D,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,UAAU;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAgB;IACpD,KAAK,EAAE,CAAC;IACR,SAAS,EACR,4GAA4G;QAC5G,wEAAwE;IACzE,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,UAAU;CACpB,CAAC"}
|