Skip to content

Extract pure watch rebuild planning from DomStack - #306

Open
bcomnes wants to merge 1 commit into
bret/file-conventionsfrom
bret/watch-planner
Open

Extract pure watch rebuild planning from DomStack#306
bcomnes wants to merge 1 commit into
bret/file-conventionsfrom
bret/watch-planner

Conversation

@bcomnes

@bcomnes bcomnes commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #297. Stacked on #305 after #303, rebased onto master after #311 and #294 landed.

  • Extract pure filesystem-event classification and rebuild planning into lib/watch-plan.js.
  • Plans explicitly describe skips, full rebuilds, esbuild restarts, and source-page/template/generated-owner filters.
  • Keep resource ownership, discovery, execution, logging, and successful output state updates in DomStack.
  • Preserve the merged routing rules by combining every direct and imported consumer, including modules shared between browser entry points and server-side consumers.
  • Recompute global data when one of its imports changes even if that file has no direct output consumers; the page worker continues to choose subscribers by comparing values.
  • Preserve full-page retries after failures and the resolved layout-chain maps from successful builds.
  • Leave map refreshes with successful page builds rather than adding a redundant planner-owned refresh flag.

Validation

  • Full Node suite, TypeScript, ESLint, installed dependency checks, and Playwright passed after rebasing onto the merged layout/subscription work.
  • Filesystem-watch tests used Chokidar polling because native watchers are exhausted on this host.
  • Nine pure planner tests run without file watching, filesystem fixtures, or sleeps, covering settings, consumer unions, deduplication, snapshot immutability, generated owners, global-data-only imports, browser/server overlap, failure recovery, structural events, and bundle scopes.

Scope

This is the first organization/testability step, not a wider one-shot/watch pipeline rewrite. Stable watch filenames, disabled watch manifests, and existing conservative structural fallbacks remain unchanged.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 34148153534

Coverage increased (+0.7%) to 95.178%

Details

  • Coverage increased (+0.7%) from the base build.
  • Patch coverage: 3 uncovered changes across 1 file (239 of 242 lines covered, 98.76%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
index.js 79 76 96.2%
Total (2 files) 242 239 98.76%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 7320
Covered Lines: 7134
Line Coverage: 97.46%
Relevant Branches: 1930
Covered Branches: 1670
Branch Coverage: 86.53%
Branches in Coverage %: Yes
Coverage Strength: 196.52 hits per line

💛 - Coveralls

@bcomnes
bcomnes marked this pull request as ready for review September 7, 2026 21:37
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.

Extract watch rebuild planning from DomStack

1 participant