Code review of 2026-10-20/21 work: 30 findings — the per-card probe bug, the gate that fails open, and a false refresh-rate ceiling in main #60

Closed
opened 2026-10-21 00:48:13 -07:00 by dank · 2 comments
Owner

Two-axis review (Standards / Spec) of everything landed 2026-10-20 → 2026-10-21: 51 commits, 102 files, aec7f0f0…origin/main. 30 findings. This issue is the work list for one fix branch; each finding is pinned to file:line so nobody re-derives it.

The one that changes behaviour on the bench

  • scripts/pcie-probe.sh:124 sets HIP_VISIBLE_DEVICES="$d" and passes "$d" as argv; scripts/probes/pcie_bw.hip:34 calls hipSetDevice(atoi(argv[1])). Under a single-device mask only ordinal 0 is valid, so --device 1 answers setDevice(1) failed and yields no bandwidth number. Per-card numbers — the entire point of the instrument — are unobtainable on the 2×R9700 box. tests/pcie-probe.bats:126 asserts the stub's echo of the env var, so the suite cannot see it.
  • scripts/pcie-probe.sh:121-125 never inspects a probe's exit status: a segfaulting probe still exits 0, against the header's own "Exit status: 0 measured" and the file's own note that hipGetDeviceProperties segfaults on this ROCm build.
  • scripts/pcie-probe.sh:66 — no fuser (psmisc) means the /dev/kfd half of the busy guard disappears in silence, leaving gpu_busy_percent, which reads 0 for a resident-but-idle service. That is measurement beside a live service, which the LAW comment in the same file forbids.

The one that writes a wrong manifest

  • scripts/pkg-inventory.sh:116 never subtracts $TMP/orphans from $TMP/additions, so an explicitly-orphaned package is reported as drift and emitted by --emit as a manifest line install.sh will install on a rebuild. tests/pkg-inventory.bats:134 is vacuous: its python-hatchling never reaches the additions set.

The fail-closed gate that fails open

  • .githooks/pre-commit:54,64 — newline-split git diff --cached --name-only quotes non-ASCII paths; the quoted name returns an empty diff and is continued in silence. Latent today (no such path is tracked), but the hook advertises fail-closed.
  • .githooks/pre-commit:72 — the placeholder filter is whole-line, not value-scoped, so an assignment line carrying a placeholder word anywhere is exempt from the assignment rule.
  • .githooks/pre-commit:78 — report+= ends on a command substitution, so the next filename is glued onto the previous file's last hit and the report misattributes the leaker.
  • scripts/deploy.sh:145-147 — any state but ""/disabled prints ENABLE … after a swallowed enable failure. live-sync.service has no [Install], reports linked, and every deploy claims it enabled a unit that cannot be enabled.
  • scripts/kb-lint.sh:75 — the wikilink resolver walks the whole tree, so [[log]] still resolves into omp-docs/core/.AGENTTRASH/log.md: a quarantined page stays in circulation, which is the failure #57 exists to prevent.

The false fact in main, and how it got there

omp-docs/tools/niri/displays.md:49 and omp-docs/log.md:26-29 assert that the Sceptre M34's EDID tops out at 180 Hz and that no 240-class mode exists. Measured on blankpad after the merge: niri msg outputs lists 3440x1440@239.998. The real cause of the 60 Hz was a one-character mismatch — the profile asked 239.999, the panel offers 239.998, and niri matches mode strings verbatim, falling back to preferred (59.998) without failing. The durable law is the verbatim-match rule, not a refresh-rate ceiling.

Decision recorded by Frank 2026-10-21: 180 stays the deployed mode deliberately — the link is degraded (card0 at x8 32.0 GT/s against a max of x16) and the display engine is throwing EINVAL, so the 240-class mode is not driven until the driver state is cleared by a reboot. The docs must state the ceiling correctly and the reason for the lower value, so the next reader does not "restore 240" blind or re-pin 180 as a hardware limit.

Prose and tier corrections

  • omp-docs/inventory/index.md:3,5 and omp-docs/index.md:60-61 advertise the census's pre-#40 scope; okf-spec.md:105 requires index entries carry the page's own description.
  • dotfiles-deploy.md:57 + .gitignore:89 re-fetch command curl -L https://wallhaven.cc/w/<id> returns text/html; the API path https://wallhaven.cc/api/v1/w/<id> → data.path is the direct CDN URL.
  • references/okf-maintenance.md:41,61 vs references/okf-spec.md:127,160 teach opposite link rules.
  • omp-docs/tools/noctalia-shell.md:422 still lists wlr-randr, which is not installed; log.md:42 overcounts the pages fixed.
  • tools/packages.md:81-83 records the #51 known gap without naming nirimod-git; decisions/index.md:4 credits kb-lint with coverage checks that belong to kb-coverage.py; AGENTS.md:96-106 restates the facts it disclaims and cites a glossary page that is deliberately absent.
  • .gitignore has no rule for natives/ (2.4 MB of harness tree-sitter grammars in the repo root) and none for */Noctalia*, which deploy.sh:51-53 excludes — the tracked-but-never-deployed fiction class #41 removed.
  • packages/common.pkgs:21 justifies git-lfs by wallpapers this diff untracked; .gitattributes' four LFS filters now match nothing tracked.
  • swayidle-lock.service:2 Description=… suspends on lid is the last surviving copy of the claim 4666d0d retired.
  • Work-log doctrine is stated near-verbatim in four owners (okf-spec.md:60, okf-maintenance.md:24, log.md:19, agent/APPEND_SYSTEM.md:72) — keep it in one, link from the rest.

