fix(examples/rsc-agent-runtime): dedupe Runtime App reloads by emitted content (#200) - #332
Conversation
Use the App compiler's in-memory asset bytes as the reload identity so split watch completions cannot spend extra generations when Rspack stats hashes drift.
The identity migration (#322) surfaces packageVersion in project source status; the overview handoff assertion predates it on this branch's base.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
stats.hashfor the App environment is NOT stable across split watch completions whose emitted bytes are identical (observed identical asset SHA-256769426…whilestats.hashdrifted14b134…→cb39be…). The reload announcer deduped bystats.hash, so a load-split recompile of unchanged output minted an extra owned-reload generation —expectMonotonicOwnedReloadFramesthen saw generation 3 against the two-edit budget.runtimeAppReloadPluginnow derives reload identity from the App compiler's in-memory emitted assets (length-prefixed, name-sorted SHA-256 over names and bytes). An unchanged-output recompile never announces; an unreadable asset set stays at-least-once without clobbering the retained identity. Proxy/shell generation-ordinal semantics are unchanged.overview.e2ekeeps its monotonicity proof and theownedReloadGenerationBudget = 2ceiling — now deterministic — and drops the{ retry: 2 }interim from test: retry the overview handoff e2e while the reload-budget flake stays open (#200) #203. Comments updated.packageVersionin project source identity, which Finish identity migration and expose Workbench provenance #322 began surfacing (the assertion was red on unmodified main; reproduces without this branch).Evidence
dev-provider.integration.test.ts41/41.overview.e2e.test.tswith the retry removed (5 pre-rebase, 5 post-rebase including the fix(dev): deduplicate unchanged watcher events by path signature (#122) #329/fix(test): scale MCP App readiness polling and drop the #122 retry #330 landings), at load average up to 89.Closes #200.