Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit 001dd4c

Browse files
Andrew Eyeclaude
andcommitted
FEA-1437: weak-count reduction — reclassify 12 detections to out_of_scope
Per PHASE3-WEAK-TRIAGE.md category (c): the 12 detections that were never in scope (server-runtime health gauges, local hooks config state, timestamp formatters) now classify as out_of_scope via three new content-pattern rules in coverage-classifier.mjs (HEALTH_GAUGE / CONFIG_STATE / TIMESTAMP). cross_ref_weak 118 -> 106; out_of_scope 29 -> 41; needs_review still 0. The remaining 106 weak detections are category (b) — chart/sparkline aggregates whose underlying numbers ARE oracle-backed at the API layer but don't render as sliceable per-value DOM. Those need the covered_by annotation convention (next). Testing: coverage-validator 203/203 pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 93f78e8 commit 001dd4c

3 files changed

Lines changed: 66 additions & 38 deletions

File tree

apps/desktop/test-e2e/agent-monitor/inventory/PHASE3-WEAK-TRIAGE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
55
**Parent:** FEA-1437 / PLN-760 · **Substrate:** FEA-1415 / PLN-738 (PR #246, `2a3a371`)
66

7+
> **Status update (FEA-1437 Phase 6):** the 12 category-(c) detections below were reclassified to `out_of_scope` in `coverage-classifier.mjs` (new HEALTH_GAUGE / CONFIG_STATE / TIMESTAMP rules). `cross_ref_weak` is now **106** (was 118); `out_of_scope` is **41** (was 29). The remaining 106 are category (b) — chart aggregates needing the `covered_by` annotation convention.
8+
79
## Categories
810

911
- **(a) auto-resolve via Phase-3 selector binding** — detection maps to a manifest tile that renders as DOM text; once the tile's `data-testid` lands, the classifier graduates it `cross_ref_weak → cross_ref`. **Count: 0**

apps/desktop/test-e2e/agent-monitor/inventory/coverage-classifier.mjs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,26 @@ const SERVER_RUNTIME_PATTERNS = [
4747
/formatBytes|formatUptime/,
4848
];
4949

50+
// "Out of scope: server-runtime health gauges" — composite/health figures
51+
// computed from process state (CPU load, memory %, heap %, the weighted
52+
// health-score index) and the cache-hit gauge in that same index. Not
53+
// log-parsed agent data. (FEA-1437 weak-triage category c; these are bare
54+
// local computed vars in Dashboard.tsx, distinct from token-derived metrics.)
55+
const HEALTH_GAUGE_PATTERNS = [
56+
/^(load|memUsedPct|heapUsedPct|healthScore|cacheHitRate)$/,
57+
];
58+
59+
// "Out of scope: local config/install state" — e.g. info.hooks.installed
60+
// reflects whether Claude Code hooks are written to ~/.claude/settings.json,
61+
// a config toggle, not a log-derived number.
62+
const CONFIG_STATE_PATTERNS = [/^info\.hooks\./];
63+
64+
// "Out of scope: timestamp formatting" — fmt(...created_at/started_at/
65+
// last_seen_at/updated_at) renders a date, not a numeric audit target.
66+
const TIMESTAMP_PATTERNS = [
67+
/^fmt\([a-z_]+\.(created_at|started_at|last_seen_at|updated_at)\)$/i,
68+
];
69+
5070
// "Out of scope: filesystem-backed config" — CcConfig reads ~/.claude/*.
5171
const CONFIG_PATTERNS = [/^CcConfig$/];
5272

@@ -131,6 +151,24 @@ function classify(row) {
131151
reason: "pagination/UI math — derived render-side from already-audited totals",
132152
};
133153
}
154+
if (HEALTH_GAUGE_PATTERNS.some((re) => re.test(row.value_expr))) {
155+
return {
156+
status: "out_of_scope",
157+
reason: "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data",
158+
};
159+
}
160+
if (CONFIG_STATE_PATTERNS.some((re) => re.test(row.value_expr))) {
161+
return {
162+
status: "out_of_scope",
163+
reason: "local config/install state (Claude hooks install flag) — a config toggle, not a log-derived number",
164+
};
165+
}
166+
if (TIMESTAMP_PATTERNS.some((re) => re.test(row.value_expr))) {
167+
return {
168+
status: "out_of_scope",
169+
reason: "timestamp formatting (date display via fmt(...At)) — not a numeric audit target",
170+
};
171+
}
134172

