instar 1.3.1052 → 1.3.1054
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/data/standards-registry.meta.json +1 -1
- package/dist/monitoring/BurnVerifier.d.ts +2 -2
- package/dist/monitoring/BurnVerifier.d.ts.map +1 -1
- package/dist/monitoring/BurnVerifier.js +18 -12
- package/dist/monitoring/BurnVerifier.js.map +1 -1
- package/dist/monitoring/hostMemoryPressure.d.ts.map +1 -1
- package/dist/monitoring/hostMemoryPressure.js +4 -1
- package/dist/monitoring/hostMemoryPressure.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1053.md +28 -0
- package/upgrades/1.3.1054.md +26 -0
- package/upgrades/eli16/burn-verifier-missing-baseline.md +26 -0
- package/upgrades/eli16/host-memory-unparseable-fallback.md +27 -0
- package/upgrades/side-effects/burn-verifier-missing-baseline.md +114 -0
- package/upgrades/side-effects/host-memory-unparseable-fallback.md +115 -0
|
@@ -24,8 +24,8 @@ export interface VerificationResult {
|
|
|
24
24
|
attributionKey: string;
|
|
25
25
|
preThrottleRate: number;
|
|
26
26
|
postThrottleRate: number;
|
|
27
|
-
ratio: number;
|
|
28
|
-
successfullyThrottled: boolean;
|
|
27
|
+
ratio: number | null;
|
|
28
|
+
successfullyThrottled: boolean | null;
|
|
29
29
|
verifiedAt: string;
|
|
30
30
|
}
|
|
31
31
|
export interface BurnVerifierDeps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BurnVerifier.d.ts","sourceRoot":"","sources":["../../src/monitoring/BurnVerifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAA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AAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwE;IACrG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4C;gBAEzD,IAAI,EAAE,gBAAgB;IAgBlC;;;;OAIG;IACH,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAc5E;;;OAGG;IACH,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,kBAAkB;IAuBpF,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,YAAY;CAUrB;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAUnE"}
|
|
@@ -73,8 +73,10 @@ export class BurnVerifier {
|
|
|
73
73
|
const row = rows.find((r) => r.attributionKey === attributionKey);
|
|
74
74
|
const postThrottleTokens = row ? (row.freshTokens ?? row.totalTokens) : 0;
|
|
75
75
|
const postThrottleRate = postThrottleTokens * (60 * 60 * 1000 / this.sampleWindowMs);
|
|
76
|
-
const ratio = preThrottleRate > 0
|
|
77
|
-
|
|
76
|
+
const ratio = Number.isFinite(preThrottleRate) && preThrottleRate > 0 && Number.isFinite(postThrottleRate)
|
|
77
|
+
? postThrottleRate / preThrottleRate
|
|
78
|
+
: null;
|
|
79
|
+
const successfullyThrottled = ratio === null ? null : ratio < this.successRatio;
|
|
78
80
|
const result = {
|
|
79
81
|
attributionKey,
|
|
80
82
|
preThrottleRate,
|
|
@@ -88,16 +90,20 @@ export class BurnVerifier {
|
|
|
88
90
|
}
|
|
89
91
|
fireFollowUp(r) {
|
|
90
92
|
const friendlyName = humanize(r.attributionKey);
|
|
91
|
-
const text = r.successfullyThrottled
|
|
92
|
-
? `
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`
|
|
93
|
+
const text = r.ratio === null || r.successfullyThrottled === null
|
|
94
|
+
? `Slowdown verification was inconclusive. I tried to verify ${friendlyName}, but the ` +
|
|
95
|
+
`before-slowdown rate was unavailable or zero. The current sample is ${formatRate(r.postThrottleRate)}, ` +
|
|
96
|
+
`but there is no measured baseline for a before-and-after comparison.`
|
|
97
|
+
: r.successfullyThrottled
|
|
98
|
+
? `Caught and contained. ${friendlyName}: before the slowdown it was running at about ` +
|
|
99
|
+
`${formatRate(r.preThrottleRate)}; now it is running at about ${formatRate(r.postThrottleRate)} ` +
|
|
100
|
+
`— a ${formatReduction(r.ratio)} drop. The throttle will lift on its own at the configured time, ` +
|
|
101
|
+
`or you can release it sooner from the original alert.`
|
|
102
|
+
: `Slowdown did not take effect. I tried to slow ${friendlyName} down, but the rate did ` +
|
|
103
|
+
`not drop (was ${formatRate(r.preThrottleRate)}, still at ${formatRate(r.postThrottleRate)}). ` +
|
|
104
|
+
`This usually means one of two things: the attribution is pointing at the wrong code path ` +
|
|
105
|
+
`and the real offender is elsewhere, or the offending path does not honour the slowdown. ` +
|
|
106
|
+
`You may need to look at this one manually.`;
|
|
101
107
|
this.fireTelegram(text);
|
|
102
108
|
}
|
|
103
109
|
fireTelegram(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BurnVerifier.js","sourceRoot":"","sources":["../../src/monitoring/BurnVerifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,MAAM,uBAAuB,GAAG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;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;IAC1C,OAAO,GAAG,GAAG,GAAG,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostMemoryPressure.d.ts","sourceRoot":"","sources":["../../src/monitoring/hostMemoryPressure.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;CACzB;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"hostMemoryPressure.d.ts","sourceRoot":"","sources":["../../src/monitoring/hostMemoryPressure.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;CACzB;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAwB/D;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAWrE;AAED,iGAAiG;AACjG,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,WAAgB,GAAG,mBAAmB,CA2BpF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAE,WAAgB,GAAG,MAAM,CAG7D"}
|
|
@@ -33,11 +33,14 @@ export function parseVmStat(output) {
|
|
|
33
33
|
const compressorPages = parsePages('Pages occupied by compressor');
|
|
34
34
|
const purgeablePages = parsePages('Pages purgeable');
|
|
35
35
|
const totalPages = freePages + activePages + inactivePages + wiredPages + compressorPages;
|
|
36
|
+
if (totalPages === 0) {
|
|
37
|
+
throw new Error('vm_stat output contained no total memory pages');
|
|
38
|
+
}
|
|
36
39
|
const totalGB = (totalPages * pageSize) / (1024 ** 3);
|
|
37
40
|
const availablePages = freePages + inactivePages + purgeablePages;
|
|
38
41
|
const freeGB = (availablePages * pageSize) / (1024 ** 3);
|
|
39
42
|
const usedPages = totalPages - availablePages;
|
|
40
|
-
const pressurePercent =
|
|
43
|
+
const pressurePercent = (usedPages / totalPages) * 100;
|
|
41
44
|
return { pressurePercent, freeGB, totalGB };
|
|
42
45
|
}
|
|
43
46
|
/** Pure: parse `/proc/meminfo` content → memory reading (Linux MemAvailable). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostMemoryPressure.js","sourceRoot":"","sources":["../../src/monitoring/hostMemoryPressure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,SAA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I,CAAC,CAAC,eAAe,CAAC;IACjE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-07-29T11:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-07-29T11:40:48.373Z",
|
|
5
|
+
"instarVersion": "1.3.1054",
|
|
6
6
|
"entryCount": 202,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
The macOS memory reader now treats a successful `vm_stat` command with no
|
|
9
|
+
parseable total-page counters as a read failure. It uses the existing logged RSS
|
|
10
|
+
fallback instead of publishing zero-percent pressure from an empty denominator.
|
|
11
|
+
|
|
12
|
+
## What to Tell Your User
|
|
13
|
+
|
|
14
|
+
Malformed macOS memory output can no longer make a machine look perfectly
|
|
15
|
+
healthy; Instar now says the native reading failed and uses its conservative
|
|
16
|
+
fallback.
|
|
17
|
+
|
|
18
|
+
## Summary of New Capabilities
|
|
19
|
+
|
|
20
|
+
- Parse-validity detection for successful macOS memory-stat reads.
|
|
21
|
+
|
|
22
|
+
## Evidence
|
|
23
|
+
|
|
24
|
+
- The focused test feeds non-empty but unparseable output and proves the RSS
|
|
25
|
+
fallback reports 93.75% pressure rather than zero.
|
|
26
|
+
- The existing thrown-reader fallback test remains unchanged and green.
|
|
27
|
+
- Removing the parse-validity check makes both new assertions fail.
|
|
28
|
+
- Fourteen focused tests and the full repository lint pass.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Post-throttle verification now reports a missing or zero pre-throttle rate as
|
|
9
|
+
inconclusive. It returns nullable ratio and success fields instead of treating
|
|
10
|
+
an empty denominator as a perfect reduction.
|
|
11
|
+
|
|
12
|
+
## What to Tell Your User
|
|
13
|
+
|
|
14
|
+
Instar no longer says a slowdown was successful when it has no measured
|
|
15
|
+
before-rate to compare with the current sample.
|
|
16
|
+
|
|
17
|
+
## Summary of New Capabilities
|
|
18
|
+
|
|
19
|
+
- Explicit insufficient-evidence state for post-throttle verification.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
- The regression enters the zero-before-rate state and asserts a null ratio, a
|
|
24
|
+
null success result, and an inconclusive follow-up message.
|
|
25
|
+
- Restoring the fabricated zero ratio makes the regression fail.
|
|
26
|
+
- Eleven focused tests and the full repository lint pass.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Slowdown verification now distinguishes success from missing evidence
|
|
2
|
+
|
|
3
|
+
After Instar installs a token-use slowdown, it compares the rate from before the
|
|
4
|
+
slowdown with a fresh rate several minutes later. A real reduction can support
|
|
5
|
+
the “Caught and contained” follow-up, while a rate that did not fall triggers a
|
|
6
|
+
warning that the slowdown may not be connected to the offending path.
|
|
7
|
+
|
|
8
|
+
The old calculation had a third state that it forced into the success path. If
|
|
9
|
+
the before-rate was missing or zero, there was no denominator for the
|
|
10
|
+
comparison. The code substituted a ratio of zero, interpreted that as a
|
|
11
|
+
one-hundred-percent reduction, and could send a reassuring message saying a
|
|
12
|
+
component had been contained while both displayed rates were zero. No
|
|
13
|
+
before-and-after claim was actually measurable.
|
|
14
|
+
|
|
15
|
+
Verification results now represent that third state directly. Both the ratio
|
|
16
|
+
and `successfullyThrottled` are null when the before-rate is unavailable, zero,
|
|
17
|
+
or otherwise invalid. The follow-up says verification was inconclusive, gives
|
|
18
|
+
the current sample, and explains that there is no measured baseline. Positive
|
|
19
|
+
finite baselines continue through the existing success and failure paths
|
|
20
|
+
unchanged.
|
|
21
|
+
|
|
22
|
+
The regression enters the broken state with a zero before-rate and a zero
|
|
23
|
+
current sample. It asserts the two null fields, the explanatory message, and
|
|
24
|
+
the absence of “Caught and contained.” Restoring the old zero fallback makes
|
|
25
|
+
the test fail. This changes no throttle, threshold, timer, or release behavior;
|
|
26
|
+
it only prevents missing evidence from becoming false reassurance.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Malformed memory output no longer looks like a healthy machine
|
|
2
|
+
|
|
3
|
+
Instar measures memory pressure differently on macOS because the ordinary
|
|
4
|
+
free-memory number does not include memory the operating system can reclaim.
|
|
5
|
+
It runs the native `vm_stat` command, reads several page counters, and combines
|
|
6
|
+
them into total and available memory.
|
|
7
|
+
|
|
8
|
+
The reader already handled a command that throws or cannot run: it logs the
|
|
9
|
+
failure and falls back to a rough estimate based on the Instar process memory
|
|
10
|
+
and the machine total. But there was a second failure shape. The command could
|
|
11
|
+
succeed and return non-empty text that contained none of the expected page
|
|
12
|
+
counters. Every missing counter became zero, the total denominator became zero,
|
|
13
|
+
and the code returned zero-percent pressure. The machine then looked perfectly
|
|
14
|
+
healthy even though nothing had been measured.
|
|
15
|
+
|
|
16
|
+
The parser now rejects output whose total page count is zero. That rejection is
|
|
17
|
+
caught by the existing read-failure handler, so it uses the same logged RSS
|
|
18
|
+
fallback the original author already built. The throw path, fallback formula,
|
|
19
|
+
logging, thresholds, and real valid parser behavior are unchanged.
|
|
20
|
+
|
|
21
|
+
The regression deliberately supplies a non-empty string so it cannot pass
|
|
22
|
+
through the existing empty-output branch. With a simulated machine using
|
|
23
|
+
fifteen of sixteen gigabytes, malformed native output must produce the fallback
|
|
24
|
+
reading of 93.75-percent pressure, one gigabyte free, and sixteen gigabytes
|
|
25
|
+
total. Restoring the old parser makes that test report zero and fail. This keeps
|
|
26
|
+
unknown input from becoming a flattering health measurement without inventing
|
|
27
|
+
a new pressure policy.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Side-Effects Review — Burn-verifier missing baseline
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `burn-verifier-missing-baseline`
|
|
4
|
+
**Date:** `2026-07-29`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`BurnVerifier.runVerification()` now returns `ratio: null` and
|
|
11
|
+
`successfullyThrottled: null` when no finite positive pre-throttle rate exists.
|
|
12
|
+
Its Telegram follow-up names the result as inconclusive instead of routing the
|
|
13
|
+
fabricated zero ratio through the successful “Caught and contained” message.
|
|
14
|
+
|
|
15
|
+
## Decision-point inventory
|
|
16
|
+
|
|
17
|
+
- Verification evidence sufficiency — modified — a finite positive before-rate
|
|
18
|
+
and a finite current rate are required for a ratio and success decision.
|
|
19
|
+
- Throttle success threshold — passed through — measured ratios are still
|
|
20
|
+
compared with the existing configured `successRatio`.
|
|
21
|
+
- Throttle installation and release — passed through — no actuation changes.
|
|
22
|
+
|
|
23
|
+
## 1. Over-block
|
|
24
|
+
|
|
25
|
+
No action is blocked. The new branch affects only a read-only verification
|
|
26
|
+
result and its follow-up message. A real zero before-rate cannot support a
|
|
27
|
+
percentage reduction because it has no usable denominator.
|
|
28
|
+
|
|
29
|
+
## 2. Under-block
|
|
30
|
+
|
|
31
|
+
The verifier still accepts every finite positive before-rate, including small
|
|
32
|
+
values, and applies the configured threshold exactly as before. It does not
|
|
33
|
+
attempt to infer a missing baseline from unrelated telemetry.
|
|
34
|
+
|
|
35
|
+
## 3. Level-of-abstraction fit
|
|
36
|
+
|
|
37
|
+
Evidence sufficiency belongs beside the ratio calculation that consumes the
|
|
38
|
+
baseline. The follow-up renderer then maps the nullable result to a third,
|
|
39
|
+
explicit message. This keeps the telemetry reader, throttle runbook, and
|
|
40
|
+
delivery path unchanged.
|
|
41
|
+
|
|
42
|
+
## 4. Signal vs authority compliance
|
|
43
|
+
|
|
44
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
45
|
+
|
|
46
|
+
- [x] No — this change has no block/allow surface.
|
|
47
|
+
|
|
48
|
+
The verifier is a post-action signal. It reports whether the observed rates
|
|
49
|
+
support a success conclusion, but it does not install, retain, release, or
|
|
50
|
+
override a throttle.
|
|
51
|
+
|
|
52
|
+
## 4b. Judgment-point check
|
|
53
|
+
|
|
54
|
+
No heuristic judgment is added. A ratio either has a finite positive
|
|
55
|
+
denominator or it is not measurable. Existing measured results retain their
|
|
56
|
+
configured threshold.
|
|
57
|
+
|
|
58
|
+
## 5. Interactions
|
|
59
|
+
|
|
60
|
+
- **Shadowing:** the inconclusive branch is checked before the existing success
|
|
61
|
+
and failure messages, so unknown evidence cannot masquerade as either.
|
|
62
|
+
- **Double-fire:** one verification still produces exactly one follow-up.
|
|
63
|
+
- **Races:** timers, ledger reads, and shared state are unchanged.
|
|
64
|
+
- **Feedback loops:** the follow-up is informational and does not feed back into
|
|
65
|
+
throttle authority.
|
|
66
|
+
|
|
67
|
+
## 6. External surfaces
|
|
68
|
+
|
|
69
|
+
The result interface widens `ratio` and `successfullyThrottled` to nullable
|
|
70
|
+
fields. Repository search finds no production consumer outside `BurnVerifier`;
|
|
71
|
+
the live external effect is the Telegram follow-up. The new user-visible lead
|
|
72
|
+
is “Slowdown verification was inconclusive.” Existing success and failure
|
|
73
|
+
messages are unchanged for measurable inputs.
|
|
74
|
+
|
|
75
|
+
## 6b. Operator-surface quality
|
|
76
|
+
|
|
77
|
+
The new message states what could not be measured, includes the current sample,
|
|
78
|
+
and avoids a recommendation or success claim. It is sent on the same topic and
|
|
79
|
+
cadence as the existing verifier follow-up.
|
|
80
|
+
|
|
81
|
+
## 7. Multi-machine posture
|
|
82
|
+
|
|
83
|
+
**Machine-local by design.** Token-ledger telemetry and throttles belong to the
|
|
84
|
+
agent host that observed the burn. No replicated state, URL, or cross-machine
|
|
85
|
+
authority changes.
|
|
86
|
+
|
|
87
|
+
## 8. Rollback cost
|
|
88
|
+
|
|
89
|
+
Pure code rollback: restore the zero ratio and boolean-only result fields.
|
|
90
|
+
There is no persistent-state migration. Rollback would reintroduce false
|
|
91
|
+
success messages for missing baselines.
|
|
92
|
+
|
|
93
|
+
## Conclusion
|
|
94
|
+
|
|
95
|
+
Clear to ship as a small corrective PR. It adds the missing third outcome to a
|
|
96
|
+
read-only verification signal and does not change throttle behavior.
|
|
97
|
+
|
|
98
|
+
## Second-pass review
|
|
99
|
+
|
|
100
|
+
**Reviewer:** not required
|
|
101
|
+
**Independent read of the artifact:** Not required; the implementation changes
|
|
102
|
+
only a nullable metric result and its informational renderer. It does not alter
|
|
103
|
+
an action, threshold, lifecycle controller, or authority boundary.
|
|
104
|
+
|
|
105
|
+
## Evidence pointers
|
|
106
|
+
|
|
107
|
+
- `tests/unit/burn-detection-phase-6.test.ts`
|
|
108
|
+
- Eleven focused tests pass.
|
|
109
|
+
- Mutation proof: restoring ratio zero makes the new null assertion fail.
|
|
110
|
+
- Full repository lint, including TypeScript, passes.
|
|
111
|
+
|
|
112
|
+
## Class-Closure Declaration
|
|
113
|
+
|
|
114
|
+
No agent-authored-artifact defect — not applicable.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Side-Effects Review — Host-memory unparseable fallback
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `host-memory-unparseable-fallback`
|
|
4
|
+
**Date:** `2026-07-29`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`parseVmStat()` now rejects a zero total-page count as unparseable.
|
|
11
|
+
`readSystemMemoryPressure()` already catches parser errors, logs the failed
|
|
12
|
+
native read, and returns its existing RSS-based fallback. The new test enters
|
|
13
|
+
the previously uncovered successful-but-unparseable path; the existing
|
|
14
|
+
thrown-reader test and fallback implementation are unchanged.
|
|
15
|
+
|
|
16
|
+
## Decision-point inventory
|
|
17
|
+
|
|
18
|
+
- `parseVmStat` parse-validity invariant — modified — a non-empty native command
|
|
19
|
+
result must contain at least one total-memory page counter before it can
|
|
20
|
+
become a pressure measurement.
|
|
21
|
+
- Memory-pressure policy — passed through — the existing fallback and all
|
|
22
|
+
downstream pressure thresholds remain unchanged.
|
|
23
|
+
|
|
24
|
+
## 1. Over-block
|
|
25
|
+
|
|
26
|
+
No user or agent action is blocked. A syntactically unusual `vm_stat` output
|
|
27
|
+
that contains none of the five total-memory counters is rejected rather than
|
|
28
|
+
graded; that is appropriate because no total-memory denominator can be derived.
|
|
29
|
+
|
|
30
|
+
## 2. Under-block
|
|
31
|
+
|
|
32
|
+
The parser can still accept partially populated output when at least one
|
|
33
|
+
total-memory counter is present. That preserves its existing tolerant parsing
|
|
34
|
+
contract. This change does not claim to validate the semantic relationship
|
|
35
|
+
between every page category; it closes the specific state where no measurement
|
|
36
|
+
exists at all.
|
|
37
|
+
|
|
38
|
+
## 3. Level-of-abstraction fit
|
|
39
|
+
|
|
40
|
+
The validity check belongs in the pure parser, immediately after the denominator
|
|
41
|
+
is assembled. The reader already owns fallback selection, logging, and
|
|
42
|
+
never-throw behavior. Reusing that path avoids a second fallback policy and
|
|
43
|
+
keeps consumers unaware of parser details.
|
|
44
|
+
|
|
45
|
+
## 4. Signal vs authority compliance
|
|
46
|
+
|
|
47
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
48
|
+
|
|
49
|
+
- [x] No — this change has no block/allow surface.
|
|
50
|
+
|
|
51
|
+
The zero-page check is a hard structural invariant: pressure cannot be computed
|
|
52
|
+
without total pages. It does not decide whether an operation may proceed.
|
|
53
|
+
Downstream pressure policy continues to consume the resulting measurement.
|
|
54
|
+
|
|
55
|
+
## 4b. Judgment-point check
|
|
56
|
+
|
|
57
|
+
No competing-signals judgment point or new policy heuristic is added. A
|
|
58
|
+
zero-denominator parse cannot yield a measurement.
|
|
59
|
+
|
|
60
|
+
## 5. Interactions
|
|
61
|
+
|
|
62
|
+
- **Shadowing:** the new parser rejection feeds the existing catch-and-fallback
|
|
63
|
+
path; it does not bypass or duplicate it.
|
|
64
|
+
- **Double-fire:** only one reading is returned. The rejected native parse does
|
|
65
|
+
not also publish a zero reading.
|
|
66
|
+
- **Races:** all reads remain synchronous and local; shared state is unchanged.
|
|
67
|
+
- **Feedback loops:** downstream reaping and revival continue to see the same
|
|
68
|
+
fallback shape already used when the native command throws.
|
|
69
|
+
|
|
70
|
+
## 6. External surfaces
|
|
71
|
+
|
|
72
|
+
On malformed non-empty macOS output, logs now name the parse failure and the
|
|
73
|
+
returned reading comes from the RSS fallback. Valid macOS output, Linux input,
|
|
74
|
+
other platforms, external services, persistent state, and message formats are
|
|
75
|
+
unchanged. No operator-facing action is added.
|
|
76
|
+
|
|
77
|
+
## 6b. Operator-surface quality
|
|
78
|
+
|
|
79
|
+
No operator surface — not applicable.
|
|
80
|
+
|
|
81
|
+
## 7. Multi-machine posture
|
|
82
|
+
|
|
83
|
+
**Machine-local by design.** Memory pressure is a physical property of each
|
|
84
|
+
host and must differ across machines. The correction emits no user notice,
|
|
85
|
+
stores no durable or topic-bound state, and generates no URL.
|
|
86
|
+
|
|
87
|
+
## 8. Rollback cost
|
|
88
|
+
|
|
89
|
+
Pure code rollback: remove the zero-page rejection and restore the guarded
|
|
90
|
+
division. No data migration or agent repair is required. Rollback would
|
|
91
|
+
reintroduce the false-healthy reading for malformed native output.
|
|
92
|
+
|
|
93
|
+
## Conclusion
|
|
94
|
+
|
|
95
|
+
Clear to ship as a small corrective PR. The change reuses the existing visible,
|
|
96
|
+
never-throw fallback and leaves its already-correct thrown-reader path intact.
|
|
97
|
+
|
|
98
|
+
## Second-pass review
|
|
99
|
+
|
|
100
|
+
**Reviewer:** not required
|
|
101
|
+
**Independent read of the artifact:** Not required; the implementation changes
|
|
102
|
+
only parser validity and routes through an existing tested fallback. It does not
|
|
103
|
+
modify a lifecycle controller, authority, threshold, or action.
|
|
104
|
+
|
|
105
|
+
## Evidence pointers
|
|
106
|
+
|
|
107
|
+
- `tests/unit/host-memory-pressure.test.ts`
|
|
108
|
+
- Fourteen focused tests pass.
|
|
109
|
+
- Mutation proof: removing the validity check makes the parser fail to throw and
|
|
110
|
+
makes the reader return zero instead of the asserted 93.75-percent fallback.
|
|
111
|
+
- Full repository lint, including TypeScript, passes.
|
|
112
|
+
|
|
113
|
+
## Class-Closure Declaration
|
|
114
|
+
|
|
115
|
+
No agent-authored-artifact defect — not applicable.
|