Skip to content

review (in depth): strobe-web, strobe-diag, strobe-bench and xtask - #153

Open
lnorton89 wants to merge 7 commits into
masterfrom
claude/gallant-keller-k2fkyj
Open

lnorton89 wants to merge 7 commits into
masterfrom
claude/gallant-keller-k2fkyj

Conversation

@lnorton89

@lnorton89 lnorton89 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

A line-by-line review of the four crates the earlier pass skipped: strobe-web, strobe-diag, strobe-bench and xtask. Every file was read in full (sources, build scripts, examples, tests, READMEs, Cargo.toml).

Every bug fix comes with a test that failed before the fix and passes after. Each fix was made in two steps: first the code under test was extracted with its old behaviour and the test was run and seen to fail, then the fix was applied and the test was seen to pass. The before and after runs are summarised under each crate. Doc-only corrections have no test.

There are no new decisions. No files were touched in crates/strobe-conventions, deny.toml or site/.

strobe-bench

# Finding Fix Test (failed before, passes after)
B1 If a scene failed only at a later --scales scale, the run still passed, against D56 (main.rs:396). Each later-scale failure is printed and added to the exit verdict. a_failure_at_another_scale_fails_the_run
B2 p95 used index floor(n*0.95). That is one rank too high, and equals the max for fewer than 20 samples, so CI's 10-frame runs always showed p95 = max (main.rs:756). Switched to the nearest-rank percentile. p95_is_the_nearest_rank_not_the_maximum
B3 A GL error left over from a scene that failed part-way failed the next, good scene (main.rs:624, :720). Errors are cleared at the start of bench_scene, and drained after a scene reports one. an_error_an_earlier_scene_left_does_not_fail_the_next (headless GL)
B4 With --meta master=0, the all-black "context drew nothing" check failed a context that did draw, because it looked at the meta frame (main.rs:727). The check reads the scene's own frame. meta_that_darkens_the_saved_frame_is_not_a_dead_context
B5 A run that benchmarked no scene (a --filter typo, an empty library) passed (main.rs:448). It now fails and says why. a_run_that_benchmarks_no_scene_fails
B6 --warmup + --frames was added in u32, which panics in debug and wraps in release (main.rs:765). The sum is done in u64. the_frame_count_does_not_overflow
B7 --size accepted 0x0, negative values and huge values, and errors did not name --size. --post/--share built a w*h*4 buffer before any check (main.rs:566). Each edge must be 1..=16384, and errors name the input. a_size_must_be_two_positive_edges
B8 A --scales part that failed to parse gave a bare "invalid float literal". The empty-list branch could never run (main.rs:498). The error now names the part, and the dead branch is gone. a_bad_scale_says_which_part
B9 --frames 0 "passed" with made-up numbers. Two modes at once (--probe --readback) silently ran only the first (main.rs:80, :90). --frames takes 1 or more, and the four modes are an exclusive clap group. zero_frames_and_two_modes_are_refused
B10 The probe read its "Start state" after the rows had already reset the viewport and scissor, so the D296 line it exists for could never show (probe.rs:91). The state is captured before the first row. the_start_state_is_the_one_the_context_had_before_the_probe (headless GL)
B11 The readback "Busy GPU" check passed when no picture ever arrived, which is exactly the busy case it is for (readback.rs:303). It now fails when nothing arrived. a_busy_run_where_no_picture_arrives_fails
B12 Readback's cost, busy and resize checks never looked at the GL error flag (readback.rs:116). Each is followed by an error check that fails it. a_gl_error_after_a_check_fails_it (headless GL). Hardening: no error can be provoked inside a check from outside, so the test drives the new check directly.
B13 --post could never fail on a GL error (post.rs:119). It returns a pass flag, as --share and --readback do. Hardening, same reason as B12. Covered by the B12 check's logic.
B14 One PNG that failed to save aborted the run before results.md was written, against the comment's promise (main.rs:421). The save error fails that scene, and the report is still written. Not provoked: root in the container can write anywhere.
B15 readback::render allocated a Vec on every call, inside timed loops (readback.rs:150). Uses a stack array. n/a (performance)
— Docs: the README said "no tests" and omitted --post/--meta. share.rs:24 said "fixed 1920x1080". probe.rs said rows were ascending (they are now sorted by pixel count). readback.rs claimed a stall threshold. The sweep_table doc said "smallest" scale. Corrected. —

Run before the fixes: 11 of 17 failed. After: 18 of 18 pass.

strobe-diag

