Skip to content

Sweep the tree: two correctness defects, six drifted claims, one new check - #248

Merged
aywrite merged 7 commits into
masterfrom
chore/slop-sweep-2
Sep 13, 2026
Merged

aywrite merged 7 commits into
masterfrom
chore/slop-sweep-2

Conversation

@aywrite

@aywrite aywrite commented Sep 13, 2026

Copy link
Copy Markdown
Owner

The occasional whole-tree sweep, run against 7e6ddd7. This revision of it reviews structure and contracts before prose, so the findings are ranked by what a reader or a conclusion loses rather than by how many stylistic hits there were. Seven commits, each reviewable on its own.

Two correctness defects, each its own commit.

  • build_corpus.py --sealed was read, validated and then dropped: corpus() took the set and never passed it to Entry, so rows were labelled by the key split while the fit held out the named group. That is the exact mismatch both halves of the tuner document as the leak the shared module exists to prevent, and following the documented procedure produced it with exit 0. One argument, plus a test that reads 1.0 instead of 0.5 without it.
  • The published image's version label was the string version.workspace = true. grep -m1 '^version' Cargo.toml finds that line in [package], five above the real version under [workspace.package], and it holds no quote for cut to split on. Two other workflows read the same fact with tomllib; this now does too.

Documentation drift. The readme still described the evaluation as material plus piece square tables; it is material, tables, mobility, king safety and pawn structure. Two documents still called mobility a rook count, which it stopped being in the commit below this branch. The roadmap said whether a fit on our own games buys strength was unsettled, where four fits have each passed an sprt since. The architecture map counted four tuner scripts as three, described a split by game that has been by pair for some time, and never listed src/command.rs. The roadmap now also carries the Miri exposure that arche-core/Cargo.toml says it carries.

Comments a reader could act on and be wrong. ordering.rs said the killers and the history score are read by the cutoff census; they are read by model_gate in the playing search, which is where late move pruning and the deep reduction get their score. Three comments still described the mobility skip as active after the refit priced all four kinds. One comment said "both" of three terms.

One new check and two small fixes. The tactical suite now checks that a bm names a move the generator offers, which the strategic suite has always done; all 300 pass, and sabotaging one fails it. The last unpinned action in twelve workflows is pinned, in the job that gates master. A comment paragraph is moved back over the engine it describes.

Behaviour is preserved throughout except in the two defects above, which are the point. The bench reads 3,868,987 on every commit, the count the parent states. Both test runs pass including the debug one, clippy under -D warnings and fmt are clean, and the 264 script tests pass alongside the one added.

🤖 Generated with Claude Code

aywrite and others added 2 commits September 13, 2026 21:25
… the code

Six claims the tree had moved out from under, found by reading the three
documents against the commits since v0.4.3.

The readme said evaluation was material plus piece square tables. It has been
material, tables, mobility, the king's pawn shelter and pawn structure since
the pawn structure term landed, and everything but the material values was
fitted.

Two documents still called mobility a rook count, which it stopped being one
commit ago: the refit priced all four kinds and left no weight at zero, so
`SCORED_KINDS` skips nothing at the leaf. The roadmap and the architecture
overview both said otherwise.

The roadmap said whether a fit on our own games buys strength was not settled.
Four fits have each passed an sprt bounded [0, 10] since, and the entry now
carries their four figures with the caveat that none was measured against the
commit it landed on, which the trailers themselves say. The sentence it opened
with referred to a sentence that had already been edited away.

The architecture map counted four tuner scripts as three, and described
`groups.py` as splitting games by the first byte of a key. The unit has been
the pair since the corpus started keying the two colours of an opening
together, and a sealed set can now be named in a file instead, which is how a
second seal is drawn. `command.rs` has been in `src/` since 2026-09-06 and was
the one module of either crate the map never listed. `fit_attention.py` is
named there now too, since it is described in its own header rather than in
DEVELOPMENT.md, and the section claimed everything was in DEVELOPMENT.md.

The roadmap gains one entry rather than losing a claim. `arche-core/Cargo.toml`
says the roadmap carries the Miri exposure and it did not; the ten unsafe
occurrences, the two where a slip is undefined behaviour rather than a wrong
answer, and the fact that the exposure is carried knowingly are written down
now, so the sentence pointing there is true.

Documentation only. The bench reads 3,868,987, the count this commit's parent
states, and both test runs pass.

Bench: 3868987
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…mment

The refit's provenance comment cited a markdown file for the vector a
preliminary fit predicted. No such file is in this repository, and no
directory of that name either, so the citation sent a reader after something
that is not here.

The prediction is worth keeping and is stated directly instead: `[5,6,5,1]`
and `[0,2,2,7]` against the `[4,6,4,1]` and `[1,3,4,7]` that came out.

A comment only. The bench is unchanged.

Bench: 3868987
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Speed against 7e6ddd71

Both sides built and run on this runner in this job, the way
scripts/speed.sh measures a perf commit. The change is between
medians, and the spread beside it is what the change has to be
read against. The node counts are the search's: they move when
the search does, and a speed change leaves them alone.

round     base nps  candidate nps
    1      8043765        7864593
    2      8220728        7927521
    3      8123857        8045003
    4      8291586        8478206
    5      8608365        8254138
    6      8199959        8554179
    7      8276067        8304507
    8      8465184        8498934
    9      8276687        8424320

             nodes    time  median nps  fastest nps
