Commit Graph

14 Commits

Author SHA1 Message Date
Wanjohi
3dba825f17 fix(nesdoctor): up= was overstated by about a fifth
The throughput window and the byte count disagreed. Bytes were counted from
the moment the upload threads started, the 1.5 s queue-fill ramp included;
the divisor was that same span with 1.5 s subtracted from it. So a numerator
covering ~8.3 s was divided by ~6.8 s, and every up= figure nesdoctor has
ever published is high by ~22%.

Snapshot the counter and the clock together after the ramp, and measure both
from there. Excluding the ramp is also the better measurement: TCP slow-start
lives in it, so it is not the steady state a session gets.

Found by running speedtest on the same line in the same afternoon — 284 Mbps
against our 502 — which is the only way it could have been found. The code
was self-consistent and the number it printed was plausible, so no amount of
re-reading would have shown it. A boundary effect remains and is documented
in the code rather than papered over: bytes arrive one completed 8 MiB POST
at a time, so up= keeps a few per cent of upward slack.

Submissions collected to date stay useful as a floor and as a bufferbloat
corpus. They are not usable as throughput.
2026-09-03 18:46:28 +03:00
Wanjohi
dc99bd2743 fix(nesdoctor): the Apple Silicon GPU name had doubled parentheses
The fallback worked -- the macOS runner now reports a GPU instead of
`unknown`, and the raw probe dump settled which of the two candidate causes it
was: a headless virtual Mac with no display adapter to enumerate, so
`system_profiler` had nothing and the parser was never at fault.

It read `Apple M1 (Virtual) (integrated)`, because the SoC name already
carries a parenthetical on a VM. Em-dash instead. The suffix stays: it records
that the name came from the chip rather than from a display adapter, which is
the difference between a machine with no GPU and a machine with no display.
2026-09-02 16:34:11 +03:00
Wanjohi
730739a5c0 fix(nesdoctor): fall back to the SoC name on Apple Silicon, and print raw probes
The macOS arm added in the previous commit did not change anything -- the
runner still reported `gpu=unknown`. Checked rather than assumed, which is the
only reason it is known.

Two possible causes and no way to choose between them from here: either the
`system_profiler SPDisplaysDataType` parsing is wrong, or that machine is a
headless virtual Mac with no display adapter to enumerate at all, in which case
`unknown` was the correct answer and there is nothing to fix. The second is
likely and the first is not ruled out.

So, rather than guessing again: on an arm64 Mac the GPU *is* the SoC, so the
chip name is a true and useful answer even with no display attached.
`sysctl -n machdep.cpu.brand_string` works headless and yields
"Apple M1 (integrated)". Intel Macs get no fallback, because there the GPU may
be integrated or discrete and a guess would be wrong rather than coarse.

And the CI step now dumps the **raw** output of each platform's probes --
`system_profiler`, `Get-CimInstance Win32_VideoController`, `Get-PSDrive`,
`df -Pk`, `/sys/class/drm` -- into its own log group. A field that comes back
empty can then be told apart from a parser that is wrong, which is exactly the
distinction that cost this round trip. All of it is `|| true`: the step exists
for looking, and a probe that misbehaves on a runner must never fail a release.
2026-09-02 16:29:03 +03:00
Wanjohi
0f26df5c02 fix(nesdoctor): every Mac reported gpu=unknown, because the probe had no macOS arm
Seen in the macOS CI log:

  nesdoctor 0.2.2 | macos/aarch64 | gpu=unknown | ...

`gpus()` had a Linux arm, a Windows arm, and `Vec::new()` for everything else.
Macs are clients rather than hosts, so it went unnoticed -- but 0041 wants a
client vendor matrix and an unlabelled row is no use in one. An M-series
integrated GPU and a discrete Radeon in an Intel Mac decode very differently,
and "unknown" cannot tell them apart.

`system_profiler SPDisplaysDataType` is the only place the chipset name lives.
Parsed loosely: the format has changed between macOS releases, so a name we
cannot find costs a field rather than the run. Vendor is matched over Apple,
AMD, Radeon, NVIDIA and Intel; `render_node` stays `None` because macOS has
none and a Mac cannot host regardless.