# Finding Fix Test (failed before, passes after)
D1 If the monitor could not create the dump file (a read-only folder, a file in the way), minidumper never called on_minidump_created. finish() returned None, so there was no report and no notice, silently (crash.rs:513). The failure is recorded in create_minidump_file. The crash still gets its .txt and its notice, saying "minidump NOT WRITTEN". a_dump_file_that_cannot_be_made_is_still_reported
D2 When a panic report existed and the dump then failed, the dump error was dropped (crash.rs:441). The panic report gets "Minidump … NOT WRITTEN: why". a_dump_that_failed_after_a_panic_is_written_into_its_report
D3 Every error the monitor wrote went to a stderr the app sets to null (crash.rs:343). Its trouble is also appended to crashes/monitor.log. Documented in DEBUGGING.md. the_monitors_trouble_is_written_to_a_file
D4 Crash messages had no size cap (200 log records, 20 failure blocks). minidumper wants them well under 64 KiB, and an oversized one fails or desyncs the stream (crash.rs:819). Each message keeps its newest whole parts within 32 KiB. a_crash_message_keeps_the_newest_parts_within_the_cap
D5 A panic report never expired. A dev build's caught panic made a native crash hours later reuse its stem, so that crash got no report and no notice (panic_hook.rs:65). The report counts only when it was written in the last 30 s. an_old_panic_report_is_not_claimed_by_a_later_native_crash
D6 flush_within gave up at once when the log queue was full, which is the log-storm-then-crash case, so up to 8192 lines were lost (logger.rs:112). It retries until the deadline. a_flush_waits_for_room_in_a_full_queue
D7 Two racy tests:
- context's hook-swapping test could drop our panic hook mid-install;
- failure's flood could evict what crash's test looked for.
Shared test turns (lib.rs:78). Reproduced under load, then fixed (numbers below).
— Docs:
- "a panic inside the hook skips to the previous hook" is false: std aborts.
- notify's "isolated" claim.
- native.rs's SAFETY note said the handler does no blocking work; it now says the handler allocates and pings.
- the README used args() and skipped set_notifier.
- the socket location, the unsafe count, the Subsystem list, the dependents, failure.rs's header, the log-pruning note.
Corrected. —
— Dead code: MonitorHandle::monitor_pid and Logger::filter, with no users. Removed. —

Run before the fixes: 6 of the 76 lib tests failed. After: 76 of 76, plus 7 of 7 pipeline tests.

D7 was measured with the test binary run 360 times, 6 copies at once with --test-threads 32:

  • before: 12 failures (a_panic_leaves_a_report… 11 times, a_lost_monitor_becomes_one_diagnostics_failure once);
  • after: 0 failures in 360.

xtask

# Finding Fix Test (failed before, passes after)
X1 A step's timeout killed only the direct child. xvfb-run's Xvfb and app, and cargo test's test binary, kept running (ci.rs wait, package.rs wait). New process::kill_tree (process.rs:26):
- Windows: taskkill /T /F;
- elsewhere: reads the tree from ps, then SIGKILLs it all.
The child is deliberately not moved to its own process group, so Ctrl+C still reaches it.
a_grandchild_is_stopped_with_its_parent, descendants_are_found_at_any_depth_and_nothing_else
X2 A run without the test lane reported an older run's test-skips.log as its own (ci.rs:1211). The note is shown only when the run tested. a_run_without_tests_does_not_report_an_old_skip_log
X3 cargo deny check ran without --locked, against ci.rs's own rule. The --locked test did not look at deny or doc (ci.rs:490). cargo deny --locked check. --locked is cargo-deny's global flag, confirmed in its docs. The test now covers doc and deny. every_dependency_resolving_cargo_command_is_locked (extended; failed on cargo deny check)
X4 PowerShell quoting broke on an apostrophe in a path, e.g. C:\Users\O'Brien\… (package.rs:567, the lint lane). Added ps_quote, which doubles '. an_apostrophe_in_a_path_is_quoted_for_powershell
— CI mismatches, with CLAUDE.md fixed to match ci.rs:
- the Windows cross-check also excludes and separately checks strobe-forge;
- the wasm clippy is -p strobe-web -p strobe-gfx --no-default-features;
- tests run with --all-features;
- the check lane's prose was incomplete;
- the ci.yml comment said the generated lane checks three files, not four.
Corrected. —
— Docs:
- the README's "skip with a stated reason" (these steps are actually MISSING and fail under --strict), its exclude list, the LAN-test note, the tool list and brand's outputs;
- main.rs's "baked in at compile time" and the ci help text;
- the Cargo.toml description and ci.rs's header;
- package.rs's "FileVersion" and "nothing else";
- the notices' preamble omitted Spout.
Corrected. —
— Helpers marked pub(crate) but used only in their own module: imports, codeview, pdb_guid, run_diagnose, BUNDLES, add_components. Made private. —

