harness: faster, narrower Waiting for model… shimmer (plan #669) - #671
Conversation
…cted comet Retune the Busy-row Waiting for model… wave per plan #669: - SPEED=2 in headPosition (u32 multiply so phase 255*2 cannot wrap u8): N*STEPS/SPEED = 27 ticks = ~2.7 s full loop at the locked 10 Hz host tick (STEPS stays 3; HARNESS_BUSY_TICK_HZ untouched). - Replace the N-relative full-ring gradient with a localized directed comet behind the traveling head: HEAD_SPAN=1 accent, MUTED_SPAN=2, DARK_SPAN=1 border; the rest of the line stays warm_accent. Dark occupancy drops from ~6/18 to 1/18. Delete the now-unused cyclicDistance. - Keep the phase-0 solid fast-path (reduced motion must not show a dim comet tail) and the solid warm_accent clock suffix. - Tests in text_wave.test.zig rewritten for trailDistance + new colorStep, updated headPosition numbers (phase 7/N10 -> 4.667, phase 255/N20 -> 10.0), and added the N=18 occupancy-count and never-returns-3 gates. - docs/harness-limits.md Busy-spinner row: ~2.7 s loop, localized 2+1 trail, rest accent (timeless). Fixes #669
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Implements plan #669 (HANDOFF-READY).
Gates: This is a Zig-only change (no TS), so no vitest delta is indicated per the TS-vs-Zig scope table. Docs ( Not merged per implement-plan; next steps are |
btipling
left a comment
There was a problem hiding this comment.
Adversarial review — PR #671
Verdict: PASS WITH NOTES
Repo: btipling/invincible
Scope: main ← plan/waiting-shimmer-tune · 3 files · paint-only LUT retune (text_wave.zig + tests + one docs row)
Lenses run: L1, L3, L4, L5, L6, L8, L9 (skip L2: no API / secrets / runner / Wasm-memory trust boundary; skip L7: no config/host seams)
AGENTS.md read: yes · docs/feature-divide.md read · SECURITY.md skipped (diff does not touch workflows, secrets, runner, or API)
Findings
| Sev | Lens | Finding | Break scenario | Refutation attempt | Confidence |
|---|---|---|---|---|---|
| Minor | L1+L9 | Localized comet makes the pre-existing busy_tick 255→1 wrap a visible teleport. text_wave.zig headPosition / bridge.zig inv_set_busy_tick |
Start any Busy turn ≥ 25.6 s (tool-using agent turns do this constantly). Host phase maps 1..255 then wraps to 1 (never 0). For N=18: headPosition(255, 18) = (510 % 54)/3 = 8.0; next tick headPosition(1, 18) = 2/3 ≈ 0.667. The 4-scalar comet jumps ~7 glyphs in one 100 ms frame — from around for back to Wa. Old full-ring cyclicDistance gradient hid the same skip as a phase hitch; a sprite does not. Module header also claims this wrap is “after 12.8 s” (SPEED confused with wrap period); bridge.zig and docs/harness-limits.md still correctly say 25.6 s. No test pins headPosition(255, 18) vs headPosition(1, 18). |
Defender: wrap is pre-existing, protocol/host is out of scope, plan residual already said “ring-wrap has no dark spike.” Counter: they analyzed wrap for occupancy (still 1 border scalar — correct) and missed that deleting the full-ring gradient turns the same skip into a traveling-head pop. In-module math cannot make 255→1 continuous: period 54 does not divide 255*SPEED. Real fix is a follow-up on the u8 remap (wrap at a multiple of N*STEPS, or a wider phase), not a merge block on this paint PR. 12.8 s is comment-only and does not change runtime. |
high |
| Nit | L8 | Options.ramp comment still documents the old 4-stop layout [head, trail1, trail2, rest] (text_wave.zig · Options) |
A later caller (module advertises “generic reusable text wave”) puts rest ink in ramp[3] per the comment. colorStep now paints rest as ramp[0]; ramp[3] is never indexed. Rest of the line silently uses head color. |
Only in-tree caller is busy_row.zig with WARM_RAMP, where [0] is already the desired rest (warm_accent). No current user-visible miss. Comment rot, not a live break. |
high |
Residual risk
u8 phase 1..255 will always be incommensurate with the 27-tick / 54-raw comet period, so a long turn will keep one discontinuous frame every 25.6 s until the remap changes. SPEED=2 on STEPS=3 also dwells the hard-edged head 2 frames / 1 frame / 2 frames… on successive scalars (100–200 ms) — below the bar for a finding, but the 10 Hz step the plan already called aesthetic-only. Operator smoke (plan tests 11–12) is Preview-gated and was not independently exercised here. warm_border on teal_bg is still one hard-to-read glyph; that is the requested dark stop, not a regression.
Merge guidance
- PASS WITH NOTES: safe to merge from this attack; nits optional.
- Do not treat the wrap teleport as a #669 blocker. If it bothers operators on long turns, file a follow-up on
inv_set_busy_tick/ phase width — not anothertext_waveoccupancy tweak. - Fix the 12.8 s header (and the
Options.rampcomment) whenever the file is next touched.
What was not attacked
Live Preview operator shimmer / reduced-motion eyeball (plan 11–12). Production Gateway. Self-hosted runner beyond reading build-harness.yml path filters + confirming run 32156606219 is green. Host setBusyTick / HARNESS_BUSY_TICK_HZ (untouched). rect_spinner LUT. Vitest (Zig-only diff; DI/cost gate N/A).
…671) Nit (L8): fix Options.ramp comment (rest = ramp[0], not ramp[3]; text_wave uses 3 stops, not 4) and wrong 12.8 s wrap period (25.6 s at 10 Hz). Minor (L1+L9): add headPosition(255,18) vs headPosition(1,18) test pinning the ~7-glyph teleport so a follow-up remap can measure the delta.
Summary
Retune the Busy-row
Waiting for model…shimmer (plan #669) — paint-only LUT in the Wasm harness, fully contained totext_wave.zig+ its tests + one docs row. No protocol, host, rect-spinner, or cap changes.SPEED = 2insideheadPosition(multiplied inu32sophase 255*2can't wrapu8).N*STEPS/SPEED = 27ticks → ~2.7 s full loop at the lockedHARNESS_BUSY_TICK_HZ = 10.STEPSstays 3 (no sub-char smoothing loss).cyclicDistance, now deleted) with a directed trail behind the traveling head:HEAD_SPAN=1acid accent head,MUTED_SPAN=2warm_muted,DARK_SPAN=1warm_border. The rest of the line stayswarm_accent— dark occupancy drops from ~6/18 to 1/18.colorStepis now absolute-scalar and never returns 3.ramp[0]fast-path kept (a comet at head 0 would otherwise paint a dim trailing-edge tail); clock suffix stays solidwarm_accent.Scope:
native/harness/src/{text_wave.zig,text_wave.test.zig},docs/harness-limits.md. Host tick,STEPS, rect spinner, and protocol untouched.Verification (Zig gates, run on host in-sandbox)
zig fmt --check text_wave.zig text_wave.test.zigzig build test-richtext_wavetest artifact greenzig build test-rich-invariantszig build harness -Doptimize=DebugVitest delta: None — this is a Zig-only change; no TypeScript code changed, so no vitest run is indicated (per
implement-planTS-vs-Zig scope table). Correctness gate for this layer is the Zig compile +build-harness.Tests
text_wave.test.zigrewritten to the comet/SPEED model (+ plan tests 1–10):headPositionperiod: N=18 returns to the same head at phase 27 (full loop = 27 ticks = ~2.7 s at 10 Hz)phase * 2: phase 7 / N=10 → 4.667 (updated); phase 255 / N=20 → 10.0 via theu32path (updated)trailDistance: 0 at the head, increases behind the travel direction; rings around at the string endcolorStepspans: head accent / 2 muted / 1 dark / accent restcolorStepnever returns 3 (sweep to trail 256 + boundary pin)STEPS == 3,SPEED == 2countScalarspinsOperator shimmer/reduced-motion smoke (plan tests 11–12) are gated on the
build-harnessPreview, per the plan's DoD.Fixes #669