Skip to content

fix(ci): make the engine and desktop-shell checks pass - #3

Merged
nodemode-ai merged 11 commits into
mainfrom
fix/ci-checks-0.4.0
Dec 2, 2026
Merged

nodemode-ai merged 11 commits into
mainfrom
fix/ci-checks-0.4.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

fix(ci): make the engine and desktop-shell checks pass

Summary

  • The engine check failed on main since the 0.2.0 merge: clippy runs with -D warnings, and three float literals in fsh-core stopped it. Once those pass, the same clippy finds five more errors in fsh-materials, fsh-scene and fsh-io; all eight are fixed here.
  • fsh-core keeps the published blackbody coefficients and allows excessive_precision on that one function; each literal rounds to the same f32, so no colour changes.
  • fsh-materials keeps its negated comparisons such as !(pdf > 0.0), which are also true for NaN and are how a broken sample is rejected; the rewrite clippy suggests would let NaN through, so the lint is allowed on those two functions. A type alias names the worker groups.
  • fsh-scene and fsh-io read fixed-size records with as_chunks::<N>() instead of chunks_exact(N) (a lint new in the pinned 1.99 toolchain).
  • The desktop-shell check failed because src-tauri/Cargo.lock was never committed and the job runs cargo check --locked. The lockfile is committed now, and two clippy errors behind it are fixed: the window key header constant is compiled only on Windows, where its one user is, and the quit request moves into a match guard with unchanged behaviour.
  • CI gains workflow_dispatch, so a run can be started by hand (gh workflow run ci.yml -R nodemode-dev/formshot --ref <branch>) if GitHub ever shows a pull request with no checks again. The family's push and pull_request triggers are unchanged.

Commits

  • fix(core): keep the published colour coefficients under clippy
  • fix(materials): keep the nan checks in the bsdf under clippy
  • fix(scene): read triangle indices as fixed-size chunks
  • fix(io): read fixed-size records as fixed-size chunks
  • docs(native): log the clippy fixes and the identity check
  • fix(tauri): compile the window key header only on windows
  • fix(tauri): ask the page to quit from a match guard
  • build(tauri): commit the desktop shell's lockfile
  • docs(tauri): log the first compile and the lint fixes
  • ci: allow a run by hand on any branch
  • docs(setup): log the manual ci run and why main was red

The short hashes change when the commits are signed.

Version

No version change: these are fixes to checks and lint with no change a person using the app can see, so formai-build has nothing new to offer.

Checks

Every step of the five CI jobs, run by hand on Ubuntu 24.04 from a fresh clone of this branch, as the workflow writes them:

  • frontend: npm ci, npm audit --audit-level=low (0 vulnerabilities), typecheck, build: pass.
  • engine: cargo check --workspace --all-targets and cargo clippy --workspace --all-targets -- -D warnings on Rust 1.99.1: pass (118 s from an empty build folder on 2 cores).
  • backend: Python 3.12 venv, pip install -r requirements.txt, compileall, import app.main: pass.
  • desktop-shell: the job's apt packages (libwebkit2gtk-4.1-dev 2.52.6 and the rest), frontend build, sidecar placeholder, cargo check --locked, cargo clippy --locked -- -D warnings: pass. This was the desktop shell's first compile anywhere.
  • scripts: bash -n, py_compile, the em dash and emoji scan: pass.

No behaviour changed: the engine built from these commits and the one built before them render the sample scene to byte-identical PNGs (1 and 2 threads), import and render a GLB byte-identically, and bench still shows 0.00001 mean absolute difference between the GPU (software Vulkan and OpenGL) and the CPU picture.

Not run: the workflow on GitHub itself, a Windows build (the Windows-only code is compiled out on Linux), tauri build, macOS.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

The Kim et al. blackbody spline keeps its coefficients as published, with clippy's excessive_precision allowed on planckian_xy only; each literal rounds to the same f32, so no colour changes. Run: cargo clippy over the workspace with -D warnings passes this crate; render sample is byte-identical to the engine before the change.
Bsdf::sample and Bsdf::prepare keep their negated comparisons, which are also true for NaN and so reject broken samples; clippy's neg_cmp_op_on_partial_ord is allowed on those two functions instead of the rewrite it suggests, which would let NaN through. fill_diel names its worker groups with a DielGroup alias. Run: clippy -D warnings passes the crate; render sample byte-identical before and after.
compute_normals walks the index list with as_chunks::<3>() instead of chunks_exact(3), as the clippy of the pinned 1.99.1 asks; the same triangles in the same order. Run: clippy -D warnings passes the crate.
The clean-up pass, the glTF position and UV readers and the PNG palette and tRNS readers use as_chunks::<N>() instead of chunks_exact(N), as the clippy of the pinned 1.99.1 asks; same values in the same order. Run: clippy -D warnings passes the workspace; the sample written as GLB, imported and rendered is byte-identical to the engine before the change, and info agrees.
Records why each lint was fixed or allowed (the NaN checks above all) and what ran: engine check clean, 118 s from an empty target folder on 2 cores, renders byte-identical before and after, bench still 0.00001 from the CPU on both software GPU adapters.
KEY_HEADER is used only by the Windows-only ask_to_close, so it now carries the same cfg; on Linux and macOS it was dead code, an error under clippy -D warnings. Run: cargo clippy --locked -- -D warnings on Linux passes. Not run: a Windows build.
ExitRequested moves its if into a match guard, as clippy's collapsible_match asks; when the page does not want to quit the event falls to the existing empty arm, so behaviour is unchanged and the page is asked once. Run: cargo check and clippy -D warnings with --locked pass on Linux. Not run: the app itself.
The CI desktop-shell job runs cargo check --locked, which failed with no Cargo.lock; this is the lockfile written by the first cargo check of the shell. Run: cargo check --locked and cargo clippy --locked -- -D warnings pass on Ubuntu 24.04 with the job's packages.
Records the lockfile, the two lint fixes and the first compile of the desktop shell: check 1 min 58 s from empty, clippy clean, nothing bundled or opened.
Adds workflow_dispatch beside the family's push and pull_request triggers, as FormSurface has it, so a run can be started with gh workflow run when GitHub shows a pull request with no checks. Run: the YAML parses. Not run: on GitHub.
Records the manual trigger, the pull request that showed no checks, and the two real causes of the red main (engine clippy and the missing desktop-shell lockfile), with the five jobs run by hand.
@nodemode-ai
nodemode-ai merged commit 6af1a73 into main Dec 2, 2026
@nodemode-ai
nodemode-ai deleted the fix/ci-checks-0.4.0 branch December 2, 2026 18:03
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