Run before the fixes: 5 of 47 failed. After: 47 of 47.

strobe-web

# Finding Fix Test (failed before, passes after)
W1 The silent audio source allocated a new Vec every frame, against CLAUDE.md's per-frame rule (sandbox.rs:160). Silence is built once and copied in place. silence_allocates_nothing_per_frame (headless GLES)
W2 The canvas was clamped to a hard-coded 8192, not the driver's texture limit. Above the limit no scene could load, or a resize failed (sandbox.rs:810). Renders at the largest size of the same shape within min(8192, max_texture_size), presented letterboxed into the canvas. the_canvas_is_fitted_to_the_drivers_texture_limit
W3 For a scene that pins its size (D280), the pointer was in canvas pixels, not render pixels. The app maps it through the letterbox; the sandbox did not (sandbox.rs:840). canvas_mouse maps it as the app's mouse::to_render does, keeping the click's sign. the_pointer_follows_a_letterboxed_picture
W4 A script uniform with an unsupported size was dropped silently, shifting every later uniform's values by one slot (sandbox.rs:823, moved out of the wasm-only web.rs so it can be tested natively). Refused, with the uniform named. a_bad_script_uniform_size_is_refused_not_dropped
W5 A picture path written with backslashes (images\sky.png) was not found by its file name (sandbox.rs:697). Both separators are accepted. a_picture_is_found_by_its_file_name_whichever_separator
— A test looped on generate_step with no bound, so a hung job would hang CI. Bounded, like generate_steps. —
— Docs:
- the README said the Shadertoy audio texture was not in the browser (it is, D577);
- lib.rs's wasm-bindgen output path;
- the notes docs still said cube maps and MEDIA don't load;
- read_output was "the page's thumbnail";
- the preset doc omitted the media channel;
- the "allocation-free" reason on frame's lint expectation;
- the header Dependencies lines;
- extrasJson is now noted as test and debug only.
Corrected. —

Run before the fixes: 5 failed (4 in tests/sandbox.rs, 1 lib). After: 26 of 26 and 1 of 1.

Left, and why

All of these are recorded in docs/IMPLEMENTATION_BACKLOG.md (R-04, R-09, W-01).

  • strobe-diag (R-04):
    • The native crash handler allocates, and pings without a timeout, before it asks for the dump. Reordering needs the monitor to keep reading messages after the dump. That is a protocol change to prove on Windows. The SAFETY comment now says this honestly.
    • A second thread panicking during a report can abort the process before the report is done.
    • Reports are not written via a temporary file and a rename.
    • context::note_pass is never called by the renderer. Wiring it is strobe-gfx/strobe-app work, outside these four crates.
  • xtask (R-09):
    • package-check and rc compare an older zip against the checkout's scenes, pins and notices. Fixing it needs the files read at the tag, which is a design choice.
    • tracked() returns an empty list when git fails, so the lint lane passes having linted nothing.
    • A staging folder that cannot be removed is reused silently.
    • The %TEMP% unpack folders are never deleted. Proving the remove-failure case needs a failing remove, which root in the container cannot produce.
  • strobe-web (W-01):
    • Generate controls measures cube-map and still-MEDIA scenes without their pictures. It needs strobe_autocontrol::Job to accept them.
    • Restoring after a lost WebGL context presses every bang once. That needs a page change in site/, which another session owns.
    • The meta controls.
  • strobe-bench:
    • Two scene folders with the same title, or a scene called contact-sheet, overwrite each other's PNG.
    • --meta is parsed per scene rather than once.
  • Needs a person, device or service:
    • The Windows MSVC cross-check and the PowerShell lint can't run in a Linux container.
    • The real-Windows behaviour of taskkill /T in X1.
    • Other browsers and phones (W-02).

Test plan

Commands run in a Linux cloud container on Mesa llvmpipe, with STROBE_REQUIRE_HEADLESS_GL=1:

