Repository navigation
Conversation
make sent every round through the repair loop when the second dialect was skipped (--no-dialect, no ANGLE, the child timing out), telling the model its working scene did not compile.
An empty assistant turn kept in the history made the next request fail (Anthropic refuses empty content), which ended the run with repairs unused.
A hue cycle with green held read as frozen and failed the check. The website's gate changes with it (D562).
…ompiles `#define iTime (iTime * 0.5)` is legal on Shadertoy, where iTime is a uniform; the shim's own #define made it a macro redefinition.
…ns a pass Any mention of gl_FragColor (an #if 0 block, an unused helper) made the pass return the legacy variable, which stayed black when only mainImage's output was written.
A local client sending a byte every few seconds stayed inside the per-read timeout and could hold a connection slot for hours; four of them made the listener answer every import with 503.
…efault rewrite_chosen wrote any min < max it was given, so a loop count could be dragged past LOOP_CAP (the iGPU hang guard) or below one iteration, and a range that left out the default had the scene clamp it.
floor(n + 0.5) moved a bound like 6.2832 or 10.5 at its default, so the control started on a different picture (a gap in a ring, an extra step).
…trol TIME * 2e38 or TIME / 1e-39 wrote an infinite MAX into scene.json, which failed the whole generation instead of dropping one candidate.
… unsafe A use inside parentheses at global scope (float g = sqrt(S);) or a parameter of the same name (float f(float K)) was offered as safe, and its rewrite cannot compile.
Contributor
|
Claude finished @lnorton89's task in 26s —— View job Review of PR #156I read the listener Listener
Legacy
House rules
Nothing blocking. The "Left, and why" list in the PR body is a fair account of the open items. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An in-depth, line-by-line review of every source file in
strobe-shadertoy,strobe-autocontrolandstrobe-forge. It goes past the hot paths an earlier pass covered.It found 21 issues. 20 are fixed here and 1 is left open, with reasons below.
Every behaviour fix has a test that failed before the fix and passes after. I ran each one both ways; the "Before" lines below quote the failure output. No network calls were made: shadertoy.com and the LLM providers are tested only through canned bodies and test doubles.
deny.tomlandCHANGELOG.mdare untouched. No decision record was needed.Findings
strobe-forge
maketreated a dialect that was not checked as a compile error.crates/strobe-forge/src/check.rs:245DialectResult::not_checkedputs its reason inerror, andcompile_errors()collected everyerror. With--no-dialect, no ANGLE, or the 240 s child timeout, each round ran the whole repair loop: 3 paid requests telling the model its working scene "does not compile: not asked for". The child's unbounded stderr also went to the provider in the repair prompt.Status::Failedcounts.check::tests::a_dialect_not_checked_is_not_a_compile_errorAn empty "successful" answer was kept in the history.
anthropic.rs:168,google.rs:163,openai.rs:135{"content":[],"stop_reason":"end_turn"}, GeminifinishReason: OTHERwith no parts, a thinking-only answer, or OpenAIcontent: nullreturnedOk(""). That empty turn was appended as the assistant's. Anthropic refuses an empty assistant turn, so the next request was a 400 and the run ended with repairs unused.sendtakes the user turn back.errors_*testsThe frozen gate compared only the green channel.
gate.rs:237site/src/lib/play/image/gate.tschanges the same way to keep the two gates in step (D562).gate::tests::motion_in_red_and_blue_alone_is_not_frozencounts motion in red and blue alone as motion, run against the oldgate.tsand the new oneRound 0's log said "the previous scene stands" when there was none.
forge.rs:172forge::tests::answers_that_never_parse_end_without_a_scene(extended)A Markdown fence inside a
<file>block cost a paid repair.reply.rs:113glsl" does not compile, and "json" is not JSON.reply::tests::a_markdown_fence_inside_a_block_is_droppedA provider's error and refusal text went to the log and stdout whole.
http.rs:82;openai.rsrefusalhttp::boundedcuts it to 500 characters and says how long it was.http::tests::a_provider_error_message_is_boundedChecked and fine:
x-goog-api-key, not?key=, and the model id in the URL path is validated.gate.ts.strobe-shadertoy
#define iTime (iTime * 0.5)did not compile.convert/shim.rs:187iTimeis a uniform, so redefining it as a macro is legal. The shim's own#define iTime strobe_iTimemade it a "Redefinition of macro". The same applies toiResolution,iMouseand the other scalars.strobe_begin(). It cannot be initialised where it is declared: on ES the hoisted initialiser lands inmain, below the author's macro.a_shadertoy_uniform_the_author_redefines_as_a_macro_still_works, both dialectsAny mention of
gl_FragColorturned a pass black.convert/shim.rs:474#if 0, or in an unused helper, maderenderMainreturn the legacy variable. That variable stayed black when onlymainImage's output was written.mainImage's output is used while the sentinel is still there.gl_fragcolor_in_code_that_never_runs_does_not_blacken_the_pass(it also checks the legacy fixture still draws);The generated
st_keyboard.pngcounted as a found texture.import.rs:268names::is_generated_image.import::tests::the_generated_keyboard_image_is_not_counted_as_a_textureA URL with a port was refused.
id.rs:81https://www.shadertoy.com:443/view/XsXXDnwas rejected withWrongHost.shadertoy.com:xandexample.com:443are still refused.every_accepted_form_gives_the_same_idandbad_input_says_what_is_wrongA client trickling its request could hold a listener slot for hours.
listener/mod.rs:487io_timeoutlimits each read, not the whole request. One byte every 9 s kept a slot open, and four such clients made every import a 503. The module doc claimed a stalled client could not hold the listener.Deadlinereader bounds head and body together.ListenerConfig::request_deadlinedefaults to 30 s, and the doc is corrected.a_client_trickling_its_request_is_cut_offThe invalid-key message said "letters and digits", but
_and-are accepted too.acquire/key.rs:58Checked and fine:
Comments, strings and renames: comments, identifiers that merely contain a renamed name, line continuations and line-number preservation are all handled.
Channels: cube, black-cube, audio and keyboard bindings,
iChannelResolutionandiChannelTime.Assets and paths:
..andfile:;Listener:
Hostmust match exactly;There is no Origin check. None is needed with the token, the custom header and the exact Host check, so there is no prefix, suffix or
null-Origin weakness.Attribution:
CREDIT,DESCRIPTIONandSOURCE(id, url, author, name, licence note, tags) are written on every successful path, including when textures fail.strobe-autocontrol
A named loop bound that also bounds an array-indexing loop became a slider.
analyze/mod.rs:159#define N 8withfor (i < N) w[i] = ...and a secondfor (j < N)gave N the range 2..16. The scorer's own nudge then read pastw[8].a_name_that_bounds_any_array_indexing_loop_is_never_a_candidaterewrite_chosenwrote any range it was given.Where:
generate.rs:195Bug: the app's inspector, or a page passing JSON through, could set a loop count's max to 1e6, past
LOOP_CAP(the 2012-iGPU hang guard), or its min below 1. A range that left out the default also had the scene clamp the verified default.Fix:
reviewed_range:1..=LOOP_CAP.max(default);The doc comment is corrected.
Test:
a_reviewed_loop_range_keeps_the_hang_cap_and_the_default(no GL)Before: FAILED, "-5..1000000 must stay inside 1..256". After: ok.
A non-integer float loop bound was treated as a count.
analyze/expr.rs:221,analyze/mod.rs:240floor(n + 0.5)changes the loop at its default:6.2832becomes 6, which leaves a gap in a ring, and10.5becomes 11, an extra step.Countis documented as integer-valued.loop_traps_are_left_alone, anda_named_bound_that_is_not_a_whole_number_is_not_a_countA huge time factor aborted the whole generation.
analyze/expr.rs:208TIME * 2e38orTIME / 1e-39wrote"MAX": infintoscene.json, andwith_controlsfailed for the whole scene.speed_okrequires a finite speed under 1e5, the same bound asscale_value_ok, in both the code and the#define-body scanners.time_traps_are_left_aloneanda_speed_inside_a_define_body_is_foundA constant used inside parentheses at global scope was offered as safe.
analyze/consts.rs:466float g = sqrt(S);contradicts the module doc. The rewrite is a non-constant global initialiser and fails to compile, which cost a combined compile plus a lone search.uses_that_need_a_constant_make_it_unsafeA
constshadowed by a parameter was rewritten into a broken signature.const float Kalongsidefloat f(float K)became#define K (k), which pastes intofloat f(float (k)).A bare speed macro divided by inside another macro was still offered.
analyze/expr.rs:983#define T TIME * 0.3with#define U (1.0 / T). The guard scanned only code tokens, so the paste changed the maths.#definebodies are lexed as well.a_speed_inside_a_define_body_is_foundComments that contradicted the code.
lib.rs,consts.rsandnaming.rssaid the tokenizer wasstrobe-shadertoy's. It isstrobe_scene::glsl;strobe-shadertoyis only a dev-dependency.Checked and fine:
#if,case, array sizes and const initialisers are guarded.total_cmp, frames areu8, and there are no divide-by-zero paths.Left, and why
listener/mod.rs,Submission::page_urlinfo.idwould get noSOURCEid or url, althoughpageUrlholds them.ImportOptionsfield that the app has to fill in.Smaller gaps I also left:
#define. An author#defineofiChannel0–3,iChannelTime,iChannelResolutionoriSampleRatestill collides with the shim's own#define. Fix 7 covers the scalar uniforms, which is the common idiom (#define iTime (iTime*…)). Redefining a sampler name like this has no meaning to keep.strobe-autocontrol --outinside the source folder copies the staging folder into itself. It is reachable only by a user mistake.Test plan
All of this ran on Linux in a cloud container: Mesa llvmpipe,
STROBE_REQUIRE_HEADLESS_GL=1. There was no real GPU and no Windows machine.cargo test -p strobe-shadertoy -p strobe-autocontrol -p strobe-forgecargo clippy -p strobe-shadertoy -p strobe-autocontrol -p strobe-forge --all-targets --all-features -- -D warningscargo clippy -p strobe-shadertoy --no-default-features --all-targets -- -D warningscargo clippy -p strobe-forge --no-default-features --all-targets -- -D warningscargo fmt --all -- --checkcargo test -p strobe-conventionsRUSTDOCFLAGS="-D warnings -A rustdoc::private_intra_doc_links" cargo doc --no-deps --all-features --document-private-items(CI's step, for the three crates)npx eslint,npx tsc --noEmitandnpx vitest run tests/unit/from-image.test.tsinsite/cargo check -p strobe-appalsa-sysneeds ALSA headers this container lacks.ListenerConfigis built only with::new, which fills the new field.cargo xtask changelog --checkCHANGELOG.mdare left aloneNot run here:
cargo test --workspace;cargo clippy --workspace.CI covers all three.
Checklist
cargo fmt --all -- --checkpassesunwrap/expect/panic!unsafestrobe_beginonly for a redefined uniform, and one comparison per pixel only in legacygl_FragColorpasses.CHANGELOG.mdnot hand-editedGenerated by Claude Code