Still missing on macOS and stated rather than papered over: filesystem types
and the display probe. The EDID path is sysfs on Linux and WMI on Windows, and
macOS exposes neither -- so Mac respondents report no colour depth or HDR
capability. That is a real gap for the video work, since Mac panels are exactly
the P3 and high-refresh cases worth knowing about, and it needs
`CoreDisplay`/`system_profiler` parsing rather than a one-line fix.
2026-09-02 16:25:09 +03:00
Wanjohi
53d69ca289 fix(nesdoctor): parse df from the right; a device name can contain a space
Three more things the macOS CI log showed, none of which had ever been visible
from this laptop.

`df -P` fixes the column order but not that the filesystem name is one word.
macOS emits

    map auto_home           0    0    0  100%  /System/Volumes/Data/home

which shifts every field by one, so indexing from the left read the capacity
percentage as part of the mount point and a device name as the size. The row
appeared in the log as `100% /System/Volumes/Data/home`, which is what gave it
away. Columns are now counted from the right, where `df` actually guarantees
them: size, used, avail, capacity, mount. A test covers the plain row, the
two-word `map auto_home` row, and an SMB share whose device name contains a
space -- the case that makes left-indexing wrong in principle rather than just
on Macs.

The `/System` filter I claimed to have added in the previous commit was not in
the file. The assertion that was supposed to catch that passed against the
wrong block, so it went in silently and `/System/Volumes/xarts` kept appearing
in the very output I had just quoted as fixed. It is there now, along with
`/private/var/vm` and `/Volumes/Recovery`, and verified by grep rather than by
belief.

And a filesystem reporting no capacity is not storage: `map auto_home`, devfs
and macOS signed asset bundles all report zero and were padding the filesystem
count in the summary line.

Net effect on the runner, across this commit and the last: 11 filesystems and
"483 GiB free of 1600 GiB" on a 320 GiB machine, down to the one real volume.
2026-09-02 16:20:57 +03:00
Wanjohi
f32db5393b fix(nesdoctor): APFS volumes share one pool, and were counted eleven times
Found by reading what the macOS CI runner prints, which is the whole reason
that step was added an hour ago. First time anyone had looked at what these
probes return on a platform that is not this laptop:

  /                          96 GiB free of 320 GiB
  /System/Volumes/VM         96 GiB free of 320 GiB
  /System/Volumes/Preboot    96 GiB free of 320 GiB
  /System/Volumes/Update     96 GiB free of 320 GiB
  /System/Volumes/Data       96 GiB free of 320 GiB
  11 filesystems · 483 GiB free of 1600 GiB total

On a machine with 320 GiB. An APFS container presents each volume as its own
filesystem with its own `/dev/diskNsM`, so the device-name dedupe -- which
correctly collapses btrfs subvolumes -- cannot see that the space is shared.

Two changes.

`/System/Volumes` and `/private/var/vm` are skipped: they are not user storage,
and on a Mac they are most of the rows.

And filesystems are deduped by *pool* as well as by device. Two filesystems
reporting byte-identical capacity and byte-identical free space are one store,
whatever their device names say -- which also covers bind mounts and
thin-provisioned LVM, neither of which the device check catches either. Two
genuinely separate disks agreeing to the byte on both figures would cost one
row; a storage total inflated fivefold is a number a capacity plan gets built
on.

Simulated against the exact runner output: eight rows and 2560 GiB become one
row and 320 GiB.

The Windows runner, by contrast, was correct first time -- `C:` and `D:` are
genuinely separate and totalled 179 GiB free of 299 GiB. Worth recording that
the reason we know is that we looked, rather than that we reasoned about it.
2026-09-02 16:16:09 +03:00
Wanjohi
786267f30a fix(nesdoctor): report storage properly, and stop being blind on Windows
A submission from a team machine with four drives and 22 TiB reported
`disk=8880`, and the field was not wrong so much as meaningless: it was the
free space on the single largest mount, with no capacity anywhere and no total.
A content store is sized against capacity.

Storage now reports four things, because they answer different questions and
one number could not:

  diskfree   total free across every real filesystem
  disksize   total capacity
  diskmax    the largest single filesystem, which is the real ceiling for any
             one store -- a dataset cannot be spread across drives
  disks      how many there are

