Skip to content

Execute dormant tests and fix indicator alignment after history eviction - #410

Merged
qqrm merged 4 commits into
mainfrom
codex/execute-legacy-wasm-tests-2026-10-15
Oct 15, 2026
Merged

qqrm merged 4 commits into
mainfrom
codex/execute-legacy-wasm-tests-2026-10-15

Conversation

@qqrm

@qqrm qqrm commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Problem and result

49 Rust tests were compiled but never executed by the WASM runner. Activating them exposed stale fixtures and a renderer bug: after old candles were evicted, indicator lines used values from the beginning of their retained history. Dense EMA values also received an incorrect SMA warmup offset.

The browser harness now executes these cases with disposable reactive owners. The renderer aligns indicator histories with the retained closed candles, including the open aggregate bucket boundary. All five indicators are checked against independent numeric references after eviction; non-overflow checks verify EMA starts at the first candle and stops before the open bucket.

Other test corrections await real queue completion, exercise the actual zoom operation, show sufficient candles for SMA200, count closed minute buckets, and run 256 successful finite-input QuickCheck cases plus boundaries. Streaming EMA keeps its first-close seed; batch EMA keeps its SMA-period seed. Separate closed-form references test both existing contracts instead of asserting false equivalence.

Relevant files: F:src/infrastructure/rendering/renderer/geometry.rs, F:src/domain/chart/entities.rs, F:tests/moving_average_overflow.rs, F:tests/support/mod.rs, F:DOCS/TESTS.md.

Validation and boundary

Local formatting, locked all-feature check and strict Clippy passed. The configured WASM tests compile on Windows; runtime execution is checked by hosted headless CI. Final head 3aa5adde238fa7325a3d71b83b279f5627e5e244: all 49 newly activated tests executed successfully, with 166 browser Rust tests total (0 failed/ignored), 1 Node test, 7 Playwright scenarios, 10 measurement parser/comparator tests and 6 dependency-policy tests. Paired GPU benchmark passed all three workloads with 15 samples per revision. CI run: https://github.com/qqrm/webgpu-candles/actions/runs/38685926093. All exact-head checks, including CodeQL, succeeded.

The separate native indicator latency test retains its original <0.5ms contract. Direct native compilation fails at renderer/initialization.rs:58 because the library unconditionally constructs browser-only wgpu::SurfaceTarget::Canvas; an Ubuntu native test command alone cannot compile it. The relative GPU throughput benchmark measures different work and cannot substitute for that latency contract. Performance harness, thresholds and release policy are unchanged.

@qqrm qqrm changed the title Execute legacy chart tests in the browser WASM harness Execute dormant tests and fix indicator alignment after history eviction Oct 15, 2026
@qqrm
qqrm marked this pull request as ready for review October 15, 2026 05:21
@qqrm
qqrm merged commit 26babff into main Oct 15, 2026
16 checks passed
@qqrm
qqrm deleted the codex/execute-legacy-wasm-tests-2026-10-15 branch October 15, 2026 05:21
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