Repository navigation
fix: memoize snapshot method calls in Strong mode - #862
Merged
domgan-oai merged 3 commits intoAug 26, 2026
Merged
domgan-oai merged 3 commits into
domgan-oai merged 3 commits into
Conversation
domgan-oai
marked this pull request as ready for review
August 26, 2026 16:43
7 of 8 tasks
fix: make PR 862 CI-ready and clarify Strong mode
9 tasks done
7 of 8 tasks
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
Addresses #846. The reported remove callback captures the entire current list, so replacing that list must still refresh surviving rows' handlers. This change does not promise that every original row body can be skipped in that example.
Validation
Intentionally opened as an unvalidated draft, as requested. This is not ready to merge.
pnpm format:checkpnpm typecheckpnpm testfor.test.tsandcompiler/strong-mode.test.tssuites in the applicable development and production projectsnode benchmarks/bench.mjs --ratios template-call-memopnpm syncDependency installation was blocked by the configured registry's security policy for
@tsrx/[email protected]and@tsrx/[email protected]. Test and typecheck attempts did not reach execution; the benchmark could not start with the incomplete dependency tree. No test, typecheck, formatting, benchmark, or CI success is claimed.The required sync was attempted without triggering another dependency download. It reached
cli:dataand stopped becauseprettierwas unavailable. The generators that ran produced no additional Git diff.Earlier static checks passed:
node --checkon the two modified compiler JavaScript files and the benchmark runners, plusgit diff --check. These establish syntax and whitespace only, not behavioral correctness or performance.Risk / follow-ups
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes production memoization semantics for Strong modules and expand compiler purity rules; incorrect alias or capture analysis could cause stale UI, though compatibility mode and conservative fallbacks limit blast radius.
Overview
Strong mode now treats opted-in modules as an immutable render-snapshot contract: production client builds can memoize statically named receiver calls (e.g.
row.read(suffix)) and reuse keyed list rows when inputs and captures are unchanged. Compatibility mode still treats member calls as live and does not apply this fast path.The compiler adds bounded Strong diagnostics for provable state-snapshot mutations (
OCTANE_STRONG_RENDER_SNAPSHOT_MUTATION) and direct clock/random reads during render (OCTANE_STRONG_RENDER_IMPURE_CALL), with hook/ref/callback guards so hooks, refs, opaque globals, and callback arguments stay conservative. Docs clarify that keys preserve DOM identity,console.login rows does not block Strong reuse, and handlers that close over the parent list still force survivor updates.A new
template-call-memobenchmark (runner manifest, ratio baselines, MCP exposure) counts receiver invocations for Strong vs compatibility. Regression coverage spans list/capture/ref/hook scenarios, expandedstrong-modecompiler tests, and ApollouseQueryrejecting Strong when it mutates snapshots.Reviewed by Cursor Bugbot for commit 70fd1db. Bugbot is set up for automated code reviews on this repo. Configure here.