Skip to content

HOTFIX: main is red — restore the using MeshOperations needs - #2411

Merged
rbuergi merged 1 commit into
mainfrom
fix/mesh-operations-using-after-forwarders
Aug 26, 2026
Merged

rbuergi merged 1 commit into
mainfrom
fix/mesh-operations-using-after-forwarders

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Main is red

memex/Memex.Portal.Shared/Api/MeshApiEndpoints.cs(335):
error CS0246: The type or namespace name 'MeshOperations' could not be found

Run 32994185103 on c753ad2f5. CD refuses a red tip, so the surface-manifest image is hard-blocked behind this.

A semantic conflict — which is why every PR run was green

Each compiles against the main it was branched from. Only the combination fails, and no PR run built the combination — the 17:05 merge burst produced it.

The fix: one line

using MeshWeaver.AI; returns to the file. Its sibling Memex.LocalMesh/LocalMeshApiEndpoints.cs already had it, which is why exactly one file broke; I checked every .cs referencing MeshOperations rather than assuming.

I also left a note at the using, because the shape invites a "tidy-up" that re-breaks it: the type lives in assembly MeshWeaver.Mesh.Operations but keeps namespace MeshWeaver.AI, deliberately and permanently.

Why not revert #2397

Reverting would drop a live production fix (a TypeLoadException on every MCP tool call) and the gate that detects the whole class. The agreed criterion is main green on the very next run, and one line achieves that.

Verification

Memex.Portal.Shared builds clean under -c Release -warnaserror.

🚨 Note the gate that would have caught this is #2407, still open: it makes a binary-compat failure block the merge. It would not have caught this particular break (a semantic conflict between two merges is a different class from a binary break), but it is the same family — a green solo run proving less than it appears to.

🤖 Generated with Claude Code

`Build solution` fails on main at c753ad2:

    memex/Memex.Portal.Shared/Api/MeshApiEndpoints.cs(335):
    error CS0246: The type or namespace name 'MeshOperations' could not be found

A semantic conflict, not a textual one — which is why every PR run was green
solo. #2283 moved MeshOperations to namespace MeshWeaver.Mesh and updated this
call site's `using` to match. #2397 (the #2370 fix) then restored the ORIGINAL
namespace MeshWeaver.AI, because the type is reached by already-published
modules through [assembly: TypeForwardedTo] and a forwarder CANNOT rename. Each
change compiles against the main it was branched from; only the combination
fails, and no PR run built that combination.

One line: the file gets `using MeshWeaver.AI;` back.

Its sibling `Memex.LocalMesh/LocalMeshApiEndpoints.cs` already had it, which is
why exactly one file broke and why the fix is this small. I checked every .cs
referencing MeshOperations rather than assuming this was the only one.

Also leaves a note at the using: the type lives in ASSEMBLY
MeshWeaver.Mesh.Operations but keeps NAMESPACE MeshWeaver.AI, and that mismatch
is deliberate and permanent. Tidying the using to match the assembly name is
exactly what broke main.

Chose the fix over reverting #2397 because that revert would drop a live
production fix (a TypeLoadException on every MCP tool call) plus the gate that
detects the whole class — and the agreed criterion is main green on the very
next run, which one line achieves.

Verified: Memex.Portal.Shared builds clean under -c Release -warnaserror.

Co-Authored-By: Claude Opus 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.

Pull request overview

Restores the correct MeshOperations namespace import in the Memex portal REST API endpoints, fixing the CS0246 break on main caused by the namespace/assembly mismatch required for TypeForwardedTo-based binary compatibility.

Changes:

  • Re-adds using MeshWeaver.AI; so MeshApiEndpoints can resolve MeshOperations again.
  • Adds an explicit header comment documenting why MeshOperations remains in the MeshWeaver.AI namespace even though it lives in the MeshWeaver.Mesh.Operations assembly (to prevent “tidy-up” regressions).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

    9 files      9 suites   4m 48s ⏱️
1 948 tests 1 946 ✅ 2 💤 0 ❌
2 518 runs  2 516 ✅ 2 💤 0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

620 tests   616 ✅  17m 47s ⏱️
  7 suites    4 💤
  7 files      0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

    9 files      9 suites   7m 8s ⏱️
1 609 tests 1 608 ✅ 1 💤 0 ❌
1 610 runs  1 609 ✅ 1 💤 0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

2 878 tests   2 775 ✅  8m 11s ⏱️
    9 suites    103 💤
    9 files        0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

2 036 tests   1 843 ✅  9m 28s ⏱️
    9 suites    193 💤
    9 files        0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 195 tests   2 193 ✅  15m 18s ⏱️
   10 suites      2 💤
   10 files        0 ❌

Results for commit c01ed69.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    53 files  +    53      53 suites  +53   1h 2m 43s ⏱️ + 1h 2m 43s
11 284 tests +11 284  10 979 ✅ +10 979  305 💤 +305  0 ❌ ±0 
11 857 runs  +11 857  11 552 ✅ +11 552  305 💤 +305  0 ❌ ±0 

Results for commit c01ed69. ± Comparison against base commit c753ad2.

@rbuergi
rbuergi merged commit ed96362 into main Aug 26, 2026
28 checks passed
@rbuergi
rbuergi deleted the fix/mesh-operations-using-after-forwarders branch August 26, 2026 18:01
rbuergi added a commit that referenced this pull request Aug 26, 2026
The branch predated the three fixes that unbroke main (3a6f9559, c01ed69,
ed96362), so its build failed on a CS0246 this diff cannot reach — it
changes three markdown files.
rbuergi added a commit that referenced this pull request Aug 26, 2026
The branch predated the three fixes that unbroke main, so its build failed
on a CS0246 in Memex.Portal.Shared that this diff cannot reach.
rbuergi added a commit that referenced this pull request Aug 28, 2026
#2349 removed `using MeshWeaver.AI;` from MeshApiEndpoints as a phantom, and
main went red with CS0246. Two fixes then restored it independently — #2408
added it under a banner comment at the top of the file, #2411 added it again
inline further down with its own explanation. Both landed, so main now
carries the SAME using twice and fails CS0105 under warnings-as-errors.

The type genuinely needs it: MeshOperations ships in assembly
MeshWeaver.Mesh.Operations but keeps namespace MeshWeaver.AI, frozen by the
TypeForwardedTo contract in #2370. So this keeps ONE directive and folds
both explanations into the banner that sits directly above it, including
why it looks removable and the fact that removing it has now cost three
red-main incidents.

One directive, one explanation, kept together — the two split copies are
exactly how the second restore could not see the first.

Verified: Memex.Portal.Shared builds clean.
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