fix(codegen): recover 3 strategies — drawing-handle returns, time_close, text.align on table params#34
Merged
luisleo526 merged 1 commit intoJun 30, 2026
Conversation
…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>
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.
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
analyzer/base.py+emit_top.py): a UDF whose terminal return is a bare Identifier bound to aline/box/label/linefilllocal, or an if-terminal yieldinglabel.new(...), now infers the handle type;emit_topbrace-inits drawing/UDT returns (wasLabel _func_ret = 0.0;, clang-rejected). → lukeborgerding (setTradeLine) + parallax (makeEventLabel).time_close(support_checker): theDIVERGENT_VARS_ERRORentry was stale — the engine'stime_close()already returns the true bar-close. Removed the guard + the now-invalid fixture.analyzer/base.py):_collect_security_mutable_globalswalkedinput.*()cosmetic kwargs (group/tooltip/…), wrongly tripping the TA-ctor reject onta.ema(close, len)[1]wherelenis a constant input. Now only the defval is walked.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
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