Skip to content

feature/go-runner-extras#2

Merged
bvasilenko merged 203 commits into
masterfrom
feature/go-runner-extras
Apr 3, 2026
Merged

feature/go-runner-extras#2
bvasilenko merged 203 commits into
masterfrom
feature/go-runner-extras

Conversation

@bvasilenko
Copy link
Copy Markdown
Collaborator

@bvasilenko bvasilenko commented Jan 14, 2026

Go Runner PoC

Performance

  • Total: <50ms (excl. data fetch)
  • Go parser: 5-10ms
  • Go runtime: <10ms

License Safety

  • Go stdlib (BSD-3-Clause)
  • participle/v2 (MIT)
  • Pure Go TA
# Blocker Scope Strategies Evidence
1 Composite indicator preamble duplication in branched code RESOLVED: TempVarEmissionTracker deduplicates per-statement vs inline emission paths. ConditionalExpression boolean wrapping via BooleanConverter. alpha temp_var_emission_tracker.go, temp_var_inline_deduplicator.go, boolean_converter.go
2 Arrow function for-loop scope resolution RESOLVED: 6 sub-fixes — (A) series parameters typed *series.Series with GetCurrent() access, (B) for-loop iterators emit float64(i) not iSeries, (C) v3 n alias mapped to bar_index, (D) string equality comparison codegen, (E) cross-scope variable capture via OuterScopeCaptureAnalyzer, (F) dual call-site capture injection emperor-ma arrow_function_codegen.go, arrow_series_access_resolver.go, builtin_identifier_registry.go, generator.go, arrow_outer_scope_capture.go, arrow_parameter_analyzer.go, argument_expression_generator.go, call_handler_user_defined.go
3 bar_index codegen edge cases RESOLVED: bar_index reclassified from ohlcvFields into dedicated integerSeriesBuiltins category. IsIntegerSeriesBuiltin + IntegerSeriesBuiltinNames added to registry. IsBuiltinSeriesIdentifier updated to include integerSeriesBuiltins. Modulo emits float64(i % N). All 4 e2e fixtures activated; TestBarIndexHistorical unblocked. builtin_identifier_registry.go, builtin_identifier_registry_test.go, arrow_builtin_subscript_test.go, bar_index_test.go
4 v4→v5 preprocessor and identifier compatibility RESOLVED: 7 fixes — (A) V4BuiltinIdentifierTransformer qualifies 9 bare v4 identifiers (tickerid/ticker/period/interval/isintraday/isdwm/isdaily/isweekly/ismonthly) with UDF param shadow tracking, (B) arrow function scope leak via cloneSymbolTable, (C) ticker constructor type inference registry, (D) multiline expression continuation INDENT suppression in lexer, (E) expectingIndent leak reset at line boundaries, (F) \r carriage return stripping in ExpandTabs, (G) removed destructive NormalizeIfBlocks from pipeline. zigzag/zigzag-pa: Parse ✅ Generate ✅ Compile ✅ Execute ⏳ (needs 60-min data fixture). ultima: Parse ✅ Generate ❌ (time() IIFE not implemented — separate scope) zigzag, zigzag-pa, ultima v4_builtin_identifier_transformer.go, member_access_rewriter.go, token_classifier.go, indentation_lexer.go, ticker_function_registry.go, arrow_function_codegen.go, whitespace.go
5 Incomplete ta.* function coverage RESOLVED: 58 of 58 official ta.* members implemented (52 single-output + 6 tuple). Missing functions (0): pivot_point_levels, kc, supertrend, tr (function overload), vwap. Missing tuple returns (0): kc (3-tuple), supertrend (2-tuple). Missing variables (0): ta.accdist, ta.iii, ta.nvi, ta.obv, ta.pvi, ta.pvt, ta.wad, ta.wvad. Implemented: sma, ema, stdev, wma, dev, atr, rma, rsi, change, pivothigh, pivotlow, crossover, crossunder, fixnan, sum, valuewhen, highest, lowest, linreg, macd, bb, stoch, dmi, max, min, median, mode, range, variance, cmo, cross, falling, highestbars, lowestbars, mom, roc, rising, wpr, barssince, mfi, cum, vwma, swma, cci, bbw, cog, tsi, alma, correlation, hma, kcw, percentile_linear_interpolation, percentile_nearest_rank, percentrank, sar, kc, supertrend, tr, pivot_point_levels, vwap alpha, aostoch ta_function_handler.go:33, tuple_indicator_registry.go, ta_signatures*.go
6 Self-referencing series initial value semantics RESOLVED: Root cause was composite indicator (MFI/RSI) internal state series not advanced when hoisted to temp vars by TempVariableManager.GenerateNextCalls(). Fix: mirror the compositeIndicatorRegistry.GetInternalSeriesNames() query already used by GenerateDeclarations() and GenerateInitializations(). alpha.pine now produces 10 trades. alpha temp_variable_manager.go:GenerateNextCalls(), ta_composite_inline_test.go
7 Non-HA chart type transformers return identity RESOLVED: All 6 chart types via ticker.* constructors fully implemented: heikinashi, renko, kagi, linebreak, pointfigure, range. Renko → NewRenkoTransformer, Kagi → NewKagiTransformer, LineBreak → NewLineBreakTransformer, PointFigure → NewPointFigureTransformer. Range → IdentityTransformer (passthrough). TransformResult struct pairs synthetic bars with MainToSynthetic mapping. ModeTransformed + BuildMappingFromTransform in SecurityBarMapper. transformerConstructorCode emits typed constructors for literal params, NewTransformer fallback for runtime. generateModifierCall fixed for multi-param modifiers. symbol_extractor.go handles ticker.pointfigure. Integration tests cover all 5 typed constructors + non-literal fallback renko_transformer.go, kagi_transformer.go, line_break_transformer.go, point_figure_transformer.go, transform_result.go, transformer_params.go, security_bar_mapper.go, security_inject.go, security_runtime_resolver.go, symbol_extractor.go, security_chart_type_test.go
8 Array data structure (array.*) RESOLVED: 55 of 55 official array.* functions implemented (array.get, array.size, array.new_float, array.new_int, array.new_bool, array.new_color, array.new_string, array.from, array.set, array.push, array.pop, array.shift, array.unshift, array.insert, array.remove, array.clear, array.fill, array.reverse, array.sort, array.concat, array.first, array.last, array.includes, array.indexof, array.lastindexof, array.slice, array.copy, array.sort_indices, array.sum, array.avg, array.min, array.max, array.median, array.mode, array.stdev, array.variance, array.range, array.percentile_linear_interpolation, array.percentile_nearest_rank, array.percentrank, array.covariance, array.standardize, array.abs, array.binary_search, array.binary_search_leftmost, array.binary_search_rightmost, array.every, array.some, array.join, array.new_label, array.new_line, array.new_box, array.new_table, array.new_linefill via array_call_handler.go, array_constructor_handler.go, array_constructor_classifier.go, array_element_type.go, array_constructor_type_resolver.go, array_variable_registry.go, array_mutator_codegen.go, array_reader_codegen.go). new<type> generic syntax resolved via RewriteGenericTypeSyntax preprocessor (text-level rewrite before parsing, unblocked by #18 resolution). Typed codegen routing complete: all array operations route through ArrayElementType for type-aware code generation (string vs float). array_call_handler.go, array_constructor_handler.go, array_constructor_classifier.go, array_element_type.go, array_constructor_type_resolver.go, array_variable_registry.go, array_mutator_codegen.go, array_reader_codegen.go, generic_type_syntax_rewriter.go

@bvasilenko bvasilenko self-assigned this Jan 14, 2026
@github-actions
Copy link
Copy Markdown

⏱️ Time Estimation

Scope: Branch commits only (28beb5b..c12cc18)

Based on commit timestamp analysis (0.5h session threshold)

  • Boris Vasilenko: 1.8h (5 commits)

Total: 1.8h across 5 commits

…torage with direct Series in state managers, and add security TA integration tests
…rsSince state manager with ForwardSeriesBuffer, and end-to-end regression tests
…riesOffsetShifter extraction, IIFE bounds-checked OHLCV pattern support, and end-to-end integration tests
…Expression with BarEvaluator interface, expressionKey cache isolation, and end-to-end regression tests
…float) with open registry dispatch, ta.* alias routing, and end-to-end regression tests
…er resolver, v3 alias registry, loop counter float64 cast, and end-to-end regression tests
…ring parameter detection via equality comparison codegen, dual call-site capture registry, and end-to-end regression tests
…support, strategy.close/close_all safe snapshot multi-trade closing, and end-to-end integration tests
…eak/pointfigure qualification with heikenashi typo tolerance, and end-to-end regression tests
@github-actions
Copy link
Copy Markdown

