Repository navigation
fix(compile): stop dual-writing the compile-state satellite nobody reads (#5389) - #5571
Conversation
…ads (#5389) Every NodeType hub activation installed NodeTypeCompileStateMirror, which wrote {type}/_Activity/compile-state: one CreateOrUpdateNodeRequest per activation through the node-operation hub, and one extra grain activation per NodeType whenever the state moved (every framework roll re-stamps every type). Phase 2 of #748 (moving readers onto the satellite) never happened, so nothing in core, Plugins or the samples reads it. On memex-cloud, running images that contain #5327/#5375, those satellites were the destinations of the boot-time placement timeouts (#5334, 9 of 10 samples), the stalled-resolution activation faults (#5531, 6 of 7) and 8 of 51 back-pressure oldest legs. MeshDataSource no longer installs the mirror. Install stays as an [Obsolete] member so in-mesh callers keep compiling. Test pinned with positive controls on both sides; a negative control with the install restored fails the assertion. Refs #5389 #5037 #5334 #5531 #4141 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the documentation inconsistency and revise the negative test's missing-node check.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Retires the unused compile-state satellite mirror to reduce NodeType activation and routing overhead.
Changes:
- Stops installing the mirror from
MeshDataSource. - Retains compatibility helpers and marks installation obsolete.
- Adds regression coverage and retirement documentation.
| File | Summary | Review notes |
|---|---|---|
test/MeshWeaver.Graph.Test/NodeTypeCompileStateMirrorTest.cs |
Verifies no satellite is written. | Moderate: avoid repeated point-reads for the negative check. |
src/MeshWeaver.Graph/MeshDataSource.cs |
Removes mirror installation. | No review comment. |
src/MeshWeaver.Documentation/Data/Architecture/CompileStateSatelliteRetired.md |
Documents retirement and evidence. | Nit: update other architecture pages that still describe the satellite as active. |
src/MeshWeaver.Documentation/Data/Architecture.md |
Adds the architecture topic entry. | No review comment. |
src/MeshWeaver.Compiler.Pipeline/NodeTypeCompileState.cs |
Retains helpers and obsoletes installation. | Moderate: clarify that the write-discipline documentation is historical. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| var satellite = await Observable.Interval(TimeSpan.FromMilliseconds(250)).StartWith(0L) | ||
| .Take(20) | ||
| .SelectMany(_ => ReadNode(statePath)) | ||
| .Where(n => n is not null) | ||
| .FirstOrDefaultAsync() |
There was a problem hiding this comment.
Agreed, fixed in 6c4ff20. Both the negative check and the instrument's positive control now read existence off a path:{type}/_Activity scope:children listing (the Initial snapshot). A point read is now used only for the NodeType node, which is known to exist.
The positive control proves the listing sees a satellite that was written directly. I re-ran the negative control with the listing instrument: with Install restored in MeshDataSource, the test fails on the assertion. With the fix it passes.
| Batching would have kept a write that has no reader. So `MeshDataSource` no longer installs the | ||
| mirror, and `NodeTypeCompileStateMirror.Install` is `[Obsolete]` rather than deleted. A caller in | ||
| in-mesh source is invisible to every CI build, so deleting the method would break that caller at | ||
| runtime compile. The value shape (`StatePath`, `StateNode`, `Parse`) stays, so satellites that | ||
| already exist can still be read. They are now inert records. |
There was a problem hiding this comment.
Agreed, fixed in 6c4ff20. These pages now say the satellite is retired, link CompileStateSatelliteRetired, and point readers at the NodeType node:
ExecuteTimeInterlockNodeTypeCompilationMissingDeclaredSourcesReleaseFailureClassesRebakeWaves(now in the past tense)AParkedTypeNamesTheImport
Mentions that are historical (incident timelines, DisposalStallVerdicts, BakeSealNodeOpsSaturation) are left as they are. ArchitectureTopicMapTest and DocumentationLinkIntegrityTest pass (5/5).
…ite in the docs that still named it live (#5389) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iteralRatchetGuard 381 > 380) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>


What this removes
On every NodeType hub activation,
MeshDataSourceinstalledNodeTypeCompileStateMirror, which wrote the fixed-id satellite{type}/_Activity/compile-state. That cost:CreateOrUpdateNodeRequestthrough the node-operation hub on every activation;Phase 2 of #748 (moving readers onto the satellite) never happened. Nothing reads the satellite in core
src/, in MeshWeaver.Pluginsorigin/mainor in the samples. Every gate and view reads the NodeType node itself, including Plugins'Store/PublishingReadCompileState.Evidence (memex-cloud, 2026-09-23, images that contain #5327/#5375)
Admin/_LogIncident/f7d8f9982b20cce5— placement timeouts (#5334)messagehub/*/_Activity/compile-stateAdmin/_LogIncident/df1ef8b39a2d8601—QueryProviderStalledExceptionat activation (#5531)cache/*(15)Plugins' gate had already measured the same writes as the per-package nodeops tax (#4141, folded into #2543 without an answer).
Change
MeshDataSourceno longer installs the mirror.NodeTypeCompileStateMirror.Installis[Obsolete], not deleted. In-mesh callers are invisible to CI, so a deletion could break them at runtime compile.StatePath,StateNodeandParsestay. Satellites already on disk are now inert records.Doc/Architecture/CompileStateSatelliteRetired, added to the Architecture topic map.Verification
NodeTypeCompileStateMirrorTest.NodeTypeActivationAndStateChange_WriteNoCompileStateSatelliteruns on a real mesh with two positive controls:Installcall restored inMeshDataSource, the test fails on its assertion ("a NodeType activation must not write MirrorSpace/Widget/_Activity/compile-state").dotnet build -c Release -warnaserror, run one project at a time onMeshWeaver.Compiler.Pipeline,MeshWeaver.Graph,MeshWeaver.Graph.TestandMeshWeaver.Documentation.Test: 0 errors on each.ArchitectureTopicMapTestandDocumentationLinkIntegrityTestpass (5/5).Not established
cache/*, and the per-user_Install/_Access/_Entitlementslegs are untouched.The post-roll read that settles #5389, #5037 and #5334: the next boots on an image carrying this change should show no
*/_Activity/compile-statedestinations in placement timeouts, activation faults or back-pressure oldest legs.No recycle is needed; this takes effect as hubs activate on the new image.
Refs #5389 #5037 #5334 #5531 #4141 #748
🤖 Generated with Claude Code