Skip to content

feat(ci): gate the coordinated-omission invariant, which nothing checked - #62

Merged
DanielWLiu07 merged 2 commits into
mainfrom
feat/gate-the-coordinated-omission-invariant
Sep 1, 2026
Merged

DanielWLiu07 merged 2 commits into
mainfrom
feat/gate-the-coordinated-omission-invariant

Conversation

@DanielWLiu07

Copy link
Copy Markdown
Owner

docs/bench/latency.md's headline is that the published p99 was a service time and 13.3x optimistic — 115.7 µs service against 1,533.9 µs response in the same run.

Nothing in CI checked any part of it. The perf gate has twenty checks and not one touched a latency figure.

What's gated: the relationship, not the microseconds

Absolute latency on a shared runner is noise, and a tight bound there would be flaky. So the gate asserts what cannot vary by machine:

Response time is service time plus a wait. A wait cannot be negative. Therefore response p99 >= service p99.

That holds on every machine that has ever existed. If it ever fails, the harness is reading the wrong clock and every number in latency.md is suspect rather than merely stale.

A 100-step synthetic session paced at 1x costs ~10s of wall time — which is what a paced run costs by definition, since it's supposed to wait. Locally it separates cleanly:

paced replay: service p99 82.041 us, response p99 2964.229 us
gate ok    paced replay ran = 1.0  (v == 1)
gate ok    response >= service = 1  (v == 1)
gate ok    service p99 (us) = 82.041  (v <= 20000)

Two tests pin the JSON the gate reads

The paced block carries response_us and pacing when a speed was given — and must be absent otherwise, since a gate reading a response time off an unpaced run would be comparing a measurement against itself.

Validated by breaking it, both ways

injected fault result
invert the comparison GATE FAIL response >= service: 0 violates v == 1
rename the JSON key GATE FAIL response >= service: value missing from replay output

That second one is the || true fix from PR #57 doing its job — before it, a renamed key killed the script with no diagnostic.

228 tests pass.

docs/bench/latency.md's headline is that the published p99 was a service
time and 13.3x optimistic - 115.7 us service against 1,533.9 us response
in the same run. Nothing in CI checked any part of it. The perf gate has
twenty checks and not one of them touched a latency figure.

What is gated is the structural relationship, not the microseconds.
Absolute latency on a shared runner is noise and a tight bound there would
be flaky, so the gate asserts what cannot vary by machine: response time
is service time plus a wait, a wait cannot be negative, therefore
response p99 >= service p99. That holds everywhere. If it ever fails the
harness is reading the wrong clock, and every number in latency.md is
suspect rather than merely stale.

A 100-step synthetic session paced at 1x costs about ten seconds of wall
time, which is what a paced run costs by definition - it is supposed to
wait. Locally it separates cleanly: 82 us service against 2,964 us
response.

Two tests pin the JSON the gate reads: the paced block carries
response_us and pacing when a speed was given, and must be absent
otherwise, since a gate reading a response time off an unpaced run would
be comparing a measurement against itself.

Validated by breaking it both ways. Inverting the comparison fails with
"response >= service: 0 violates v == 1"; renaming the key fails with
"value missing from replay output" rather than killing the script, which
is the `|| true` fix from the previous gate doing its job.
`mktemp -t basis_pace` works on BSD, where -t takes a bare prefix. GNU
mktemp requires XXXXXX in the template and fails without it, so on the
ubuntu perf-gate runner the assignment errored and `set -euo pipefail`
killed the script before any of the three new checks ran.

The failure was almost invisible in the log: every earlier check printed
"gate ok", nothing printed after them, and the job ended with exit code 1.
It reads like the gate passing and then failing for an unrelated reason.

Template is now "${TMPDIR:-/tmp}/basis_pace.XXXXXX", which both accept.

Same shape as the libc++ / libstdc++ include problem two weeks ago: "it
works here" is a claim about one platform, and the Linux job is the only
thing standing between that claim and a broken build.
@DanielWLiu07
DanielWLiu07 merged commit ae277cf into main Sep 1, 2026
9 checks passed
@DanielWLiu07
DanielWLiu07 deleted the feat/gate-the-coordinated-omission-invariant branch September 1, 2026 01:58
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