Skip to content

fix(dx): silence becomes visible — doctor measures time since the last reading - #1721

Open
OrangePeachPink wants to merge 1 commit into
mainfrom
dx/1710-collection-silence
Open

fix(dx): silence becomes visible — doctor measures time since the last reading#1721
OrangePeachPink wants to merge 1 commit into
mainfrom
dx/1710-collection-silence

Conversation

@OrangePeachPink

Copy link
Copy Markdown
Owner

Refs #1710item 3's minimum bar only. Does not close the issue; items 1 and 2 are maintainer decisions and the app-launch surface is Data's.

What a check can actually fix

Six days of silence looked identical to six days of health.

That's the fixable part. gaps_by_device couldn't have caught it, and it's worth saying why rather than leaving it looking like an oversight: it's window-scoped, so a six-day hole isn't merely unflagged — it isn't even in a "last 24h" view to be flagged. The data knew; nothing was asking the question.

Grading, on the records-lane precedent

#1718 established the right axis for this class, and the underlying fact is identical — readings are irreplaceable, so age, not count:

state grade why
no readings at all ok a contributor with no hardware is not broken
hours warn not collecting right now is an ordinary state
days FAIL every hour in that window is gone for good

A warn for the six-day case would have been a warn in a list of warns — which is exactly how the silence stayed invisible.

Measured at the main worktree, never this checkout

logs/ is gitignored, so a worktree has none. Measuring locally would report a six-day silence that reflects only where the agent happens to be standing — an alarm manufactured by the tool, which is worse than the silence it was built to catch. Same lesson as #1688, one layer down; it reuses that check's main_worktree().

Live, from this worktree:

[ok  ]  collection   last reading 0m ago (measured at C:\Users\PV\dev\plants)

The 6.3-day case is a test with an injected clock — I can't make a real collector go silent for six days on demand, and I'd rather say that than imply I measured it.

What this does NOT do — so a green doctor isn't read as coverage

  • Not "on next launch the app should SAY". That surface is serve.py, which the justfile marks as Data's lane. Doctor covers the operator who asks; the launch banner covers the operator who shouldn't have to. Routing below.
  • Nothing about start-on-boot (item 1) or return-to-power (item 2). Both are machine-configuration decisions the issue explicitly reserves for you, and neither is code in this repo.

just check green; 41 doctor tests.

— DX

…t reading

#1710 item 3's minimum bar, through the surface DX owns.

The greenhouse went quiet for 6.3 days and nothing said so, before, during or
after. A Windows-update restart shut the host down on 08-13 and it never came
back up until the operator powered it on by hand on 08-20. Both boards' logs stop
mid-day; no files exist for five days.

The sentence that matters from the filing: SIX DAYS OF SILENCE LOOKED IDENTICAL
TO SIX DAYS OF HEALTH. That is the part a check can fix.

`gaps_by_device` cannot, and it is worth saying why rather than leaving it to
look like an oversight: it is window-scoped, so a six-day hole is not merely
unflagged — it is not even IN a "last 24h" view to be flagged. The data knows;
no surface was ASKING the question.

Grading follows the records-lane precedent (#1718), because the underlying fact
is the same one: readings are irreplaceable, so AGE is the severity axis.

  no readings at all   ok    a contributor with no hardware is not broken
  hours                warn  not collecting right now is an ordinary state
  days                 FAIL  every hour in that window is gone for good

A WARN for the six-day case would have been a WARN in a list of WARNs, which is
exactly how the silence stayed invisible.

Measured at the MAIN worktree, never this checkout. `logs/` is gitignored so a
worktree has none, and measuring locally would report a six-day silence that
reflects only where the agent happens to be standing — an alarm manufactured by
the tool, which is worse than the silence it was built to catch. Same lesson as
#1688, one layer down, and it reuses that check's `main_worktree()`.

Filesystem-level, per doctor's standing rule that it must not import the app: it
has to keep answering when the collector, the server or the environment is
broken, which is precisely when someone runs it.

WHAT THIS DOES NOT DO, so nobody reads a green doctor as coverage:

  It does not satisfy "on next launch the app should SAY". That surface is
  serve.py, which the justfile marks as Data's lane. Doctor covers the operator
  who ASKS; the launch banner covers the operator who should not have to.

  It does nothing about start-on-boot (item 1) or return-to-power (item 2). Both
  are machine-configuration decisions the issue explicitly reserves for the
  maintainer, and neither is code in this repo.

Verified live: reports the greenhouse collecting, measured at the main checkout.
The 6.3-day scenario is covered by a test with an injected clock, since I cannot
make a real collector go silent for six days on demand.

Refs #1710

Lane: DX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant