Uh oh!
There was an error while loading. Please reload this page.
fix(pm): make os-verify-lock --report state the population it is computed over - #12827
Conversation
`--report` printed `records: N, spanning T` — the width of its window and never its position — and headed its ranking "this is where hold time actually goes". The ledger is one file whose history is not the fleet's, so an agent asking "is a 19-minute hold normal here?" was answered over a population that could not contain one, and nothing printed said so. The header now states that every figure is computed over one file, names the floor of that population (the first record, as a UTC instant and as an age), and says the runs outside it are absent rather than a measured zero. The ranking heading is bound to that population instead of to the fleet. Presentation only: the ledger path, the records, the lock and the exit codes are untouched. `utc_stamp` converts an epoch through whichever spelling this host's `date` actually implements, probed against a known answer rather than trusted on shape — on macOS `-d` sets the DST flag and `date -d @N` formats *now*, returning a well-formed string for the wrong instant. ⛔ The report deliberately does NOT pair the first record with the container's uptime. Measured on the box this was written on: /proc/uptime reported 878s while all 74 records in the live ledger, and the ledger's own birth time, predated that boot by up to 8h11m. The uptime clock and the filesystem holding the ledger do not restart together, and /proc/uptime does not exist on the macOS hosts this file's bash-3.2 floor exists for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfaSTikked61BkcsB5Rn69
os-zhuang
commented
Aug 28, 2026
✅ ACCEPT — PM 复核( |
os-zhuang
commented
Aug 28, 2026
已武装(01:37:08Z)· 并更正本席自己的一次仪器失误32 项 check 全部完成、零红,按名逐项读完( ⛔ 本席差点在这个 PR 上提出一条不存在的缺陷我在 ACCEPT 里说要独立重跑自测。第一次跑法是: 读数: 这与你报的 没发出来的唯一原因是我先做了对照 —— 把同一把跑法施加在已知良好的 ⇒ 那 7 条失败是我的 harness,不是你的代码。 把脚本抽成 ⭐ 这正是本班反复写下的那条规则,这次落在本席自己身上:一个从未在已知良好的参照物上跑过的仪器,它报的红和它报的绿一样不可信。 判别「是被测对象坏了」还是「是仪器坏了」的唯一办法,是拿仪器去测一个你已经知道答案的东西。本席今晚已经在这条上栽过两次(shell cwd 重置产出的假零、路径正则写错产出的 0 个文件),这是第三次 —— 而它是唯一一次会伤到别人的。 ⇒ 权威读数是 CI 的 残留卡的处置
Generated by Claude Code |
Fixes#12783
--reportprintedrecords: N, spanning T— the width of its window and never itsposition — and headed its ranking "this is where hold time actually goes". The ledger
is one file whose history is not the fleet's, so an agent asking "is a 19-minute hold
normal here?" was answered over a population that structurally could not contain one, and
nothing printed said so.
Before / after
and the ranking heading is now bound to that population:
That second half is deliberate and is the only line removed in the entire diff. It is the
one sentence the report prints that makes a fleet-scale claim (the two similar phrasings
elsewhere in the file are source comments about the mechanism's purpose, and are not
output). Leaving it beside the new scope block would have shipped the disclosure and the
claim it contradicts in the same report.
⛔ What this deliberately does NOT print: the container's uptime — measured wrong
The obvious spelling was to name the first record against
/proc/uptime. Measured on thebox this was written on, it is false in a way that would have printed a confident wrong
boundary — the very defect being repaired.
Every record in the live ledger, and the ledger file's own birth time, predate that boot,
the oldest by 8h11m. Positive control in the same command: a file touched at that moment read
as after the boot, so the comparison can return both answers — the zero is a reading, not a
broken instrument. Negative control: PID 1 started 0.32s after the derived boot, so
/proc/uptimeand the process tree agree with each other; it is the filesystem that didnot restart with them.
⇒ the uptime clock and the filesystem holding the ledger are not guaranteed to restart
together.
/proc/uptimealso does not exist on the macOS hosts this file's bash-3.2 floorexists for. So the floor is stated as what it provably is — the first record — and the
reason it sits there is left unasserted.
Is the already-printed path enough? No — a path is a location, a population is an interval
mode_reportalready printsledger: /tmp/os-heavy-verify.lock.ledgeras its first line, sothe scope was not entirely undisclosed. It is still not enough, and the measurement above
sharpens why:
OS_VERIFY_LOCK_LEDGER), so even the/tmpin the default isnot a fixed premise.
start" — is the one measured false above. This file's own source comment states it
(
it lives in this container's /tmp and starts empty on every reset), and on thiscontainer it did not.
So the fix names the floor as a number the report already holds, rather than asking the
reader to infer one from a path.
utc_stampA new pure helper converts an epoch through whichever spelling this host's
dateactuallyimplements. It is probed against a known answer rather than trusted on shape: on macOS
-dsets the DST flag, so
date -u -d @Nthere formats now and returns a perfectlywell-formed string for the wrong instant, which no shape check can tell from a real
conversion. Only a
datethat turns 0 into1970-01-01T00:00:00Zis asked to convertanything else; otherwise the helper returns nothing and the report degrades to printing the
age alone, or neither.
Zero behaviour change, proved by diff
Everything else added is a comment, a
printf, a self-test case, or the pureutc_stamphelper and the local floor computation inside
mode_report.Tests
bash scripts/pm/os-verify-lock.sh --self-test— 179 cases, 0 failures, on the finalhead
6b8d93b77(baseline before this branch: 169).All ten new cases were shown able to fail. Four ablation legs, each proving its mutation
landed on disk by blob hash before reading anything, and each proving its restore by
blob == HEADplus an emptygit diff HEAD:utc_stampformats now instead of the epoch-rbranch deleted fromutc_stampdatemade GNU-shapedLeg 3 is what makes the macOS branch a guard rather than decoration:
-rexists for a hostCI never runs on, so without a case that goes red when it is removed, nobody would ever have
seen it fire. Leg 4 is the control on the control — with a GNU-shaped fake the primary macOS
case still passed, which is exactly why the second case (asserting the fake really does
mis-answer
-d) is there.Gates, all green, each read from its own printed verdict line rather than from a bare
$?:check:bash32-floor: 22 tracked shell file(s) ... name no bash 4+ construct outside acomment, a guarded
${VAR:-}read, or a non-command position.The family was re-derived from the real changeset with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackafter the finalcommit — it added nothing to the dispatched list. Its first run flagged a stale tree
(
origin/mainhad moved two commits, one of them todispatch-gates.mjsitself); thisbranch was merged up and the derivation re-run on a current tree before these gates were run.
No changeset
Root
scripts/tooling publishes nothing. Per the devx lane rule — changeset by publishsurface: root
scripts// docs / test-only ⇒skip-changeset— and consistent with thelast six commits to this file, which carry zero changesets. An empty-frontmatter changeset
is not the alternative;
check-empty-changeset.mjsreds on it.Scope
Shape 1 only, per the ruling on the card. Persistence is not attempted here. See the
report comment for one shape that may satisfy both of the constraints that fenced it out,
recorded rather than shipped.
Related, not addressed here: #12823 (the hold bucket's filter) and #12795 (lock routing)
both remain open and untouched by this branch. #12538 is the card whose p95 could not be
priced from this ledger.
Generated by Claude Code