Conversation
The `ALONE:` line compared the wide run's headline with the isolated re-run's byte for byte, so an assertion that prints what it measured wrote a different sentence every time it fired and the arm claimed a second defect. Nightly `ci` run 35072262489 is the case: one assertion, two boots, `0.303 s` and `0.300 s`, reported as `red again on a DIFFERENT failure — it failed twice, on two assertions`. That is the larger of the two findings, so the defect sent an adjudicator looking for a second defect that does not exist, and it did it to every timing, counting or sizing assertion in the suite. `toyos_build::alone::same_failure` decides it instead, on a rule derived from what the two cases are rather than fitted to the sentences that produced them: what differs between two readings of one assertion is a measurement, and what differs between two failures is an identity. So only what is unmistakably a measurement is taken out before the comparison — a number carrying a unit of time or size (`0.303 s`, `1007 ms`, `12 MiB`), and the time in a kernel record's stamp, which no two boots write the same. Everything else stays: `slot 1` against `slot 2`, a port, an APIC id, a CPU, an opcode, a register, a count with no unit. Merging two of those would lose the larger finding, which is the defect this module exists to stop, so the rule refuses to guess. The limit that carries is stated in the module header and pinned by a test: an address is digits with no unit after them, so one assertion printing two addresses — `tests/common/iommu.rs`'s translation verdicts are the shape — still reads as two failures. That is the conservative direction of the same rule, and closing it would need a rule that can tell an address from an index. The negative control is the rule it replaces. Mutation: `reading` returns the literal's length unconditionally, so every standalone number is a reading, unit or not — `cargo build -p toyos-build --lib` exit 0, `cargo test -p toyos-build --lib alone::` exit 101 with three tests red, including `an_index_is_an_identity` on `usb-storage: slot 1 …` against `slot 2 …`. The green arm is 314 passed, 0 failed, and the oracle is the recorded failure itself: the two sentences run 35072262489 printed, quoted as the fixture the classifier has to call one failure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014iqcj4jDKpaiDX8B7CMvmK
Japabu
marked this pull request as ready for review
September 18, 2026 14:31
… tracked Round 2 of the ALONE classifier, against the review of aac1627. **Fixtures.** `two_assertions_stay_two_failures` carried the wording of an unlanded branch — `named {after_start:.3} s after the controller started` — and its doc claimed both sentences open `the first port was named`, which this tree contradicts: `tests/common/usb.rs`'s floor and ceiling both open `the first port was named at`. Both fixtures are now those two assertions at `FIRST_CONNECT_S = 0.4` and the doc says what is true. `an_index_is_an_identity` held truncations rather than lines: the transport break is now the whole line `kernel/src/drivers/xhci/wait/msc.rs` writes, BDF inside the slot and the `Broke::Silence` rendering behind it, as `src/redlist.rs` quotes it off CI; the durability check is `tests/common/volumes.rs`'s whole sentence; the stall line is `kernel/src/heartbeat.rs`'s, `heartbeat: ` included. **Units.** `µs`, `TiB` and `kB` occur in no string literal in `tests/`, `kernel/src`, `userland/`, `src/`, `bootloader/`, `toyos/` or `toyos-abi/` — only in comments and identifiers — and every entry in that list widens a merge that must err toward "different", so all three are gone. `every_unit_is_one_this_tree_prints` pins the remaining ten against the site that prints each, and reds on a unit added without one. **The limit.** The scan closes the spellings it matches and nothing else, and four assertions in this tree render a reading with no unit beside it: `check_physical`'s wake lateness rendered a second time as pipeline depths, the dither floor's percentage, the tone peak's bare count, and the log-drain verdict's `bytes` spelled out. All four read as two failures at two readings, which is the safe direction and was unstated. The module header states it in one sentence, a test per shape asserts `same=false` from that assertion's own wording, and `issues/build/the-alone-classifier-cannot-see-a-reading-with-no-unit.md` records the compromise with its owner, the four sites and two exit conditions. **One decision at the call site.** `said == wide` was a second rule that `same_failure` already subsumes; the two arms reached one verdict and differed only in whether the sentence was quoted once or twice. Now one call, and the reproduction arm always prints `wide:` and `alone:`. The gate asserts which sentence sits under which label, so swapping the two fields — the mis-attribution the line exists to stop, said the other way — reds it; before, that mutation passed. Prose deleted rather than rewritten: the units doc's restatement of the header rule three lines above it, and the narration of the two lines under the kernel-stamp test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014iqcj4jDKpaiDX8B7CMvmK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The suite's
ALONE:line re-runs one red alone and says whether the samedefect came back. It decided that by comparing the wide run's headline with
the isolated re-run's byte for byte, so an assertion that prints what it
measured wrote a different sentence every time it fired and the arm claimed
a second defect. Nightly
cirun 35072262489 is the case: one assertion,two boots,
0.303 sand0.300 s, reported asred again on a DIFFERENT failure — it failed twice, on two assertions. That is the larger of the twofindings, so the defect sent an adjudicator looking for a second defect that
does not exist, and it did it to every timing, counting or sizing assertion
in the suite.
toyos_build::alone::same_failuredecides it instead, on a rule derivedfrom what the two cases are rather than fitted to the sentences that
produced them: what differs between two readings of one assertion is a
measurement, and what differs between two failures is an identity. So only
what is unmistakably a measurement is taken out before the comparison — a
number carrying a unit of time or size (
0.303 s,1007 ms,12 MiB), andthe time in a kernel record's stamp (
[kernel 0.075 cpu0], which no twoboots write the same). Everything else stays, because it names which thing
was observed:
slot 1againstslot 2, a port, an APIC id, a CPU, anopcode, a register, a count with no unit. Merging two of those would lose
the larger finding, which is the defect this module exists to stop.
Every fixture in the module's tests is a line this tree prints, whole: the
floor and ceiling of
tests/common/usb.rs's first-port window, the transportbreak of
kernel/src/drivers/xhci/wait/msc.rswith the controller's BDFinside the slot (the line
src/redlist.rsquotes off CI), the durabilitysentence of
tests/common/volumes.rs, the stall line ofkernel/src/heartbeat.rs. The units list holds ten spellings and each is onean assertion here prints —
µs,TiBandkBoccur in no string literal intests/,kernel/src,userland/,src/,bootloader/,toyos/ortoyos-abi/, and every entry only widens a merge that has to err toward"different", so they are gone.
every_unit_is_one_this_tree_printsholds thelist against the site that prints each.
What the scan does not reach
A scan closes the spellings it matches. A reading rendered with no unit
beside it reads as an identity, so one assertion printing two of them is
reported as two failures — the safe direction, and four assertions in this
tree are in it:
check_physical's wake lateness rendered a second time aspipeline depths, the dither floor's percentage, the tone peak's bare count,
and the log-drain verdict's
bytesspelled out, which is notB. The moduleheader states the limit in one sentence, a test per shape asserts
same=falsefrom that assertion's own wording, and
issues/build/the-alone-classifier-cannot-see-a-reading-with-no-unit.mdrecords the compromise with its owner, the four sites and two exit conditions.
The line itself gains one arm: a reproduction at two readings says
red again, the same failure both times — the defect is realand prints the widerun under
wide:and the alone run underalone:rather than picking one.One call decides it — byte equality is a case
same_failurealready answers,so asking it first would be a second rule nothing tests.
The two checks
6630db78(
git status --porcelainempty before and after each, restored by atrap-guarded script):
same_failureisone == other:cargo build -p toyos-build --libexit 0;cargo test -p toyos-build --lib alone::exit 101, 8 passed 3 failed —one_assertion_at_two_measurements_is_one_failure,one_verdict_at_two_kernel_stamps_is_one_failure,an_index_is_an_identity.readingreturns the literal's length unconditionally,so every standalone number is a reading:
cargo build -p toyos-build --libexit 0;
cargo test -p toyos-build --lib alone::exit 101, 4 passed7 failed —
an_index_is_an_identity(slot 1againstslot 2),a_skeleton_keeps_everything_that_is_not_a_reading,one_verdict_at_two_kernel_stamps_is_one_failure,a_reading_rendered_twice_keeps_the_copy_with_no_unit,two_percentages_are_two_failures,two_bare_counts_are_two_failures,bytes_spelled_out_is_not_a_unit.wide:and the wide run's underalone:, which is the mis-attribution thegate exists to stop said the other way:
cargo build -p toyos-build --test toyos-buildexit 0;cargo test --test toyos-build alone_line_reports_the_alone_runexit 1,FAIL alone_line_reports_the_alone_run: "the controller started at 0.303 s, …" is not the line's "wide: " run.sentences nightly
cirun 35072262489 actually printed, which theclassifier has to call one failure, and the pair from run 31424496450 —
xhci_hid_break's endpoint count against its pointer delivery — which ithas to keep apart. The
usb-storagefixture is the line CI produced andsrc/redlist.rsrecords verbatim.Green arms on this host at
6630db78:cargo test -p toyos-build --lib→exit 0, 319 passed, 0 failed, 1 ignored;
cargo test --test toyos-build alone_line_reports_the_alone_run→ exit 0,PASS alone_line_reports_the_alone_run (52µs). Clippy, the root shape assrc/clippy.rsdeclares it with$ADOPTEDexpanded and-D warnings(
--workspace --all-targets --keep-going) → exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_014iqcj4jDKpaiDX8B7CMvmK