Repository navigation
Audit round 4, phase C: fix the four findings that were ours - #8
Merged
Merged
Conversation
- fvg-mitigation.pine: guard the draw block with array.size(gaps) > 0 (a Pine `for` with the upper bound below the start counts down, so `for i = 0 to -1` ran and read an empty array); drop the stale "while is refused" - an all-empty run (every plot line without a value, nothing else drawn) now says so instead of "Ran · 0 series" - input.timeframe accepts Pine's spellings only; anything else is refused with a sentence - higher-timeframe rows are sorted oldest-first and deduplicated in the worker's source (newest-first rows made request.security return NaN everywhere) - test_audit_round4_fixes.py: study scripts run on flat/trend/sine data (the unguarded script is the control), timeframe table, tidyRows, emptyPlots and its wiring; each fix mutation-checked; the empty-run note and the timeframe refusal driven in Chromium. 1017 tests. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
|
✅ Clean pass · Architecture Inside the changed components — 2 viewsComponent view — Multi-timeframe Data Ingestion Higher-timeframe bars fetched from the backend are ordered and deduplicated before PineTS evaluation. Component view — Script Execution & Diagnostics The unified runner checks for empty plot series and surfaces clear diagnostics to the UI and agent. Data flow View
Tip Open a diagram on the canvas, then press W or click play to walk through the change one step at a time 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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
The four findings from the phase C engine matrix that were ours to fix. The engine-side findings (a
request.securitycall reached only under a last-bar condition returns NaN or throws, theforbound re-evaluation, and the rest) are upstream and are not in this PR.docs/studies/pine/fvg-mitigation.pinefailed at its default inputs on any data without a gap yet (Index 0 is out of bounds [array.get]). A Pineforwhose upper bound is below its start counts down, sofor i = 0 to shown - 1withshown == 0still ran. The draw block is now guarded byarray.size(gaps) > 0. Its stale comment that PineTS refuseswhileis gone (whileruns).input.timeframeaccepted "banana". Pine's spellings ("", "15", "240", "D", "1D", "4H", "W", "3M", "30S") are accepted; anything else is refused with a sentence, in the pane and for the agent.tidyRowsin the worker's source). Newest-first rows maderequest.securityreturn NaN on every bar./api/barsis already ascending, so for it nothing changes.Testing
test_audit_round4_fixes.py(10 tests): the repo's study scripts run on flat, trending and sine data; the unguardedfvg-mitigationis the control and fails with the audit's exact error; timeframe table;tidyRows;emptyPlotsand its wiring. Each fix is mutation-checked.fastmcp/ a real engine).🤖 Generated with Claude Code
https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
Generated by Claude Code