base       3868987  0.47 s     8276067      8608365
candidate  3868987  0.47 s     8304507      8554179
change                           +0.3%        -0.6%

the change is inside the spread, so the medians make no claim; the
fastest column is the steadier comparison when the machine was not
quiet

Speed: +0.3% (bench nps, 9 interleaved rounds vs 7e6ddd71, spread 8.3%)

aywrite and others added 5 commits September 13, 2026 21:45
`build_corpus.py --sealed` was read, validated and then dropped. `corpus()`
took the set and never passed it to `Entry`, so `Entry._sealed` was always
`None` and `group_of` always fell back to the five-way split on the key.

The documented procedure is to hand the same file to both halves of the tuner,
which `tune.py` honours and `groups.py` and INSTRUMENTS.md both say is what
keeps a corpus from being built to one split and fitted against another.
Following it produced exactly the state those warnings describe, silently and
with exit 0: the rows were labelled by the key split while the fit held out the
named group. A position two groups reached took its label from the wrong
partition, which can carry a sealed game's result into a row the fit reads,
and the `straddled` and `dropped_appearances` counters the run prints were
counted the same wrong way.

One argument, and a test that fails without it. Two games that fall in
different groups by their keys share a position; naming both pairs puts them
in the calibration group together, so the label becomes the mean of the two
rather than the owning game's alone. Before the fix that test reads 1.0 where
it should read 0.5.

A corpus built without `--sealed` is unaffected, since the argument it was
dropping was `None`. Any corpus built with it should be rebuilt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tion

Two defects in the workflows, unrelated to each other but both one line.

The image was labelled with a TOML fragment. `grep -m1 '^version' Cargo.toml`
finds `version.workspace = true` in `[package]`, five lines above the real
`version = "0.4.3"` under `[workspace.package]`. That line holds no quote, so
`cut -d'"' -f2` passes it through whole, and `version.workspace = true` became
`ARCHE_VERSION` and then `org.opencontainers.image.version` on every image
published since the label was added. Nothing caught it: the smoke test checks
the handshake and the book, never a label. `tag-release.yml` and
`prepare-release.yml` read the same fact with `tomllib` and are right; this was
the third reader and the only wrong one. It now reads it the way they do, and
the comment says what the grep did so nobody writes it back.

`bench.yml:62` was the one `uses:` in twelve workflows not pinned to a sha, and
it is the checkout for the `pins` job, which is the only bench check that runs
on a push to master. It now carries the same sha the other three jobs in the
same file already used.

The 264 script tests pass, both edited files parse, and the new read returns
0.4.3 on this tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comments only, no code. Each one a reader could act on and be wrong.

`ordering.rs` said the killers and the history score are read by the cutoff
census. They are read by `model_gate` in the playing search, which is where
the attention score comes from, and the deep reduction and late move pruning
both gate on it with their switches on by default. The census reads them too.
A reader trusting the old comment could gate either accessor behind
`cfg(test)` along with the instrument and take the inputs of a shipped pruning
rule with it.

Three comments still described the mobility skip as active: `eval.rs`,
`board.rs` and `tune.rs` each said `eval` and the tuner's walk no longer ask
for the same kinds. The refit priced all four, so the two sets are equal and
nothing is skipped today. The machinery stays, because it is derived from the
weights rather than written out and a later fit that rounds one to zero turns
the skip back on by itself. The comments now state the rule and say where it
stands, rather than describing a saving the code no longer makes.

`eval.rs` said summing the leaf terms is exact "since both are pairs", written
when there were two. There are three.

Four paragraphs are rewrapped where an insertion stopped at the edge of its
diff, leaving one line of 115 characters in INSTRUMENTS.md and one of 136 in
ARCHITECTURE.md, in files that wrap at about 76.

The bench reads 3,868,987, both test runs pass and clippy is clean.

Bench: 3868987
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`run_suite` decides a pass by comparing the `bm` string against the move the
search played, and `tactics.epd` is converted from san by a script. A `bm` the
generator can never emit is therefore a position that can never pass, counted
as a miss inside `EXPECTED_PASSES` with nothing saying why. The test named
`every_position_parses_and_names_a_move` checked only that the string was not
empty, which is less than its name claims.

The check is the one `strategy.rs` has carried since it was written: generate
the moves and hold every graded move against them. Ported rather than
invented, and the strategic suite is where to look for the reasoning.

All three hundred positions pass it, so nothing was hiding. Sabotaging
WAC.001's `bm` to a move the position does not offer fails the test with
"WAC.001 names a1a2, which it does not offer", which is what says the check
can fail.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The comment describing Cinnamon's build sat immediately above `weiss`, run
together with Weiss's own paragraph, and the `cinnamon` block below had none.
Every other engine in the file carries its own paragraph, which is how the
file records where a build departs from the project's own instructions, so the
one block that deviates most read as having nothing to say.

The two paragraphs are split and the Cinnamon one moved down to the block it
describes. No build changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aywrite
aywrite merged commit 0b7c624 into master Sep 13, 2026
19 of 20 checks passed
@aywrite
aywrite deleted the chore/slop-sweep-2 branch September 13, 2026 11: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