Deliberately not here

Splitting the swayidle/lock triage out of dotfiles-deploy.md (Divergent Change: eleven ## Law: sections, one page). The description and index line get widened instead; the split is a judgement call Frank has not made. No history rewrite for the LFS blobs, per #40's non-goal.


cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05

Two-axis review (Standards / Spec) of everything landed 2026-10-20 → 2026-10-21: 51 commits, 102 files, `aec7f0f0…origin/main`. 30 findings. This issue is the work list for one fix branch; each finding is pinned to file:line so nobody re-derives it. ## The one that changes behaviour on the bench - `scripts/pcie-probe.sh:124` sets `HIP_VISIBLE_DEVICES="$d"` **and** passes `"$d"` as argv; `scripts/probes/pcie_bw.hip:34` calls `hipSetDevice(atoi(argv[1]))`. Under a single-device mask only ordinal 0 is valid, so `--device 1` answers `setDevice(1) failed` and yields no bandwidth number. Per-card numbers — the entire point of the instrument — are unobtainable on the 2×R9700 box. `tests/pcie-probe.bats:126` asserts the stub's echo of the env var, so the suite cannot see it. - `scripts/pcie-probe.sh:121-125` never inspects a probe's exit status: a segfaulting probe still exits 0, against the header's own "Exit status: 0 measured" and the file's own note that `hipGetDeviceProperties` segfaults on this ROCm build. - `scripts/pcie-probe.sh:66` — no `fuser` (psmisc) means the `/dev/kfd` half of the busy guard disappears in silence, leaving `gpu_busy_percent`, which reads 0 for a resident-but-idle service. That is measurement beside a live service, which the LAW comment in the same file forbids. ## The one that writes a wrong manifest - `scripts/pkg-inventory.sh:116` never subtracts `$TMP/orphans` from `$TMP/additions`, so an explicitly-orphaned package is reported as drift and emitted by `--emit` as a manifest line `install.sh` will install on a rebuild. `tests/pkg-inventory.bats:134` is vacuous: its `python-hatchling` never reaches the additions set. ## The fail-closed gate that fails open - `.githooks/pre-commit:54,64` — newline-split `git diff --cached --name-only` quotes non-ASCII paths; the quoted name returns an empty diff and is `continue`d in silence. Latent today (no such path is tracked), but the hook advertises fail-closed. - `.githooks/pre-commit:72` — the placeholder filter is whole-line, not value-scoped, so an assignment line carrying a placeholder word anywhere is exempt from the assignment rule. - `.githooks/pre-commit:78` — `report+=` ends on a command substitution, so the next filename is glued onto the previous file's last hit and the report misattributes the leaker. - `scripts/deploy.sh:145-147` — any state but `""`/`disabled` prints `ENABLE …` after a swallowed `enable` failure. `live-sync.service` has no `[Install]`, reports `linked`, and every deploy claims it enabled a unit that cannot be enabled. - `scripts/kb-lint.sh:75` — the wikilink resolver walks the whole tree, so `[[log]]` still resolves into `omp-docs/core/.AGENTTRASH/log.md`: a quarantined page stays in circulation, which is the failure #57 exists to prevent. ## The false fact in `main`, and how it got there `omp-docs/tools/niri/displays.md:49` and `omp-docs/log.md:26-29` assert that the Sceptre M34's EDID tops out at 180 Hz and that no 240-class mode exists. Measured on blankpad after the merge: `niri msg outputs` lists `3440x1440@239.998`. The real cause of the 60 Hz was a one-character mismatch — the profile asked `239.999`, the panel offers `239.998`, and niri matches mode strings **verbatim**, falling back to *preferred* (59.998) without failing. The durable law is the verbatim-match rule, not a refresh-rate ceiling. Decision recorded by Frank 2026-10-21: **180 stays the deployed mode deliberately** — the link is degraded (card0 at x8 32.0 GT/s against a max of x16) and the display engine is throwing `EINVAL`, so the 240-class mode is not driven until the driver state is cleared by a reboot. The docs must state the ceiling correctly and the reason for the lower value, so the next reader does not "restore 240" blind or re-pin 180 as a hardware limit. ## Prose and tier corrections - `omp-docs/inventory/index.md:3,5` and `omp-docs/index.md:60-61` advertise the census's pre-#40 scope; okf-spec.md:105 requires index entries carry the page's own description. - `dotfiles-deploy.md:57` + `.gitignore:89` re-fetch command `curl -L https://wallhaven.cc/w/<id>` returns `text/html`; the API path `https://wallhaven.cc/api/v1/w/<id>` → `data.path` is the direct CDN URL. - `references/okf-maintenance.md:41,61` vs `references/okf-spec.md:127,160` teach opposite link rules. - `omp-docs/tools/noctalia-shell.md:422` still lists `wlr-randr`, which is not installed; `log.md:42` overcounts the pages fixed. - `tools/packages.md:81-83` records the #51 known gap without naming `nirimod-git`; `decisions/index.md:4` credits `kb-lint` with coverage checks that belong to `kb-coverage.py`; `AGENTS.md:96-106` restates the facts it disclaims and cites a glossary page that is deliberately absent. - `.gitignore` has no rule for `natives/` (2.4 MB of harness tree-sitter grammars in the repo root) and none for `*/Noctalia*`, which `deploy.sh:51-53` excludes — the tracked-but-never-deployed fiction class #41 removed. - `packages/common.pkgs:21` justifies `git-lfs` by wallpapers this diff untracked; `.gitattributes`' four LFS filters now match nothing tracked. - `swayidle-lock.service:2` `Description=… suspends on lid` is the last surviving copy of the claim 4666d0d retired. - Work-log doctrine is stated near-verbatim in four owners (`okf-spec.md:60`, `okf-maintenance.md:24`, `log.md:19`, `agent/APPEND_SYSTEM.md:72`) — keep it in one, link from the rest. ## Deliberately not here Splitting the swayidle/lock triage out of `dotfiles-deploy.md` (Divergent Change: eleven `## Law:` sections, one page). The description and index line get widened instead; the split is a judgement call Frank has not made. No history rewrite for the LFS blobs, per #40's non-goal. --- cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05
dank added the ready-for-agent label 2026-10-21 00:48:13 -07:00
Author
Owner

PR open: #61 — fix(#60): checks that lied, and claims the machine stopped honouring (13 commits, fix/60-review-findings → main).

All 30 findings are addressed. Two resolutions changed shape under measurement:

  • The pkg-inventory orphan-subtraction finding is wrong: -Qtdq (installed-as-dependency) and -Qqe (additions) are disjoint by construction — measured 206 explicit, 3 orphans, none in common — so the "missing" subtraction would be dead code that looks like a guard. The real defects were the vacuous test and --help running past the comment block; both fixed, and the boundary the design rests on is now tested (40b9725).
  • .gitattributes is not deleted: its four LFS filters track nothing (git lfs ls-files = 0), but deleting user-authored config is a pruning call with Frank. The file records its own inert state and packages/common.pkgs stops citing it as the reason git-lfs is installed (a280c29).

Gates: 136 bats tests green, kb-lint 0, kb-coverage 0, every behavioural fix run red against pre-fix code first.

Two judgement calls recorded in the PR body for your veto: the dotfiles-deploy.md split (not done), and AGENTS.md keeping the Gitea host:port pointer.


cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05

PR open: https://gitea.franksdank.cloud/dank/command-center/pulls/61 — **fix(#60): checks that lied, and claims the machine stopped honouring** (13 commits, `fix/60-review-findings` → `main`). All 30 findings are addressed. Two resolutions changed shape under measurement: - The `pkg-inventory` orphan-subtraction finding is **wrong**: `-Qtdq` (installed-as-dependency) and `-Qqe` (additions) are disjoint by construction — measured 206 explicit, 3 orphans, none in common — so the "missing" subtraction would be dead code that looks like a guard. The real defects were the vacuous test and `--help` running past the comment block; both fixed, and the boundary the design rests on is now tested (`40b9725`). - `.gitattributes` is **not deleted**: its four LFS filters track nothing (`git lfs ls-files` = 0), but deleting user-authored config is a pruning call with Frank. The file records its own inert state and `packages/common.pkgs` stops citing it as the reason `git-lfs` is installed (`a280c29`). Gates: 136 bats tests green, `kb-lint` 0, `kb-coverage` 0, every behavioural fix run red against pre-fix code first. Two judgement calls recorded in the PR body for your veto: the `dotfiles-deploy.md` split (not done), and `AGENTS.md` keeping the Gitea host:port pointer. --- cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05
Author
Owner

Merged: e690a2c (--no-ff, PR #61: #61), and landed in the deployment checkout by 22d2f3b — ~/.omp is at origin/main and the suite is green there.


cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05

Merged: `e690a2c` (`--no-ff`, PR #61: https://gitea.franksdank.cloud/dank/command-center/pulls/61), and landed in the deployment checkout by `22d2f3b` — `~/.omp` is at `origin/main` and the suite is green there. --- cwd: /home/blank/.omp/wt/wt-20261019-125509-7c8a99d · session: 01a155bb-6474-7366-be9d-629f74af0e05
dank closed this issue 2026-10-21 01:45:47 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dank/command-center#60