Command Result
cargo fmt --all -- --check clean
cargo clippy -p strobe-web --all-targets --all-features -- -D warnings clean
cargo clippy -p strobe-diag --all-targets --all-features -- -D warnings clean
cargo clippy -p strobe-bench --all-targets --all-features -- -D warnings clean
cargo clippy -p xtask --all-targets --all-features -- -D warnings clean
cargo clippy -p strobe-web -p strobe-gfx --no-default-features --target wasm32-unknown-unknown -- -D warnings clean
cargo test -p strobe-web 1 + 26 passed
cargo test -p strobe-diag 76 + 7 passed
cargo test -p strobe-bench 18 passed
cargo test -p xtask 47 passed
cargo test -p strobe-conventions 60 passed. The first run caught three discarded results without a "why" comment (D267); fixed in b6bebed.
cargo xtask decisions --check clean
cargo xtask changelog --check Fails here with and without these commits: the checkout is shallow (git rev-parse --is-shallow-repository is true), so it lacks the tags. CI's generated lane runs it with full history.
  • cargo xtask credits --check: could not run, because this checkout is shallow (the command says so). CI's generated lane runs it with full history. No dependency or contributor changed.
  • The Windows MSVC cross-check (cargo clippy … --target x86_64-pc-windows-msvc): not run, as it cannot run in the cloud container. CI's windows job runs it. The new xtask code uses cfg! values only.

Not on a real GPU or a real Windows machine: everything ran on Mesa llvmpipe in a Linux container. Nothing here changes a frame. The bench fixes change only verdicts and reports, and strobe-web's only render-size change applies above the driver's texture limit.

Checklist

  • cargo fmt --all -- --check passes
  • clippy -D warnings passes for the four crates, plus the wasm32 build (the whole workspace was not re-run; no other crate changed)
  • cargo test passes for the four crates and strobe-conventions
  • Windows cross-check: not runnable in the cloud container; CI's windows job runs it
  • No new unwrap / expect / panic!
  • New file (crates/xtask/src/process.rs) carries the header banner
  • No new unsafe
  • Per-frame path changed: strobe-web's silent-audio path now allocates nothing. No bench was recorded, because the sandbox is not in strobe-bench.
  • docs/ROADMAP.md and docs/IMPLEMENTATION_BACKLOG.md updated; no new decisions
  • Conventional commit prefixes
  • CHANGELOG.md not hand-edited

Generated by Claude Code

… is the 95th percentile

A scene failing only at a secondary --scales scale, a run with no scene,
a stale GL error from an earlier scene, --frames 0, overflowing frame
counts and bad --size values no longer pass silently. The all-black
check reads the scene's own frame, not the --meta one. The probe reads
its start state before its rows change it, the readback busy check fails
when no picture arrives, and --post and --readback fail on a GL error.
…keeps crash messages under the socket's limit

A failed create_minidump_file was never recorded, so the crash left no
report and no notice. A failed dump after a panic is now written into the
panic report, the monitor's own trouble goes to crashes/monitor.log, a
stale panic report no longer claims a later native crash, a flush waits
for room in a full log queue, and crash messages keep their newest lines
within 32 KiB. Two racy tests take shared turns; docs that contradicted
the code are corrected and two unused accessors removed.
…go-deny's lockfile

A timeout killed only the direct child, leaving Xvfb and the app under
xvfb-run, or the test binary under cargo, running. A run without the test
lane no longer reports an older run's skip log, cargo deny runs with
--locked, and a path with an apostrophe is quoted for PowerShell. The
docs, CLAUDE.md's command list and the workflow comment now say what the
lanes run.
…and fits the canvas to the driver's texture limit

Silence no longer allocates every frame, a script uniform of an
unsupported size is refused instead of shifting the ones after it, and a
picture path written with backslashes is found by its file name. Docs
that said the Shadertoy audio texture, cube maps and MEDIA were not in
the browser are corrected, and W-01 lists what is left.
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @lnorton89's task in 16s —— View job


Review of PR #153

I found nothing to flag in the part I read, but I did not review the whole PR.

What I read: crates/xtask/src/process.rs in full.

  • The kill-tree logic is sound.
  • It reads the descendants before killing anything, then sends them all SIGKILL at once.
  • The descendants walk ends on a pid loop.
  • Each discarded result carries a reason comment (D267).

What I did not read: the strobe-web, strobe-diag and strobe-bench changes, and the rest of the xtask changes. I couldn't compute a diff against origin/master because the shallow checkout has no merge base. I did not review those files and have not verified them. I also did not run the build or tests.

House rules

  • I saw no unwrap, expect, panic! or #[allow] in process.rs.
  • I saw no new unsafe in process.rs.
  • The new file has its header banner.
  • The PR body says docs, ROADMAP and BACKLOG are updated and CHANGELOG.md was not touched. I only checked that against the PR description, not the diff.

Not covered anywhere: taskkill /T on a real Windows machine, as the PR already says.
· branch claude/gallant-keller-k2fkyj

This branch has not been deployed

No deployments
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