Repository navigation
Execute dormant tests and fix indicator alignment after history eviction - #410
Merged
Merged
Conversation
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.
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:58because the library unconditionally constructs browser-onlywgpu::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.