Skip to content

fix(runtime-tags): link a <define> scope that only its calls read through - #4497

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-persisted-pages-xh8764-main-fixes.nested-define-owner
Oct 22, 2026
Merged

DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-persisted-pages-xh8764-main-fixes.nested-define-owner

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

A <define> that renders another <define> (<define/E>…</define><define/D><E/></define><D/>) threw on client render and on a later resume: E's owner link reads D's own owner, but D's body reads nothing of its owner itself, so D's link was never emitted and E's closure subscription found undefined.

The link from a call to its body's owner is an owner read across the call's section chain, so a body that reads its owner now marks its call sections the same way closures and refs already do, and a solve rule writes that link on resume only where the client can create the inner call. Existing output and the floors are unchanged.

🤖 Generated with Claude Code

…hrough

A `<define>` call links its body's scope to the body's owner through the
calling scopes, but only reads of the calling body's own closures marked it
as reading its owner. A body that only called another `<define>`, whose body
read the template's values, never got its own owner link, so the inner call
copied `undefined` and the client render threw. A body that reads its owner
now marks each of its calls' scopes up to its owner, and those links resume
when the client can create the calling scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DylanPiercey
DylanPiercey merged commit 526ac6d into main Oct 22, 2026
8 checks passed
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.84%. Comparing base (0209cae) to head (1704826).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4497   +/-   ##
=======================================
  Coverage   94.84%   94.84%           
=======================================
  Files         419      419           
  Lines       20853    20860    +7     
  Branches     4158     4160    +2     
=======================================
+ Hits        19778    19785    +7     
  Misses        617      617           
  Partials      458      458           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot mentioned this pull request Oct 22, 2026
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