`scripts/constant-fields/`, plus a section in `AGENTS.md` next to `dead-state`. Tooling and docs only; no crate code. `dead-state.sh` answers "does anything read this?". It cannot answer "does this ever say anything?" — a counter with a live reader earns nothing if the branch that would move it is never taken, and that is invisible in the source. Both removals behind `930c6f0` and `f80f719` were found this way and neither was reachable by reading code: `id_hits` looked like a per-page counter, and the four `war_*` licence buckets looked like four quiet measurements. The script parses every `key=value` field out of the always-on log and reports those with exactly one distinct value. Two details that are load-bearing: - **Bucket by emitting line family, not by field name.** `reason=` is constant on one family and varied on another; grouping by name alone cancels them and the constant one is never reported. The family is the token after the `OFF` marker. - **Its own control** is that it re-finds `gva_write gpa_match=0` — the write-gate probe `d128fc1` deleted for exactly this reason. If a run stops reporting that on a pre-`d128fc1` log, the parser has drifted rather than the log having improved. It reports 95 fields at the default threshold on the current 60 MB log, so this is a backlog, not a one-off. The README records the triage rules, because most of those 95 are legitimate: a standing alarm reading zero is working, and so is a host capability constant like `frame_shift=12` or a probed device feature. It also records the type-11 ladder's warning — 12/5/8/0 undriven against 31 916/1 694/705/150 driven — because an undriven boot is quiet enough to talk someone into deleting a live rung. The shape that actually convicts, and the reason the `war_*` cluster survived an earlier session's review: **a bucket downstream of another bucket that is itself always zero.** Four zeros read as four quiet measurements; the fifth zero (`war_mapping`) showed the four were unreachable. Verified: `scripts/constant-fields/constant-fields.sh` runs clean against `/tmp/reims-vgpu-fail.log` and reproduces both findings plus its own control. No crate code touched, so no test or clippy run was expected to change and none is claimed. Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
3.1 KiB
Markdown
65 lines
3.1 KiB
Markdown
# constant-fields
|
|
|
|
Reports always-on log fields that only ever take **one** value.
|
|
|
|
```sh
|
|
scripts/constant-fields/constant-fields.sh [logfile] [min-samples]
|
|
# defaults: /tmp/reims-vgpu-fail.log, 200
|
|
```
|
|
|
|
## Why this finds things reading the source cannot
|
|
|
|
`observe/` is large and almost every counter looks live in the source. What the
|
|
source does not show is whether a branch that would move a field is ever taken.
|
|
A field printed 12 000 times with the same value is not a measurement — it is
|
|
either **structurally impossible** or **vestigial**, and both are removable.
|
|
|
|
The sweep's own control is that it re-finds `gva_write gpa_match=0`, the write-gate
|
|
probe deleted in `d128fc1` for exactly this reason. If a run stops reporting that
|
|
on a pre-`d128fc1` log, the parser has drifted.
|
|
|
|
Two towers it found on first use:
|
|
|
|
- `type4 id_hits=0`, 12 172 samples. The page loop returns on the first
|
|
untranslatable page, so any page that advances the counter also exits before
|
|
the census line. Its sibling route `type4_identity_pages` turned out to have a
|
|
distribution identical to `type4_translate_refused` — a duplicate counter — and
|
|
the whole thing measured the counterfactual of an identity guess deleted in
|
|
`6a3d878`.
|
|
- `guest_write_footprint war_licensed/superseded/unstated/unattributed=0`, 6 655
|
|
samples. The licence tally only increments on the mapping rail, and
|
|
`war_mapping` is *also* always zero, so the four buckets split a population
|
|
that has never had a member. The `WriteLicence` parameter was threaded through
|
|
the per-write, per-frame `mark()` hot path to fill them.
|
|
|
|
That second one is the shape worth internalising: **a bucket downstream of
|
|
another bucket that is itself always zero.** Four zeros looked like four quiet
|
|
measurements until the fifth zero showed they were unreachable.
|
|
|
|
## Bucketing by line family is load-bearing
|
|
|
|
Field names repeat across unrelated families. A `reason=` that is constant on one
|
|
line family and varied on another cancels out if you group by field name alone,
|
|
and the constant one is never reported. The script keys on `(family, field)`,
|
|
taking the family from the second whitespace field — the token after the
|
|
`OFF`/verbose marker.
|
|
|
|
## What a constant field can legitimately be
|
|
|
|
Do not cut on the report alone. Read the emitting code. These are all fine:
|
|
|
|
- **A standing alarm reading zero.** It is doing its job. `host_cache_levels
|
|
gva_cap_wanted=0` is the GVA cap's harm reading, deliberately kept by `d16dd43`
|
|
after the opposite claim turned out to be wrong.
|
|
- **A capability or geometry constant** for this host: `frame_shift=12`,
|
|
`gva_cap_bytes=134217728`, a probed device feature.
|
|
- **An arm the workload never reached.** The type-11 ladder's own doc records
|
|
that an undriven boot reported 12/5/8/0 where a driven one reported
|
|
31 916/1 694/705/150 — "quiet enough to talk someone into deleting it". Drive
|
|
the guest before believing a zero, and prefer the whole accumulated log over
|
|
one boot.
|
|
- **A support-matrix cell** selected by a host *capability* rather than by the
|
|
workload, per `AGENTS.md`.
|
|
|
|
The report points at code; it does not convict it.
|