Skip to content

Steady the window test on slow builders and drop the version from the code - #15

Merged
dhh merged 3 commits into
masterfrom
steady-slow-tests
Nov 16, 2026
Merged

dhh merged 3 commits into
masterfrom
steady-slow-tests

Conversation

@dhh

@dhh dhh commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Two things the next release needs.

The window test on slow builders

The 0.1.0 package build failed its check() on both omarchy-pkgs builders, in two places of the window test, both from timing rather than behavior:

  • x86_64: the camera-fit check read the view's projection 60 ms after a set change. The view answers from the last frame it drew, and the builder hadn't drawn one yet, so a corner "landed" at -1412 px.
  • aarch64: a piece was expected to be in mid-air exactly 160 ms after its move. On a slow renderer the crouch hadn't finished.

The camera fit is now polled until the corners are in view. Journeys are checked by what is certain (the animation started, it is aimed along the move, the piece arrives) rather than sampled mid-flight. Four tight timeouts are now 8 s.

No version in the code

The version comes from the release, as in Hype and Plain: a tag's tarball unpacks as checkmate-<version>, and a checkout asks git describe. --version and the application version both use it, and a new test runs --version with no display. Cutting a release is now only a tag.

(The earlier "Call it 0.1.1" commit on this branch is superseded by this; nothing hardcodes a version now.)

Verification

  • bin/test passes, both tests.
  • The suite passed twice on two contended cores, about four times slower than normal. I could not reproduce the builders exactly, so the next package build is the real proof.
  • A copy of the source in a folder named checkmate-9.9.9 configures with version 9.9.9; this checkout reports 0.1.0-2-g….

🤖 Generated with Claude Code

dhh and others added 2 commits November 16, 2026 12:33
The package build runs the tests under software rendering on shared
machines, where a frame can take longer than the test waited. The camera
fit is now polled until the view has drawn, and a journey is checked by
what is certain (it started, it is aimed, it arrives) rather than by
sampling a piece in mid-air.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@dhh

dhh commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Added a second commit bumping the version to 0.1.1, so this can be tagged as the release the package builds from: the v0.1.0 tarball carries the timing-dependent tests and can't pass check() on the builders.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the existing camera-test gap remains non-blocking.

Findings

  1. P2 Camera checks can skip sets ▶

Summary

The PR makes the window tests less dependent on rendering speed and removes the hardcoded version.

  • Checkmate reports the version from its release or checkout.
  • Window tests wait for rendered outcomes on slow builders.

Reviews (2) · Last reviewed commit: "Take the version from the release, never..." · Reviewed by Greptile

Comment thread tests/checkmate_tests.cpp
Comment on lines +837 to +850
// The view answers from the last frame it drew, and a slow renderer takes its time over one.
QString stray;
auto framed=[&] {
stray.clear();
for (float x : {-4.55f,4.55f}) for (float z : {-4.55f,4.55f}) {
QVector3D point;
if (!QMetaObject::invokeMethod(view,"mapFrom3DScene",Q_RETURN_ARG(QVector3D,point),Q_ARG(QVector3D,QVector3D(x,0,z)))) return false;
if (point.x()<0 || point.x()>board->width() || point.y()<0 || point.y()>board->height())
stray=QString("set %1 at %2x%3: corner %4,%5 lands at %6,%7").arg(set).arg(size.width()).arg(size.height())
.arg(x).arg(z).arg(point.x()).arg(point.y());
}
return stray.isEmpty();
};
QTRY_VERIFY2_WITH_TIMEOUT(framed(),qPrintable(stray),10000);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Camera checks can skip sets

After setPieceSet(), framed() runs immediately and can accept the previous set's already-valid projection. The loop can then advance without drawing the selected set, including set 2's different camera. This leaves a gap where a change that crops the board could pass the test. Wait for a new frame after each set change, then poll the corners.

A tag's tarball unpacks as checkmate-<version>, and a checkout asks git,
as Hype and Plain do. Cutting a release is now only a tag.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@dhh dhh changed the title Keep the window test steady on slow builders Steady the window test on slow builders and drop the version from the code Nov 16, 2026
@dhh
dhh merged commit 6a9d745 into master Nov 16, 2026
1 of 2 checks passed
@dhh
dhh deleted the steady-slow-tests branch November 16, 2026 12:36
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