⏱️ Time Estimation

Scope: Branch commits only (28beb5b..240dce6)

Based on commit timestamp analysis (0.5h session threshold)

  • Boris Vasilenko: 107.9h (187 commits)

Total: 107.9h across 187 commits

bvasilenko and others added 9 commits March 20, 2026 00:22
…ns with UDF shadow tracking, lexer continuation-operator INDENT suppression and expectingIndent leak reset, arrow function cloneSymbolTable scope isolation, ticker constructor type inference registry, \r stripping, remove destructive NormalizeIfBlocks, and end-to-end golden tests
…ctor StatefulIndicatorBuilder source abstraction, add golden test comparison infrastructure
…t mapping, ModeTransformed SecurityBarMapper, typed constructor codegen with non-literal fallback, generateModifierCall multi-param fix, ticker.pointfigure symbol extraction, and integration tests
…, mutators, accessors, transformers, statistics), ArrayConstructorClassifier/Handler/MutatorCodegen/ReaderCodegen codegen pipeline, order.ascending MemberExpression resolution, ExpressionStatement newline fix, template arrayops import, and end-to-end integration tests
…, join), array.new_color constructor, string literal %q codegen fix, ArrayConstructorClassifier with 74-case test suite, and end-to-end integration tests
…ing, NormalizeLogicalOperator DRY consolidation, and moon.pine golden tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… replacing O(N²) backward scan, and end-to-end security valuewhen integration tests
…w_table, new_linefill) with IsDrawingArrayConstructor classifier, codegen/regression integration tests
…uewhenStateManager, with capacity invariant/idempotency/eviction contract tests
@github-actions
Copy link
Copy Markdown

