Skip to content

fix(codegen): recover 3 strategies — drawing-handle returns, time_close, text.align on table params#34

Merged
luisleo526 merged 1 commit into
mainfrom
fix/transpile-recoveries-drawing-handle-time-close-text-align
Jun 30, 2026
Merged

fix(codegen): recover 3 strategies — drawing-handle returns, time_close, text.align on table params#34
luisleo526 merged 1 commit into
mainfrom
fix/transpile-recoveries-drawing-handle-time-close-text-align

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Four root-causes, each unblocking a previously-rejected real strategy; all proven by re-running to high parity. Full gate green (1395 passed, 1 skipped, 0 failed; 254-corpus compile clean), 6 teeth tests, 0 regressions.

Fixes

  • Drawing-handle UDF return-type inference (analyzer/base.py + emit_top.py): a UDF whose terminal return is a bare Identifier bound to a line/box/label/linefill local, or an if-terminal yielding label.new(...), now infers the handle type; emit_top brace-inits drawing/UDT returns (was Label _func_ret = 0.0;, clang-rejected). → lukeborgerding (setTradeLine) + parallax (makeEventLabel).
  • time_close (support_checker): the DIVERGENT_VARS_ERROR entry was stale — the engine's time_close() already returns the true bar-close. Removed the guard + the now-invalid fixture.
  • security cosmetic-kwarg false positive (analyzer/base.py): _collect_security_mutable_globals walked input.*() cosmetic kwargs (group/tooltip/…), wrongly tripping the TA-ctor reject on ta.ema(close, len)[1] where len is a constant input. Now only the defval is walked.
  • text.align on table/drawing param methods (support_checker + parser + codegen): <tablevar>.cell(text_align=…) on a table-typed param accepted as a visual constant; fixed a real parser bug where a multi-line UDF param using generic syntax (array<float>/matrix<>/map<>) failed to parse and leaked its body to top scope; table/polyline method calls on var/param receivers dropped (no C++ representation). → concordance.

Validation

Strategy Before After
lukeborgerding-orb-avwap-retest transpile-error 100.0% (290/290), px 100%
officialjackofalltrades-parallax transpile-error 98.7% (985/998), px 100%
officialjackofalltrades-concordance transpile-error 99.6% (1563/1570), px 100%

Broad 100-strategy sweep: ok 89→92, transpile-error 11→8, no parity drops.

Deferred (left as clean transpile-rejects): masayanfx (per-callsite TF monomorphization) + bch-HA (heikinashi HA evaluator mode) — both need deep, regression-risky rework of the ~1.5k-loc security mixin.

🤖 Generated with Claude Code

…se, text.align on table params

Four root-causes, each unblocking a previously-rejected real strategy; all proven
by re-running the strategy to high parity, full gate green (1395 passed, 1
skipped, 0 failed; 254-corpus compile clean), 6 teeth tests added, 0 regressions.

- Drawing-handle UDF return-type inference (analyzer/base.py + emit_top.py): a UDF
  whose terminal return is a bare Identifier bound to a line/box/label/linefill
  local, or an if-terminal yielding label.new(...), now infers the handle type;
  emit_top brace-inits drawing/UDT returns (was `Label _func_ret = 0.0;`, clang
  rejected). Unblocks lukeborgerding (setTradeLine) + parallax (makeEventLabel).
- time_close (support_checker): the DIVERGENT_VARS_ERROR entry was STALE — the
  engine's time_close() already returns the true bar-close (bar_open + tf). Removed
  the guard + the now-invalid gate-corpus fixture.
- security cosmetic-kwarg false positive (analyzer/base.py): _collect_security_mutable_globals
  walked input.*() cosmetic kwargs (group/tooltip/title/…) when classifying mutable
  globals, wrongly tripping the TA-ctor reject on ta.ema(close, len)[1] where len is
  a constant input. Now only the defval is walked.
- text.align on table/drawing PARAM methods (support_checker + parser + codegen):
  <tablevar>.cell(text_align=text.align_left) on a table-typed param is accepted as
  a visual constant; fixed a real parser bug where a multi-line UDF param using
  generic syntax (array<float>/matrix<>/map<>) failed to parse and leaked its body
  to top scope; table/polyline method calls on var/param receivers are dropped
  (no C++ representation). Unblocks concordance.

lukeborgerding transpile-error -> 100.0% (290/290); parallax -> 98.7% (985/998);
concordance -> 99.6% (1563/1570); all price-exact 100%. Broad sweep: ok 89->92,
transpile-error 11->8, no parity drops. masayanfx (per-callsite TF monomorphization)
and bch-HA (heikinashi HA evaluator mode) deferred — both need deep, regression-risky
rework of the ~1.5k-loc security mixin; left as clean transpile-rejects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@luisleo526 luisleo526 merged commit 84e5105 into main Jun 30, 2026
9 checks passed
@luisleo526 luisleo526 deleted the fix/transpile-recoveries-drawing-handle-time-close-text-align branch June 30, 2026 18:43
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