135173
// 2. Out of scope by screen
136174
if (CONFIG_PATTERNS.some((re) => re.test(row.screen))) {

apps/desktop/test-e2e/agent-monitor/inventory/coverage.json

Lines changed: 26 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"by_status": {
66
"tested": 0,
77
"cross_ref": 49,
8-
"cross_ref_weak": 118,
8+
"cross_ref_weak": 106,
99
"bug_filed": 0,
10-
"out_of_scope": 29,
10+
"out_of_scope": 41,
1111
"needs_review": 0
1212
},
1313
"rows": [
@@ -160,9 +160,8 @@
160160
"line": 772,
161161
"detected_kind": "toFixed",
162162
"value_expr": "load",
163-
"status": "cross_ref_weak",
164-
"covered_by": "all-screens.api-audit.test.mjs",
165-
"reason": "Dashboard has manifest coverage but this detection (`load`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
163+
"status": "out_of_scope",
164+
"reason": "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data"
166165
},
167166
{
168167
"detection_id": "auto.dashboard.14",
@@ -181,9 +180,8 @@
181180
"line": 798,
182181
"detected_kind": "toFixed",
183182
"value_expr": "memUsedPct",
184-
"status": "cross_ref_weak",
185-
"covered_by": "all-screens.api-audit.test.mjs",
186-
"reason": "Dashboard has manifest coverage but this detection (`memUsedPct`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
183+
"status": "out_of_scope",
184+
"reason": "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data"
187185
},
188186
{
189187
"detection_id": "auto.dashboard.16",
@@ -192,9 +190,8 @@
192190
"line": 815,
193191
"detected_kind": "toFixed",
194192
"value_expr": "heapUsedPct",
195-
"status": "cross_ref_weak",
196-
"covered_by": "all-screens.api-audit.test.mjs",
197-
"reason": "Dashboard has manifest coverage but this detection (`heapUsedPct`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
193+
"status": "out_of_scope",
194+
"reason": "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data"
198195
},
199196
{
200197
"detection_id": "auto.dashboard.17",
@@ -268,9 +265,8 @@
268265
"line": 1003,
269266
"detected_kind": "toFixed",
270267
"value_expr": "healthScore",
271-
"status": "cross_ref_weak",
272-
"covered_by": "all-screens.api-audit.test.mjs",
273-
"reason": "Dashboard has manifest coverage but this detection (`healthScore`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
268+
"status": "out_of_scope",
269+
"reason": "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data"
274270
},
275271
{
276272
"detection_id": "auto.dashboard.24",
@@ -279,9 +275,8 @@
279275
"line": 1028,
280276
"detected_kind": "toFixed",
281277
"value_expr": "cacheHitRate",
282-
"status": "cross_ref_weak",
283-
"covered_by": "all-screens.api-audit.test.mjs",
284-
"reason": "Dashboard has manifest coverage but this detection (`cacheHitRate`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
278+
"status": "out_of_scope",
279+
"reason": "server-runtime health gauge (CPU load / memory % / heap % / composite health-score index / cache-hit gauge) — computed from process state, not log-parsed data"
285280
},
286281
{
287282
"detection_id": "auto.dashboard.25",
@@ -417,9 +412,8 @@
417412
"line": 1317,
418413
"detected_kind": "data_property",
419414
"value_expr": "info.hooks.installed",
420-
"status": "cross_ref_weak",
421-
"covered_by": "all-screens.api-audit.test.mjs",
422-
"reason": "Dashboard has manifest coverage but this detection (`info.hooks.installed`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
415+
"status": "out_of_scope",
416+
"reason": "local config/install state (Claude hooks install flag) — a config toggle, not a log-derived number"
423417
},
424418
{
425419
"detection_id": "auto.dashboard.37",
@@ -428,9 +422,8 @@
428422
"line": 1319,
429423
"detected_kind": "data_property",
430424
"value_expr": "info.hooks.installed",
431-
"status": "cross_ref_weak",
432-
"covered_by": "all-screens.api-audit.test.mjs",
433-
"reason": "Dashboard has manifest coverage but this detection (`info.hooks.installed`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
425+
"status": "out_of_scope",
426+
"reason": "local config/install state (Claude hooks install flag) — a config toggle, not a log-derived number"
434427
},
435428
{
436429
"detection_id": "auto.dashboard.38",
@@ -1064,9 +1057,8 @@
10641057
"line": 180,
10651058
"detected_kind": "formatter_call",
10661059
"value_expr": "fmt(a.last_seen_at)",
1067-
"status": "cross_ref_weak",
1068-
"covered_by": "all-screens.api-audit.test.mjs",
1069-
"reason": "PacksInstalled has manifest coverage but this detection (`fmt(a.last_seen_at)`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
1060+
"status": "out_of_scope",
1061+
"reason": "timestamp formatting (date display via fmt(...At)) — not a numeric audit target"
10701062
},
10711063
{
10721064
"detection_id": "auto.skills.94",
@@ -1075,9 +1067,8 @@
10751067
"line": 188,
10761068
"detected_kind": "formatter_call",
10771069
"value_expr": "fmt(inv.created_at)",
1078-
"status": "cross_ref_weak",
1079-
"covered_by": "all-screens.api-audit.test.mjs",
1080-
"reason": "Skills has manifest coverage but this detection (`fmt(inv.created_at)`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
1070+
"status": "out_of_scope",
1071+
"reason": "timestamp formatting (date display via fmt(...At)) — not a numeric audit target"
10811072
},
10821073
{
10831074
"detection_id": "auto.sparkline.95",
@@ -1127,9 +1118,8 @@
11271118
"line": 140,
11281119
"detected_kind": "formatter_call",
11291120
"value_expr": "fmt(d.started_at)",
1130-
"status": "cross_ref_weak",
1131-
"covered_by": "all-screens.api-audit.test.mjs",
1132-
"reason": "SubAgents has manifest coverage but this detection (`fmt(d.started_at)`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
1121+
"status": "out_of_scope",
1122+
"reason": "timestamp formatting (date display via fmt(...At)) — not a numeric audit target"
11331123
},
11341124
{
11351125
"detection_id": "auto.tools.100",
@@ -1160,9 +1150,8 @@
11601150
"line": 155,
11611151
"detected_kind": "formatter_call",
11621152
"value_expr": "fmt(ev.created_at)",
1163-
"status": "cross_ref_weak",
1164-
"covered_by": "all-screens.api-audit.test.mjs",
1165-
"reason": "Tools has manifest coverage but this detection (`fmt(ev.created_at)`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
1153+
"status": "out_of_scope",
1154+
"reason": "timestamp formatting (date display via fmt(...At)) — not a numeric audit target"
11661155
},
11671156
{
11681157
"detection_id": "auto.plans.103",
@@ -1171,9 +1160,8 @@
11711160
"line": 209,
11721161
"detected_kind": "formatter_call",
11731162
"value_expr": "fmt(v.created_at)",
1174-
"status": "cross_ref_weak",
1175-
"covered_by": "all-screens.api-audit.test.mjs",
1176-
"reason": "Plans has manifest coverage but this detection (`fmt(v.created_at)`) did not bind to a specific tile via endpoint_field/oracle/id substring match — needs explicit annotation in Phase 3"
1163+
"status": "out_of_scope",
1164+
"reason": "timestamp formatting (date display via fmt(...At)) — not a numeric audit target"
11771165
},
11781166
{
11791167
"detection_id": "auto.activityfeed.104",

0 commit comments

Comments
 (0)