The ambiguous `disk` key is gone rather than silently redefined, so old rows
stay readable as what they were. `Get-PSDrive` reports Free *and* Used and we
were reading only Free, hence no capacity on Windows at all.

Pseudo-filesystems are now excluded by *type* rather than by mount path. Path
filtering missed `/tmp` on a tmpfs, whose free space is RAM -- so 7 GiB of
memory was being added to a storage total, which is exactly the sort of number
a capacity plan gets built on.

## The real finding, which was not about disks

"We are working blind on Windows" is correct, and both Windows bugs this tool
has had prove it: a virtual display adapter reported as the GPU, and a URL
truncated at its first `&`. Both were in code that only runs on Windows, both
were found by a person reading the results channel, and neither could have been
found here -- the development machine is Linux and `xdg-open` never sees a
shell.

Two things about that, and the first is the one that generalises.

`OPENERS` is now a const with a test asserting the property that actually
matters: **never hand a URL to anything that will re-parse it.** No `cmd`, no
`sh`, no `powershell`, no `start` builtin, and no argument that looks like it
wants the URL interpolated into it. Unlike the bug, that is checkable on every
platform in a millisecond. Verified by reintroducing `cmd /C start "" <url>`
and confirming the test fails with the right message, then reverting.

And CI already runs a real Windows machine and a real macOS one -- we simply
were not looking at them. Each smoke-tested target now prints its full report
and JSON into a collapsed log group. Deliberately not `set -e`: this step is
for looking, and a probe that misbehaves on a runner must not fail a release.
It turns "working blind" into "looking at it once per release", which would
have shown the Parsec adapter problem the first time a Windows binary was ever
built.

Version to 0.2.2.
2026-09-02 16:10:05 +03:00
Wanjohi
a7eeb14de5 fix(nesdoctor): cmd re-parsed the submit URL and destroyed every Windows result
Two submissions arrived carrying `v=0.2.0` and nothing else. Flagged from the
channel, not caught by us.

The Windows arm of `open_in_browser` was `cmd /C start "" <url>`. `cmd.exe`
re-parses its own command line and treats `&` as a command separator; Rust's
`Command` quotes arguments for the MSVC C runtime convention, which `cmd` does
not honour. So the URL was cut at its first `&` -- which in ours falls
immediately after `v=` -- and the browser opened

    https://doctor.nestri.io/?v=0.2.0

carrying nothing whatsoever. Reproduced exactly with the same mechanism in a
POSIX shell: `sh -c 'echo <url>'` unquoted prints precisely that prefix.

Every Windows user who pressed Enter lost their entire report, and lost it
silently -- the page returned 200 and thanked them. Windows is most of this
audience, so most of the data we would ever have collected was going to
disappear this way.

Now `rundll32 url.dll,FileProtocolHandler`, which hands the URL to the shell's
protocol handler with no command interpreter anywhere in the path, so nothing
re-parses it. `explorer.exe` also opens URLs and was rejected: it returns a
non-zero exit status even on success, which would make the caller believe it
had failed and fall through.

The relay now also refuses to thank anyone for a version-only arrival, since an
older binary keeps producing them and a URL pasted into a shell unquoted does
the same thing.

Version to 0.2.1.
2026-09-02 15:50:47 +03:00
Wanjohi
3544f857ff feat(nesdoctor): read the display, and offer early access
Two things, both of which every response collected without them is a response
we cannot go back for -- since a submission carries nothing that identifies
anyone, there is no second chance to ask.

## The display and decode probe

This is the readable half of the client capability probe our build order
already specifies -- GPU, decoder, display -- and its stated purpose is
attribution: told only that a stream "looks bad", the cheapest available
explanation is that our reconstruction ratio was too aggressive, so without
this we would lower the ratio and pay density for somebody else's window
manager.

  presentation path   x11 · bspwm
  eDP-1               1920x1200 @ 60 Hz, 8-bit
  Vulkan decode       h264, h265
  VA-API decode       h264, h265, vp9

Session type, compositor, and whether we are under XWayland -- which is exactly
the objection raised against our own A/B rounds, now recorded automatically
rather than argued about. A bare window manager sets none of the XDG variables,
so bspwm and thirteen others are matched from the process list; a report that
cannot name bspwm cannot answer the challenge that named it.