⏱️ Time Estimation

Scope: Branch commits only (28beb5b..e81341d)

Based on commit timestamp analysis (0.5h session threshold)

  • Boris Vasilenko: 113.7h (195 commits)

Total: 113.7h across 195 commits

…y runtime (StringArraySeries, StringMutators, StringAccessors, StringTransformers, StringFormatters), dead code deletion (ArrayVariableType, ArrayOperationCodegenRouter, ArrayTypeResolver), SAR algorithm security tests, and integration/behavioral test suites
… shared forwardBuffer primitive, restore extrema.go NaN neighbor blocking, add matchRing O(1) occurrence lookup, valuewhen NaN condition rejection via value.IsTrue, and end-to-end regression tests
…ufferCore embedding, RSI/TSI scalar state elimination, growsFor capacity guard, and unit/regression tests for CUM, BarsSince, SAR, EMA arithmetic, historical subscript, and directional invariants
…ityEvaluatorInitializer, arrow IIFE evaluator persistence via arrowSecEvals map, RANGE: modifier prefix in SecurityRuntimeResolver, SecurityBarMapper accessor/mode API, and end-to-end regression tests for range/linebreak/kagi/pointfigure chart types
…pe>/matrix.new<type>/map.new<K,V> constructor rewriting, pipeline integration after ExpandTabs, comment-aware line splitting, and unit/parser-integration/e2e test suites
…ies, delete FixnanState/WarmupStrategy/StateStorage/HashExpressionIdentifier, deduplicate test helpers against package-level primitives, add canonical access-pattern tests and end-to-end security regression tests for pivot fill, SMA warmup, and cache isolation
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

⏱️ Time Estimation

Scope: Branch commits only (28beb5b..448de8b)

Based on commit timestamp analysis (0.5h session threshold)

  • Boris Vasilenko: 116.4h (203 commits)

Total: 116.4h across 203 commits

@bvasilenko bvasilenko merged commit 26a3c62 into master Apr 3, 2026
1 check passed
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