Pre-launch hardening: engine input validation, CI integration job, dashboard polish#7
Merged
Merged
Conversation
Only `size` was validated at parse; `price` was not, yet it feeds VWAP and the log-return `ln(price / prev)`. A zero, negative or non-finite price produced `inf`/`NaN` realized volatility that was written to SQLite and later serialized as invalid JSON. Add a `finite_positive_price` serde validator mirroring `positive_size`, closing the same class of latent hole the zero-size fix already addressed, and document the now-guaranteed invariant at the log-return use site. Also guard `parse_window` with `checked_mul`: a large `--window` overflowed i64 and silently wrapped in release builds (the demo/build path). It now returns a clear "too large" error instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
The three per-stack jobs never exercised scripts/demo.sh or scripts/verify_pipeline.sh, so the flagship `make demo` path could break while CI stayed green. Add an `integration` job that runs verify_pipeline.sh (tape -> Rust engine -> metrics DB -> journal seed -> regime join); no Anthropic key required. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
- Move the raw severity hex (#fab219/#ec835a) into --severity-* tokens in globals.css, honoring the "never raw hex in components" rule. - Drop the dead `vwap !== null` filter in VwapChart (VolumeRow.vwap is a non-null number from the engine's NOT NULL column). - Include volatility in the metrics empty-state check so all three series gate it, not just ofi/volume. - Document BACKEND_URL (the dashboard's API proxy target) in .env.example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ldy7vSi5nzVnDygUYUHV6P
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.
Small, focused hardening on top of the v0.1.0 release (
c33705b) — nothing here changes the vertical slice's behavior on the shipped synthetic data; it closes latent-input holes and a CI blind spot before the code goes public.Changes
fix(engine)— harden tick price and window parsingpricewas never validated at parse, unlikesize. It feeds VWAP and the log-returnln(price / prev), so a zero, negative or non-finite price producedinf/NaNrealized volatility that was written to SQLite and later serialized as invalid JSON. Added afinite_positive_priceserde validator mirroringpositive_size— the exact class of latent hole the Phase-3 zero-size fix already closed.parse_windowmultipliedvalue * unit_nsunchecked; a huge--windowoverflowed i64 and silently wrapped in release builds. Now useschecked_muland returns a clear "too large" error.ci— guard the cross-language pipelinescripts/demo.sh/scripts/verify_pipeline.sh, so the flagshipmake demopath could break while CI stayed green. Added anintegrationjob runningverify_pipeline.sh(tape → Rust engine → metrics DB → journal seed → regime join); no Anthropic key required.fix(dashboard)— color tokens, dead-filter and empty-state polish--severity-*tokens (honors the "never raw hex in components" rule).vwap !== nullfilter inVwapChart(the column isNOT NULL).BACKEND_URLin.env.example.Verification (all green, locally)
cargo fmt·clippy -D warnings· 15/15 tests (3 new: zero price, negative price, window overflow)ruff check+format· 71/71 pytestlint·typecheck· 27/27 tests ·buildverify_pipeline.sh(5000 ticks → 501 buckets → 12/12 journal joins)