From EDID, parsed here rather than shelled out to: native mode, refresh,
colour bit depth, which HDR transfer functions the panel accepts, BT.2020
colorimetry, and 4:2:0 chroma. The CTA-861 extension blocks are where all the
colour capability lives -- base EDID says nothing about any of it.

That decides real choices. Whether 10-bit is worth sending, whether BT.2020 is
worth encoding, which codec to reach for. Every one of those has so far been
decided against the one panel in this room -- which this now reports as 8-bit,
meaning the 10-bit work cannot be validated on it at all.

EDID is untrusted binary from a device node. Every read is bounds-checked and
every field optional: monitors ship broken EDIDs and docks synthesise worse
ones, so a bad panel costs one field rather than the run. Three tests, one of
which truncates the block mid-extension and asserts that no colour capability
is invented. The colorimetry byte offset was wrong the first time and the test
caught it, which is the argument for the test.

Present mode, tearing and fractional scaling need a real window and swapchain,
so they are absent and said to be absent rather than guessed.

## Early access

An optional email, asked last, after the verdict has printed -- so nobody types
an address before seeing what this said about their machine. Blank skips it.

The offer branches on the verdict, because telling someone with no KVM and a
grade-F uplink that we liked what their machine can do is a lie, and this
program's only real asset is that it does not flatter anyone. A host-capable
machine gets the host offer; everyone else gets early access as a player, which
is a true offer too.

It is the one identifying thing collected here, so: it appears in the
pre-submit disclosure with everything else, and the promise elsewhere had to be
reworded -- "no username, no identifiers" stopped being true the moment this
field existed, and leaving the old line standing would have been the dishonest
option. Validation is deliberately loose; arguing with somebody about their own
address over a regex loses the response outright.

Version to 0.2.0.
2026-09-02 14:58:40 +03:00
Wanjohi
c2c3bb5ba0 feat(nesdoctor): ask about the other Linux box while we still can
Our first respondent answered `otherlinux=yes` -- they have a Linux machine --
and their Windows desktop came back CLIENT, which is a dead end. The Linux box
is the result we have none of.

There is no way to ask them. A submission carries no hostname, no address and
no name, by design, so the moment the program exits whoever ran it is anonymous
and unreachable. That is the correct trade and it is not being changed. What
was wrong is that the program knew about the other machine *while they were
still reading* and said nothing.

So when someone answers that they have, or could set up, a Linux machine and
this one cannot host, the run now ends by asking for it -- with the command,
and with the reason stated plainly: nearly every result is a client, a host has
to be Linux with KVM, and one run over there is worth more than a hundred of
these. Including why we cannot follow up, since that is the honest argument for
doing it now.

The nudge is suppressed when the machine already qualifies as a host, because
then it is noise.
2026-09-02 14:46:05 +03:00
Wanjohi
b055e40546 fix(nesdoctor): the first Windows submission recorded a virtual display adapter
Our first response, and the GPU field is wrong:

  gpu=Parsec%20Virtual%20Display%20Adapter&gpus=2

Parsec installs an indirect display driver, it enumerated first out of
`Win32_VideoController`, and the primary was taken as the first entry -- so the
real card on that machine is gone. `gpus=2` is the only reason we can tell
anything was lost, and it cannot tell us what.

This is not an edge case for this audience. Parsec, Sunshine, Moonlight,
TeamViewer and Splashtop all install one, and a cloud-gaming community is
precisely the population that has one already. A recorded gpu_model is a hard
requirement for a host; a virtual display driver satisfies it in name only.

Three changes.

Adapters are now sorted so real hardware is first, by two keys: whether the
name matches a known software adapter, then whether a vendor could be
identified at all. Order is the only signal the rest of the program has for
which GPU is "the" GPU.

The vendor comes from `AdapterCompatibility` rather than from
pattern-matching the marketing name. An "AMD Radeon" string is easy; an
OEM-rebadged one is not.

And every adapter name is now sent, not only the count. `gpus=2` told us
something had been lost and not what, which is the kind of field that wastes a
response we cannot ask again.

The known-software-adapter list has unit tests, on all platforms -- it is a
list of strings and it will need extending, so it should fail loudly rather
than quietly stop matching.

Version to 0.1.2.

