The registry shelves each platform line

MeshWeaver.Plugins#5550, policy major-lines-run-separately (core Doc/Architecture/MajorLinesRunSeparately §4b).

One registry serves both platform lines. The v3 line (main3) and the v4 line (main) both publish their module bundles to it (POST /api/plugins/bundles/{plugin}). The registry stored every upload on ONE shelf, which keeps one head per module (the highest version, #3996) plus one retained previous generation. Module versions say nothing about the line: v3 AI ships as 1.52.0 and v4 AI as 4.0.1. So:

  1. The v4 publish of AI 4.0.1 became AI's head. The registry answered "held": true: it cannot load the build itself, but it serves it.
  2. The v3 build 1.52.0 survived only as the single fallback.
  3. The next v4 publish (4.0.2) would have pushed 1.52.0 off the shelf entirely, and no v3 instance could have taken a v3 AI from this registry again.

What it does now

Publishing. The publish route reads the line an upload STATES: its framework identity when that is a compatibility key (c004e001 → 4), else the major of its declared floor (minMeshVersion). This is the same rule the client applies to an index entry (BundleLine, core). An upload of the registry's own line, or one stating neither, lands on the registry's own shelf exactly as before. An upload of another line lands on that line's own shelf (ModuleShelfLines, core): the tree a process of that line lands into on the same volume (<Modules:Root>/lines/4/ on a v3 registry). The response names the line ("line": 4). Each shelf keeps its own head and fallback, so a v4 publish never moves the v3 head, and the other way round.

Serving. GET /api/plugins/bundles/index.json and GET /api/plugins/bundles/{plugin}/{version} answer for the caller's line, from that line's shelf only:

the request states it is answered for
line=<major> (every client from this change on) that line
no line, identity=<compatibility key> (every client since #3768) the line of that identity
neither the registry's own line, as before

A tree can still hold a build of another line that was shelved before this change (the v4 4.0.1 head on the v3 registry's own shelf). The index leaves such an entry out, so the line's retained fallback behind it is served instead. The next publish of the registry's own line does not displace that head (it is the higher version), but the index never serves it to the wrong line.

The client still splits the index by line itself (core PluginBundleClient), as defence in depth for a registry that predates this change.

What is not covered

Tested over the real routes: ARegistryServesEachPlatformLineFromItsOwnShelfTest (src/Memex.Portal.Shared.Test). The shelf itself is tested in core (ARegistryShelvesEachPlatformLineSeparatelyTest).