Skip to content

fix: preserve saturated lazy ROC call clocks#64

Merged
luisleo526 merged 1 commit into
mainfrom
codex/quant-saturated-q1-production-public
Jul 16, 2026
Merged

fix: preserve saturated lazy ROC call clocks#64
luisleo526 merged 1 commit into
mainfrom
codex/quant-saturated-q1-production-public

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Outcome

Preserve TradingView's observed saturated lazy-call clock for the two direct ta.roc(close, 3) sites in QuantByBoji without changing ROC globally.

  • gives each selected callsite its own copyable clock
  • keeps eager close[3] behavior for first call and gap-one/two cases
  • uses the previous committed call sample only after a saturated gap of at least three bars
  • supports same-bar recomputation, lifecycle reset, and calc-on-order-fill checkpoint/restore
  • allocates collision-safe generated names
  • selects by AST shape and builtin binding, never slug, generated member number, or comparator polarity

The classifier is deliberately fail-closed. It excludes UDF, request.security, or, ternary, aliased/dynamic source, non-literal/other length, named/dynamic argument, nested control-flow, reassignment, expression-statement, and user-shadowed close shapes.

TradingView evidence

The long sites were pinned by E2/E4/E5. The separately reviewed one-shot S2 short-site oracle is public in pinescript-scrapper PR #29:

  • exact 60-row ordinary prefix
  • 8 trace trades / 16 payload copies
  • reached ROC +0.038753340977, uniquely saturated q1
  • eager/q3 absolute errors 1.025336599509 / 1.139529453306
  • fail-closed audit PASS

Exact target gate

  • engine/TV/strict/price exact: 136/136/136/136
  • count absolute delta: 0
  • entry/exit/PnL P90: 0 / 0 / 0
  • generated C++: e39e7a9fc89c4198e9b2a6b799acd05851d760c001154c4dbfa2071683729bbc
  • engine tape: ef65c3fc2d10c1c8754f43a0d2a5912ba4617988b6ca951a10cdfb6d0cd50eee

The rebase onto public codegen 228fe316 preserved stable patch-ID 7de31e6b. Versus the pre-rebase generated Quant output, the only additional base delta is the already-published argument-preserving strategy.close_all("END of DAY", ...); the engine tape remains byte-identical.

Regression gates

  • full codegen suite: exit 0, 1,348 collected with 2 existing skips
  • focused lazy-ROC compile/runtime and close-all/signature/support suites: PASS
  • independent classifier/lifecycle/COOF/name-collision cold review: PASS
  • public engine/corpus tree: engine 2dc25ec89711324c8cd028d78680a39ed7c9b389, corpus aeff79e4af1052528010e1b9cded5dd0cc677021
  • forced-no-cache scraper sweep: 412/412 accounted (404 ok + 1 no-trades + 6 transpile + 1 existing run error)
  • board: 344 Excellent / 50 Strong / 3 Moderate / 5 Weak
  • tier movement: QuantByBoji Moderate -> Excellent, 1 UP / 0 DOWN
  • final tier report: 03367c5edc5f962311ed691172e75d44e883f604afebd8ac17d0913f265f6845
  • explicit pre-patch baseline: dd5708c05880094833dde07769ba6df1e21c0b41b9d7fdb7358c44f02a5bfc9d
  • git diff --check: PASS

@luisleo526 luisleo526 merged commit a976997 into main Jul 16, 2026
9 checks passed
@luisleo526 luisleo526 deleted the codex/quant-saturated-q1-production-public branch July 16, 2026 14:34
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