Skip to content

fix(compile): stop dual-writing the compile-state satellite nobody reads (#5389) - #5571

Merged
meshweaver-cloud[bot] merged 3 commits into
mainfrom
fix/compile-state-mirror-burst
Sep 23, 2026
Merged

meshweaver-cloud[bot] merged 3 commits into
mainfrom
fix/compile-state-mirror-burst

Conversation

@rbuergi

@rbuergi rbuergi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What this removes

On every NodeType hub activation, MeshDataSource installed NodeTypeCompileStateMirror, which wrote the fixed-id satellite {type}/_Activity/compile-state. That cost:

  • one CreateOrUpdateNodeRequest through the node-operation hub on every activation;
  • one extra grain activation per NodeType whenever the state moved. A framework roll re-stamps every type, which is about 371 on memex-cloud.

Phase 2 of #748 (moving readers onto the satellite) never happened. Nothing reads the satellite in core src/, in MeshWeaver.Plugins origin/main or in the samples. Every gate and view reads the NodeType node itself, including Plugins' Store/Publishing ReadCompileState.

Evidence (memex-cloud, 2026-09-23, images that contain #5327/#5375)

instrument reading
Admin/_LogIncident/f7d8f9982b20cce5 — placement timeouts (#5334) 9 of 10 retained samples at 14:22Z are messagehub/*/_Activity/compile-state
Admin/_LogIncident/df1ef8b39a2d8601 — QueryProviderStalledException at activation (#5531) 6 of 7 retained samples are compile-state satellites
back-pressure crossings filed after 10:00Z (51, parsed from issue bodies) the oldest-leg family is compile-state in 8 of 51, second only to cache/* (15)

Plugins' gate had already measured the same writes as the per-package nodeops tax (#4141, folded into #2543 without an answer).

Change

  • MeshDataSource no longer installs the mirror.
  • NodeTypeCompileStateMirror.Install is [Obsolete], not deleted. In-mesh callers are invisible to CI, so a deletion could break them at runtime compile.
  • StatePath, StateNode and Parse stay. Satellites already on disk are now inert records.
  • Doc: Doc/Architecture/CompileStateSatelliteRetired, added to the Architecture topic map.

Verification

  • NodeTypeCompileStateMirrorTest.NodeTypeActivationAndStateChange_WriteNoCompileStateSatellite runs on a real mesh with two positive controls:
    • the state change does land on the NodeType node;
    • the same reader does see a satellite that was written directly.
  • The test passes with the fix.
  • Negative control: with the Install call restored in MeshDataSource, 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 on MeshWeaver.Compiler.Pipeline, MeshWeaver.Graph, MeshWeaver.Graph.Test and MeshWeaver.Documentation.Test: 0 errors on each.
  • ArchitectureTopicMapTest and DocumentationLinkIntegrityTest pass (5/5).

Not established

  • How much of the back-pressure this removes. The largest family, cache/*, and the per-user _Install/_Access/_Entitlements legs are untouched.
  • Whether roll-time placement timeouts also need a departing silo's directory churn.

The post-roll read that settles #5389, #5037 and #5334: the next boots on an image carrying this change should show no */_Activity/compile-state destinations 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

…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

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.

Comment on lines +110 to +114
var satellite = await Observable.Interval(TimeSpan.FromMilliseconds(250)).StartWith(0L)
.Take(20)
.SelectMany(_ => ReadNode(statePath))
.Where(n => n is not null)
.FirstOrDefaultAsync()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +48 to +52
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed in 6c4ff20. These pages now say the satellite is retired, link CompileStateSatelliteRetired, and point readers at the NodeType node:

  • ExecuteTimeInterlock
  • NodeTypeCompilation
  • MissingDeclaredSources
  • ReleaseFailureClasses
  • RebakeWaves (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).

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

396 tests   - 1 242   396 ✅  - 1 242   54s ⏱️ - 2m 31s
  1 suites  -     1     0 💤 ±    0 
  1 files    -     1     0 ❌ ±    0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

  1 files  ±0    1 suites  ±0   3m 1s ⏱️ +3s
328 tests ±0  328 ✅ ±0  0 💤 ±0  0 ❌ ±0 
332 runs  ±0  332 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

    2 files   -   1      2 suites   - 1   2m 35s ⏱️ - 3m 34s
1 616 tests  - 374  1 616 ✅  - 374  0 💤 ±0  0 ❌ ±0 
1 616 runs   - 375  1 616 ✅  - 375  0 💤 ±0  0 ❌ ±0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

…ite in the docs that still named it live (#5389)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

    1 files   -     2      1 suites   - 2   5m 49s ⏱️ - 1m 16s
1 967 tests +1 236  1 967 ✅ +1 428  0 💤  - 192  0 ❌ ±0 
1 968 runs  +1 237  1 968 ✅ +1 429  0 💤  - 192  0 ❌ ±0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

947 tests  +504   947 ✅ +504   6m 31s ⏱️ + 5m 37s
  1 suites  -   2     0 💤 ±  0 
  1 files    -   2     0 ❌ ±  0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

    2 files   -     3      2 suites   - 3   7m 41s ⏱️ - 6m 15s
2 555 tests  - 1 491  2 555 ✅  - 1 489  0 💤  - 2  0 ❌ ±0 
2 559 runs   - 1 491  2 559 ✅  - 1 489  0 💤  - 2  0 ❌ ±0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    8 files   -     9      8 suites   - 9   26m 34s ⏱️ - 7m 54s
7 809 tests  - 1 367  7 809 ✅  - 1 173  0 💤  - 194  0 ❌ ±0 
7 818 runs   - 1 367  7 818 ✅  - 1 173  0 💤  - 194  0 ❌ ±0 

Results for commit c9e1efe. ± Comparison against base commit 9a61fed.

♻️ This comment has been updated with latest results.

…iteralRatchetGuard 381 > 380)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

2 participants