For the record, what that submission got right, because none of it needed
asking: 50% of 165 Steam launch records fall in five hours of twenty-four
(21:00-01:59) against five records across the whole of 07:00-13:59. That is
0017's evening peak, measured, from one person's own files. 140 of the 165
records are titles no longer installed -- restricting the histogram to
installed titles, as review suggested, would have left 25 samples and lost the
shape entirely.
2026-09-02 14:42:51 +03:00
Wanjohi
f0e65b9738 fix(nesdoctor): bloat was measured against the median, and could grade a bad line A
Found by running the published one-liner, which is the only reason it was
found: `up=34Mbps rtt=188ms rttload=181ms bloat=+0ms grade=A` on a connection
that measured +115 ms and grade F three hours earlier.

The idle baseline was the median of twelve handshakes to one anycast address.
On the development connection those twelve came back **bimodal**:

    [56, 56, 57, 59, 60, 176, 177, 179, 179, 179, 182, 368]
    min 56   p50 177   max 368   spread 312 ms on an *idle* link

Two points of presence answering. The median therefore lands wherever the split
happens to fall, and when it lands high the loaded median comes in *below* it,
the difference goes negative, `.max(0.0)` clamps it to zero, and the headline
number reports grade A.

That is the one error direction that cannot be tolerated here. A tool whose
whole pitch is a number nobody else shows you has no business saying "your line
is fine" about a line that is not.

Bloat is now measured against the **minimum**. Queueing is delay above the
floor the path can achieve, so the floor is the baseline -- which is also how
every bufferbloat test does it. Twenty samples rather than twelve.

The distance verdict deliberately keeps the **median**, because it asks a
different question. Bloat asks how much queueing is added, so its baseline is
the best case. HOST-READY-LOCAL asks what a player will actually see, so it
takes the typical case: on a link that is bimodal between 56 ms and 180 ms, the
floor would call it near when half of all connections are not.

Both are now reported, and the gap between them is itself the finding -- a
floor of 55 ms against a typical of 180 ms says the route is the problem, which
no single number could have said.

Verified on the same connection: floor 55, typical 180, loaded 95, **+39 ms,
grade C**, verdict HOST-NET. Defensible, and no longer flattering.

