Repository navigation
Conversation
V3RON
added this pull request to stack #590
October 15, 2026 08:04
The CPU and disk gauges were always grey: the worker sends no threshold for them, so the panel had nothing to judge them against. A machine at 97% busy across all twelve cores looked no different from one idling at 5%. The console holds the numbers itself now, in one file. LOAD_THRESHOLDS is amber at 85% full and red at 95%, and levelOf compares the figure the gauge is drawn from and nothing else — no earlier readings, no hold, no state carried between renders. A figure below 85% stays neutral, so a colour always says a threshold was crossed rather than "healthy, as far as we guessed". Memory keeps its colour from the worker's own pressure word where it sends one: that is the worker's judgement of the same fact and outranks ours. Where it sends none — every Linux worker — memory falls back to the threshold like the other two. The lane's colour test rewrites the memory figures it serves as well as the pressure word, so all six cases expect the same colour on a CI machine of any free-memory level, and one case pins that the word outranks the threshold. The unit seam owns the table itself. How the test says it changed too. Reading the memory fields needed a route helper of its own and the shared per-gauge claim an assertion of its own — the test's arrow had grown past Fallow's cyclomatic limit — and separating them showed the per-gauge loop never needed to re-check which token a tone class resolves to: the memory poll already proves that for all four classes in both themes. So the loop now asserts only what it alone can see, that every gauge carries a tone class and none of them the accent, and a mutation confirmed it can still fail. Closes #580
CONSOLE.md said the CPU and disk bars stay neutral because the worker sends no threshold to judge them against. They no longer do: the console supplies its own. The paragraph now states the numbers, says they read the one figure beside the bar, and says where memory's pressure word wins instead — plus that the figures stay numbers and `simlock status` reports them with no verdict, so a reader who never opens the console is not told a different story. DESIGN.md's Load gauges entry claimed a gauge shades "a level the console has a word for and nothing else". For CPU and disk that is now false, so the entry says so plainly and bounds the exception: the one place in the console where a colour says something no word does, kept on a gauge and nowhere else — not in a status, not in a table, not in the card's line of text. Closes #580
…the lane no longer checks Four review findings, all of them about a claim outrunning its proof. The error threshold's lower edge was never tested, at either seam: moving it from 95 to 92 left 41 unit tests green. Both seams now assert one step under each edge, and the module's own test names the two numbers as literals, since the console's manual prints them to a person and a relative assertion cannot hold a constant to a promise about its value. The memory row's title still said a view with no pressure is idle. It has been false since this branch's own change: no word means the threshold decides, so such a memory goes amber and red like the other two. The word cases and the fallback cases now carry titles that say which one each proves, and the fallback tests the spec's own 97% figure rather than the 95% edge alone. The lane's per-gauge comment promised a gauge coloured by something other than its own tone class would fail there. That stopped being true when the redundant token comparison came out — the memory poll already proves all four classes in both themes — and the comment survived the edit that made it false. It now states what the predicate actually watches.
…one does The comment above the fallback cases ended "and a full disk on the one step under it". No disk appears in that test — the memory fixture carries the disk from the shared reading at 77% used — and the one-step-under cases live in the CPU and disk test, at 94% on both figures. A why-comment that points at another test's cases is how a reader ends up trusting a proof that is not there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The CPU and disk gauges #575 added were always grey — the worker sends no threshold for either figure, so the panel had nothing to judge them against. A machine at 97% busy across all twelve cores looked exactly like one idling at 5%.
The console now holds those numbers itself: amber at 85% full, red at 95%, neutral below, read off the one figure the bar sits under.
Spec: #580. Stacked on #575 — it changes the colour of gauges that PR introduces.
Closes #580
How
One file,
ui/src/load-thresholds.ts, holds both numbers and the comparison:normal/warn/critical, that's the worker's own judgement of the same fact and it outranks ours, at any fullness. Where it reports none — every Linux worker — memory falls back to the threshold like the other two.simlock statusreports the same figures with no verdict. That asymmetry is now said out loud inCONSOLE.md, so an operator who lives in the CLI isn't told a different story.DESIGN.md's Load gauges entry used to claim a gauge shades "a level the console has a word for and nothing else". For CPU and disk that is now false, so the entry says so and bounds it: this is the one place in the console where a colour says what no word does, kept on a gauge beside the figure it judges — not in a status, not in a table, not in the card's text.Done when
load-thresholds.test.ts, +2 rewritten inworker-detail.test.tsx): each threshold at and just below its value, the two numbers' order and bounds,undefined→ idle, CPU and disk coloured across both edges, memory falling back at 97% and staying neutral at 6%, and the pressure word winning at 50%.pnpm test:console --project=chromium): the colour test now answers the page's own/v1/workersread with the memory figures set per case, not just the word — so all six cases expect the same colour on a CI machine of any free-memory level, and one case pins word-over-threshold. Both themes.97% with no word to paint the error gauge; dropping the error threshold fails four named unit tests; ignoring the pressure word fails two. Extracting the route intoanswerMemorywas Fallow's cyclomatic rule on the test's arrow, not a style call.CONSOLE.mdnames the numbers and where the word wins;DESIGN.mdbounds the exception.Status
Implement: done Review: fix check, passed Hardware: n/a Gate: waiting for the stack
Assumptions
diskPressure.freeBytesThresholdin GiB. That config is real and drives the reaper, but it never reaches the worker view — reaching it is the wire change The console colours each load gauge over its own thresholds #580 puts out of scope. Consequence, stated plainly: on a 1 TB disk, red here means ~46 GiB free while Simlock's own reaper waits for 10 GiB. The two numbers answer different questions ("this volume is nearly gone" vs "I can no longer create a device"), and the bar will go red first.simlock status, the MCP server and the agent surfaces keep reporting the figures without a verdict. The same numbers can't reach them fromui/src— that's the daemon-side version of this, if this one earns its keep.Not in this PR
No wire or protocol change. No level from the daemon. No
queueDepth, no load history, no graph. No thresholds in config.Review
Spec review: 3 blocking, 3 fixed, 0 notes. Code review: 4 blocking, 4 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: n/a.
Fixed unreviewed (text and tests only, delivery rule 14):
LOAD_THRESHOLDSto CPU and disk only; memory takes it too wherever the worker sends no pressure wordstyleprop creates no<style>elementNothing was rejected: each finding was reproduced against the code at the reviewed commit, and the threshold-edge one was reproduced twice with the threshold moved by hand. The fix check ran because the stack's rebase needed a conflict resolved in
docs/internal/DESIGN.md, not because round 1 confirmed asrcfinding — it confirmed none.Written by an agent.