Skip to content

Fix source gates and Make cleanup prerequisites - #1

Merged
themuffinator merged 1 commit into
mainfrom
claude/adoring-chatterjee-da7e0c
Aug 6, 2026
Merged

Fix source gates and Make cleanup prerequisites#1
themuffinator merged 1 commit into
mainfrom
claude/adoring-chatterjee-da7e0c

Conversation

@themuffinator

Copy link
Copy Markdown
Owner

Three source gates failed on main at 6ecf029 for three unrelated reasons. Full suite is now clean: python -m pytest tests/ -q --ignore=tests/glx942 passed, 8 skipped, 24673 subtests passed.

What changed

Makefile — cleanup goals no longer demand build inputs

The build-input prerequisites (fontstash header, system jpeg/ogg/vorbis, cross compiler) were $(error) calls evaluated at parse time for every goal, so make clean failed on a fresh clone that had not run meson subprojects download or installed a toolchain.

That contradicts the Makefile's own design. The goal split at the top already defers the architecture error for cleanup, with the comment "Cleanup does not emit binaries, so it remains usable from any host." The prerequisite errors were bypassing that. They are now gated on a new FNQL_REQUIRE_BUILD_INPUTS, derived from the same split that drives FNQL_ENFORCE_X86.

The x86-only constraint is unchanged. Verified directly:

probe before after
make -n clean ARCH=x86_64 FNQL_ENFORCE_X86= fails on missing fontstash succeeds
make -n clean ARCH=x86 (no toolchain) fails on missing compiler succeeds
make -n release ARCH=x86_64 FNQL_ENFORCE_X86= rejected, x86-only message unchanged
make -n release ARCH=x86_64 MAKECMDGOALS=clean rejected, override message unchanged
make -n release ARCH=x86 demands build inputs unchanged

tests/x86_build_constraints_tests.py — undeclared host prerequisite

All six enforcement strings already passed; the enforcement had not regressed. The failure was in the subprocess half: two probes (default_goal, flag_probe) evaluate an accepted x86 configuration all the way through toolchain detection, which needs a Make-visible 32-bit x86 compiler. A host without one cannot exercise that path at all, and failed with a toolchain error that read like a policy regression.

Those two are now skipped when the host cannot configure an x86 build, behind an explicit probe whose skip message quotes the real blocker. The source assertions and the rejection probes (non-x86 build refused, disguised MAKECMDGOALS refused) still run unconditionally on every host — those fire before toolchain detection, so they need nothing installed.

tests/ql_font_source_tests.py — gate drifted behind the supersampling work

6ecf029 rewrote QL_CG_trap_DrawScaledText and QL_UI_trap_DrawScaledText to cross the framebuffer scale boundary, but the gate still asserted the old scale, limit, maxX call shape.

The replacement asserts the new shape and proves strictly more than the old one did, which only ever pinned argument order:

  • limit is forwarded verbatim — it counts characters, not pixels, so it must not be scaled
  • the caller's maxX is scaled into renderer pixels on the way in
  • the renderer's result is scaled back to retail pixels on the way out
  • a null maxX still reaches the renderer as a null pointer

.vscode/launch.json — wrong source, restored

6ecf029 repointed the RTX debug profile from meson\build\win32-rtx\ to meson\build\win32\. Its commit message does not mention the change, and the profile had targeted win32-rtx since it was introduced in 3a6bd1e — which is where the meson: build RTX (Steam) task in tasks.json builds. The gate was right; restored to the pre-6ecf029 blob exactly.

Reviewer notes

  • The FNQL_REQUIRE_BUILD_INPUTS gating is safe for cleanup goals: no parse-time $(shell ...) in the Makefile invokes $(CC), so leaving CC/CXX empty during cleanup does not cascade. Nothing in tests/ or docs/ asserted on the gated error strings.
  • The skip in the x86 gate is deliberately narrow. It is worth knowing that it will trigger in a git worktree regardless of toolchain, since .gitignore ignores subprojects/* and the downloaded subprojects only exist in the main checkout.

🤖 Generated with Claude Code

Three source gates failed on HEAD for unrelated reasons.

Makefile: the build-input prerequisites (fontstash header, system
jpeg/ogg/vorbis, cross compiler) were evaluated at parse time for every
goal, so `make clean` failed on a fresh clone that had not downloaded the
Meson subprojects or installed a toolchain. That contradicts the
Makefile's own goal split, which already defers the architecture error
for cleanup so it stays usable from any host. Gate them on a new
FNQL_REQUIRE_BUILD_INPUTS derived from that same split. Every
output-producing goal still fails exactly as before; the x86-only
constraint is unchanged.

tests/x86_build_constraints_tests.py: two probes evaluate an accepted x86
configuration all the way through toolchain detection, which needs a
Make-visible 32-bit x86 compiler that not every host has. Skip those two
when the host cannot configure an x86 build at all, and keep the source
assertions and the rejection probes running unconditionally.

tests/ql_font_source_tests.py: the supersampling work rewrote the native
DrawScaledText traps to cross the framebuffer scale boundary, so the gate
still asserted the old call shape. Assert the new one, and prove more
than before: limit is forwarded verbatim, the caller's maxX is scaled
into renderer pixels on the way in and back to retail pixels on the way
out, and a null maxX still reaches the renderer as a null pointer.

.vscode/launch.json: the RTX profile was repointed from
meson\build\win32-rtx\ to meson\build\win32\ as an unrelated drive-by. It
had targeted win32-rtx since it was introduced, and that is where the
"meson: build RTX (Steam)" task builds. Restore it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@themuffinator
themuffinator merged commit 8d1386a into main Aug 6, 2026
5 of 6 checks passed
@themuffinator
themuffinator deleted the claude/adoring-chatterjee-da7e0c branch August 6, 2026 06:17
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