Skip to content

Modules:ImportSourceNodes — imports can skip persisting compile inputs as nodes (#2193 §B, step 1) - #2200

Merged
rbuergi merged 2 commits into
feat/require-prebuiltfrom
feat/import-source-nodes-mode
Aug 25, 2026
Merged

rbuergi merged 2 commits into
feat/require-prebuiltfrom
feat/import-source-nodes-mode

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2198 (base retargets to main automatically when it merges). Implements the first sequenced step of MeshWeaver#2193 §B — imports must stop re-creating source before any existing source nodes can be retired; a purge before this lands is undone by the next sync.

What changed

New deployment flag Modules:ImportSourceNodes (default on — sources are imported, unchanged). When set to false:

  • Both import lanes skip compile inputs: package installs (PackageInstaller.ParseAll) and GitSync imports (GitHubSyncService.ParseSnapshot) neither parse nor persist files under Source/ / Test/ directories. The skip is reported once per import as a counted policy line — never per-file noise (the O(n²) progress-write rule holds).
  • The predicate is NodeFileMapper.IsCompileInputPath — directory segments exactly Source/Test, the same convention the compile-input resolution and the installer's owning-type derivation use. A node file named Test.json and folders merely containing the words (Sources/, Testing/) stay nodes/content.
  • The unsafe combination is loud: skipping sources while Modules:RequirePrebuilt is off (the mesh still compiles on a miss) would fail every recompile for lack of sources — both lanes warn explicitly instead of guessing; the operator's setting is honoured.

Contract pinned

  • NodeFileMapperTest.CompileInputPaths_AreTheSourceAndTestDirectories_Exactly — the predicate's exact-directory, case-sensitive contract (18/18 suite green).
  • ImportSourceNodesTest — flag off: zero nodes from Source/Test files, one counted Info line, no warnings; flag on (default): the built-in C# parser produces the same Code nodes as today, byte for byte.
  • dotnet build -c Release -p:CIRun=true -warnaserror clean on GitSync, PluginCatalog, Graph.

Rollout

No behavior change until a deployment opts in; intended to be enabled together with Modules:RequirePrebuilt on adopt-only meshes. The purge of EXISTING source nodes remains strictly later and human-gated (#2193 §B step c).

Refs #2193. Merge is yours, Roland.

🤖 Generated with Claude Code

…s as nodes

The first sequenced step of moving module source out of the mesh database
(MeshWeaver#2193 §B): a purge that runs before imports stop re-creating
source is undone by the next sync, so the import mode lands first.

With Modules:ImportSourceNodes=false, both import lanes — package installs
(PackageInstaller.ParseAll) and GitSync imports (ParseSnapshot) — skip
files under Source/ and Test/ directories entirely: not parsed, not
persisted, reported once per import as a counted policy line (never
per-file noise). The predicate is NodeFileMapper.IsCompileInputPath —
directory segments exactly 'Source'/'Test', the same convention the
compile-input resolution and the installer's owning-type derivation use;
a node FILE named Test.json and folders merely containing the words stay
nodes/content.

Default ON (sources are imported) — unchanged behaviour, pinned. The mode
is only sane together with Modules:RequirePrebuilt: a mesh that still
compiles on a miss but holds no sources would fail its recompiles, so both
lanes warn loudly on that combination instead of guessing.

Pinned in NodeFileMapperTest (the predicate's exact-directory contract) and
ImportSourceNodesTest (flag off: no nodes, one counted Info line, no
warnings; flag on: the built-in C# parser produces the same Code nodes as
today).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

    9 files  ±0      9 suites  ±0   4m 48s ⏱️ +10s
1 681 tests ±0  1 676 ✅ ±0  5 💤 ±0  0 ❌ ±0 
2 187 runs  ±0  2 182 ✅ ±0  5 💤 ±0  0 ❌ ±0 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

   10 files  ±0     10 suites  ±0   6m 55s ⏱️ +22s
1 255 tests +1  1 254 ✅ +2  1 💤 ±0  0 ❌  - 1 
1 256 runs  +1  1 255 ✅ +2  1 💤 ±0  0 ❌  - 1 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 270 tests   - 13   1 270 ✅  - 13   13m 13s ⏱️ - 2m 47s
    9 suites ± 0       0 💤 ± 0 
    9 files   ± 0       0 ❌ ± 0 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 146 tests  +2   1 847 ✅ +2   8m 26s ⏱️ +15s
    9 suites ±0     299 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit 932306b. ± Comparison against base commit 61c91d2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

3 337 tests   - 2   3 337 ✅  - 2   8m 38s ⏱️ +36s
    8 suites ±0       0 💤 ±0 
    8 files   ±0       0 ❌ ±0 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 769 tests  ±0   1 769 ✅ ±0   9m 13s ⏱️ +8s
   10 suites ±0       0 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    55 files  ± 0      55 suites  ±0   50m 35s ⏱️ - 3m 14s
11 458 tests  - 12  11 153 ✅  - 11  305 💤 ±0  0 ❌  - 1 
11 965 runs   - 12  11 660 ✅  - 11  305 💤 ±0  0 ❌  - 1 

Results for commit 5b05667. ± Comparison against base commit 762bf7e.

@rbuergi
rbuergi merged commit 10039b6 into feat/require-prebuilt Aug 25, 2026
25 checks passed
rbuergi added a commit that referenced this pull request Aug 28, 2026
Modules:ImportSourceNodes — imports can skip persisting compile inputs as nodes (#2193 §B, step 1)
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