Version to 0.1.1. Submissions carry it, so any row with `v=0.1.0` has a grade
that cannot be trusted.
2026-09-02 13:34:00 +03:00
Wanjohi
d01e4a180e fix: nesdoctor.json was committed to a public repository (#312)
My mistake, in a76cb2a, now merged to dev. nesdoctor writes its report
next to wherever it is run, and during development that is the
repository root. `git add -A` took it.

What the committed file exposed, all of it the operator's own machine:

  - two home paths, /home/<user>/.steam/steam and .local/share/Steam
  - one installed game title
  - mount points
  - the answers given to a test run of the questionnaire

Low severity -- the username is already public and matches the account,
and one game title is not much -- but it is exactly the class of thing
this tool exists to be careful with, and shipping it in the repository
that asks strangers to trust the tool is worse than the content.

Removed from HEAD and added to .gitignore, along with the wildcard form.
The `--json` default keeps its name on purpose: an ignore rule cannot
protect a default called something generic like report.json, and
renaming it would leave the old name unguarded for anyone who scripted
against it.

**History is not cleaned by this commit.** The file is in pushed history
on a public repository, which per our own rule about published history
means it should be treated as permanent rather than as something a
revert fixes. Rewriting dev is possible and is a judgement call about
whether the content above is worth the disruption; it is not mine to
make unilaterally.
2026-09-02 13:00:03 +03:00
Wanjohi
79f1732a14 feat(nesdoctor): a host readiness checker that measures instead of asking (#310)
The first executable form of our host requirements. Until now a machine
was qualified by a human reading a table of hard requirements — and a
requirement that nothing can check is one that is silently optional.

It also replaces a form. Everything we wanted from a prospective host is
measurable, and most of it **cannot be answered honestly by a human
anyway**: almost nobody knows their real upstream, and essentially
nobody has ever seen their own bufferbloat figure. What's left for the
questions is only what a machine cannot know — intent, and what someone
already pays.

## What it does

```
nesdoctor
```

- **Checks every hard requirement**: `/dev/kvm`, an AMD or Intel GPU
with a DRM render node, `VK_KHR_video_encode_queue` plus a codec,
`virglrenderer`, the two stores, the `io` cgroup controller,
`virtiofsd`. Pass / fail / **unknown**, and unknown is never collapsed
into fail — a machine we could not ask is not a machine that failed, and
losing a capable host to a missing `lspci` is the failure mode that
matters.
- **Measures upstream and, the point of the whole thing, added latency
under load.** Grade bands come from the frame budget rather than
convention: the network allowance is ~40 ms because render, encode,
decode, display and jitter buffer have already spent ~58 ms.
- **Reads Steam, only with an explicit yes**, for library size and shape
plus an hour-of-day histogram of launches — one sample per title, which
is a real distribution obtained without asking anybody anything.
- **Asks at most five questions**, branched on what was found, all
skippable.

## No server

Nothing is uploaded and no telemetry endpoint exists. The network test
talks to Cloudflare's public speed-test sink and to `1.1.1.1`, neither
of which is ours. The output is a line on the terminal that the person
may choose to paste.

The shareable line carries **no hostname, IP, username, game title or
path** — a size band rather than a size, hours rather than dates. The
long version, which does include titles and paths, stays in a local JSON
file the person is told the path of.

That is a property of the design and not a promise about our intentions:
there is nothing to switch on later.

```
nesdoctor 0.1.0 | linux/x86_64 | gpu=AMD Barcelo | cpu=12t ram=13G |
kvm=y venc=y zfs=n boxfs=n io=y | up=28Mbps rtt=179ms bloat=+19ms grade=B |
disk=91G | edge=KE/JNB | steam=1 titles/<100G | plays=20-03h n=74 |
role=- share=- pays=- | HOST-READY-LOCAL
```

## Five bugs found by running it, every one of which would have produced
wrong data

- **`vulkaninfo --summary` lists ZERO `VK_KHR_video` entries** where
full `vulkaninfo` lists five on the same machine. Preferring the summary
reported "not advertised" on a card that advertises it — a false
negative on the check most likely to disqualify a host.
- **btrfs subvolumes counted as separate disks**: `/`, `/home` and
`/srv` each reporting 91 GiB of one 91 GiB device. Now deduped by
backing device, which the two-stores check needs anyway since it wants
*separate devices*.
- **Proton and the Steam Linux Runtimes are installed like games and are
not games.** Five of eight entries on the test machine, so the title
count was 5× too high and the library-shape question was corrupted.
- **`--quiet` printed the whole questionnaire** before its summary line,
breaking the one thing `--quiet` promises. Prompts are now skipped when
output is quiet or stdin is not a terminal — and a pipe is explicitly
*not* treated as consent to read a Steam library, unlike `--yes`.
- Boot history was reporting `13.2 h/day` off **two days** of history.
Under a three-day span it now reports the span and no rate.

## One finding, now encoded as a verdict

The development connection measures **179 ms idle RTT, served from
Johannesburg**. That machine passes every other check and cannot host
for a European player, because it is distance and no upgrade shortens
it.

`HOST-READY-LOCAL` exists for exactly that case, and the wording is
deliberate:

> Every requirement passes and your uplink queues cleanly. But the idle
round trip to the nearest major network is already most of the latency
budget, and that is distance rather than a fault: no upgrade shortens
it. So this machine is a good host for people on your side of the world
and cannot be one for anybody else. **If you are somewhere without a
cloud gaming edge, that is not a consolation prize — it is the only way
anyone there gets a playable stream.**

## CI

- **`ci.yml` gains a `nesdoctor` job** — fmt, `clippy -D warnings`,
test, one real run. Scoped to this member deliberately: the rest of the
Rust half has never been under CI, so `--workspace` would turn every PR
red for unrelated reasons. Widen it one member at a time.
- **`release-nesdoctor.yml`** builds four targets on tag `nesdoctor-v*`
— x86_64 linux-musl, x86_64 windows-msvc, aarch64 and x86_64 macOS —
with `SHA256SUMS`. musl rather than glibc so one Linux binary runs on
every distro.

The step that justifies the workflow **runs the binary it just built,
network included**. `ring` under rustls resolves root certificates
through the host trust store, so a static musl build can compile cleanly
and then fail TLS on the machine it ships to — breaking the network
test, silently, and only for other people. The step fails the build if
the summary line comes back `net=unmeasured`.

## Dependencies

Four: `anyhow`, `clap`, `serde`, `ureq`. The VDF parser, every platform
probe and the text wrapping are in-tree. A binary handed to strangers
has a dependency tree that is part of its interface, so anything that
could be done with `std` is.

4 MB release binary.

## What it deliberately does not claim

- **A pass is not a promise.** Every check is a *necessary* condition,
and nothing here runs under load — a machine that passes can still fail
on block I/O.
- **The encode extension being advertised is not proof the path works.**
We have had a correct extension list over a broken path before, so that
row says so.
- **Whether `libvirglrenderer` carries the native-context patches cannot
be determined from outside**, so that row reports presence only and
stays `unknown` rather than `pass`.










<!-- greptile_comment -->

<h3>Greptile Summary</h3>

The PR adds the nesdoctor host-readiness executable, local Steam
analysis, network measurement, installers, CI validation, and
multi-platform release packaging. Two attempted correctness fixes remain
incomplete:
- physical disk deduplication does not resolve common device-mapper
source names before comparing backing devices
- unknown historical Steam appids can still be counted as game launches
without passing runtime filtering

<h3>Confidence Score: 3/5</h3>

The PR is not yet safe to merge because shared LVM-backed stores can be
reported as physically independent and unknown Steam tools can still be
reported as game launches.

The new disk resolver fails open for common device-mapper names,
preserving a false host-readiness verdict, while Steam history still
counts absent appids without determining whether they are games or
runtime tools.

**Files Needing Attention:** apps/nesdoctor/src/sys.rs,
apps/nesdoctor/src/hostreq.rs, apps/nesdoctor/src/steam.rs

<h3>Important Files Changed</h3>




| Filename | Overview |
|----------|----------|
| apps/nesdoctor/src/sys.rs | Adds system and disk discovery, but
unresolved device-mapper names undermine physical-backing comparisons. |
| apps/nesdoctor/src/hostreq.rs | Implements host requirement verdicts
and uses physical-device sets that can falsely classify shared LVM
backing as independent. |
| apps/nesdoctor/src/steam.rs | Adds manifest and launch-history
analysis, but unknown appids bypass runtime classification and
contaminate launch metrics. |
| apps/nesdoctor/src/net.rs | Adds bounded upload-based upstream and
bufferbloat measurement; the previously reported unbounded request path
is addressed. |
| .github/workflows/release-nesdoctor.yml | Builds, smoke-tests,
packages, checksums, and publishes the four release targets. |
| .github/workflows/ci.yml | Adds focused formatting, linting, testing,
and offline execution checks for nesdoctor. |


<h3>Flowchart</h3>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Run[nesdoctor] --> Host[Host requirement probes]
  Run --> Net[Upload and latency measurement]
  Run --> Consent{Steam consent}
  Consent -->|yes| Steam[Installed manifests and LastPlayed records]
  Host --> Physical[Resolve filesystem sources to physical devices]
  Physical --> Verdict[Host readiness verdict]
  Net --> Report[Detailed JSON and shareable summary]
  Steam --> Report
  Verdict --> Report
```

<details><summary>Prompt To Fix All With AI</summary>

`````markdown
### Issue 1
apps/nesdoctor/src/sys.rs:369-374
**Mapper devices remain unresolved**

When root and box-store filesystems are separate LVM or dm-crypt mappings on the same physical disk, `df` supplies `/dev/mapper/...` names that do not exist under `/sys/class/block`. This branch returns those unrelated logical names unchanged, so the overlap check passes stores that still share one physical I/O queue.

### Issue 2
apps/nesdoctor/src/steam.rs:247-250
**Unknown appids bypass runtime filtering**

If `localconfig.vdf` retains `LastPlayed` data for an uninstalled Proton build, Steam runtime, or other non-game tool, its appid is absent from the installed-manifest map and this branch treats it as an uninstalled game. The tool activity then changes the launch histogram, peak window, and shareable `n` value.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
`````

</details>

<sub>Reviews (5): Last reviewed commit: ["fix(nesdoctor): three valid P1
findings
..."](7afc8929a6)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=59231233)</sub>

> Greptile also left **2 inline comments** on this PR.

<!-- /greptile_comment -->
2026-09-02 12:52:47 +03:00