Files
MobileGL/docs/Disaggregated/notes/p5/p5-results/c1-v1.md
T
swung0x48 aba329cc53 [Docs] (Disaggregated): P6's plan and contract draft; the working notes move from a local directory into the repository
Two things land together: the plan and contract draft P6 needs before it starts, and the
working notes that until now existed on exactly one machine.

1. P6's plan and contract draft (neither started; not one line of code)

     docs/Disaggregated/P6-SPAWN-PLAN.md      the package plan
     docs/Disaggregated/P6-CONTRACT-DRAFT.md  the contract draft (moves to
                                              MG_Remote/CONTRACT-P6.md when c6 lands)

   The three findings that mattered, all written into the documents:

   a. P6 is SMALLER than its roadmap cell suggests. The transport primitives are already in
      the tree and already tested: SocketDoorbell including hangup detection and the two
      lost-wakeup fences (Doorbell.cpp:211-360, four cases in FdPassingTest), SCM_RIGHTS fd
      passing, ShmSegment::Adopt, and the SurfaceOp / WindowKind schema already defined in
      protocol.fbs. inproc uses a real second shm mapping rather than an alias, and
      SessionRings.h:22-28 says that was done so today is not the first time it runs. P6 is
      assembly plus a control plane plus a process, not "write a socket transport".

   b. The evidence for "P6 is only a transport swap" has EXPIRED. It was bought by P5c, whose
      audit found 59 direct memory accesses in a tree that already looked clean. P5e changed
      the tree again. So the first package, a6, is a read-only audit that writes no code, and
      every contract row that depends on it is marked PENDING a6 rather than decided in
      advance.

   c. P6 does not get a game running on the phone. ANativeWindow* is meaningless in the child,
      and protocol.fbs:186-196's own comment says Android transfers the window out of band -
      that band is P12. P6 lands pbuffer / surfaceless / offscreen, which is what HeadlessGL,
      the split-equivalent lane and trace replay need, and which is exactly what P6's own exit
      gate measures. A real window reaching the server is a named refusal. This gets its own
      section because "P6 is done" would otherwise read as "the game runs now".

   The contract adds rule G: a role may not name a process-local handle. It extends P5c's
   rule E (a role may not name the other role's memory) from memory to identity - EGLDisplay /
   EGLSurface / EGLContext / ANativeWindow* / fd number / pid / mapped address either cross as
   a token this contract defines or they do not cross, and a descriptor crosses only through
   SCM_RIGHTS, where the kernel renumbers it.

   What P5e left for P6 gets its own section. The latch semantics are already designed
   (ARCHITECTURE.md:504) and are copied unchanged. What is new is that after run-ahead the
   client no longer waits while the peer process can DIE: the client holds records that were
   published and will never be applied, and Android's freezer suspends the child without
   closing anything. So slow and dead must be distinguishable WITHOUT a timeout threshold.
   That is P6's only new design; everything else is carriage. It shares a predicate with E1's
   outstanding re-specification (ID-122), and the two should be designed together.

   Two gates carried over from P5e's lessons: G2 requires integration-spawn's test-name set to
   match integration-split's name for name, because a differing set means the lane is quietly
   running less; and the arm-proof gate requires every entry to record the child pid and
   transport=spawn in its OWN private log - ID-124 established that this kind of false green
   really happens, and a spawn lane that actually ran monolith would pass every other gate.
   S2's shape must be settled before it is written, and the document says why: E1 is the
   cautionary case.

2. The working notes move into the repository (docs/Disaggregated/notes/, 415 .md files)

   ROADMAP / CURRENT_STAGE_PROGRESS / MEASUREMENTS cite ruling numbers, audit line numbers and
   the provenance of gate figures from ~/w7/notes/, a directory that exists on one machine and
   is under no version control. A record cited hundreds of times that lives only locally is not
   a record, so it moves in whole, with its directory structure intact.

   Only .md moves. Scripts, run logs, census and gate result JSON, patches, APKs and nm dumps
   stay where they are: they are evidence DATA rather than documents - large, regenerated per
   run, and mostly carrying absolute paths and device serials that mean something only on the
   machine that produced them. The mapping and this split are written in
   docs/Disaggregated/notes/README.md.

   Two exceptions are recorded there too: P6's BRIEF has been promoted to a first-class
   document and keeps no copy under notes/, so the two cannot drift apart; and recovered/ holds
   material salvaged from failed workflow runs, which may duplicate the like-named phase
   directories and is kept because a few of those were the only complete version at the time.

   CI's citation lint takes docs/Disaggregated/*.md only (non-recursive), and notes/ is
   deliberately outside it: those notes' file:line citations were written against their own
   code heads, and resolving them against today's HEAD would fail wholesale - which is not an
   error, it is their correct state as a historical record. To check one, use the revision it
   declares (--rev).

3. Inconsistencies fixed in passing

   - README.md's status line still said P5e was in progress while the stage table already said
     closed.
   - CURRENT_STAGE_PROGRESS's next-step item 1 still listed the exit gate as pending, though
     (a) and (b) were run in the previous commit; rewritten to closed plus the one item that
     actually remains (E1).
   - ROADMAP's P6 row still had the pre-phase plan in three of its cells; it now carries the
     package order, the scope boundary and the two new gates.

Checked with check_doc_citations.py: 125 citations across docs/Disaggregated/*.md, 0 problems.
2026-09-18 23:31:39 -04:00

371 lines
24 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# c1-v1 — the client role, the 71-slot emit table and the verb barrier
Branch `p5/c1`, worktree `~/w7/p5-c1`, base `feat/disaggregated @ 32563993` (wave 1 merged).
---
## 1. What landed
| area | file | state before | state now |
|---|---|---|---|
| the client BackendObject | `MG_Remote/Client/BackendObject_Remote.{h,cpp}` | **did not exist** | 8 pure virtuals + 9 EGL virtuals, all three scout traps paid |
| the emit table | `MG_Remote/Client/EmitTables.{h,cpp}` | `RemoteEmitTable()` aborted on sight; `ImplementedVerbCount()` = 0 | 71 slots: 2 class A, 5 class B, 64 class C, counts static_asserted to partition |
| the caps mirror | `MG_Remote/Client/CapsMirror.{h,cpp}` | every accessor `MGLOG_F` + `abort` | real, placeholder-safe, R-12 invalidation, R-8 refusal counter |
| the verb barrier | `MG_Remote/Client/ClientSession.cpp` | `EmitAndWait` was c0's stub; the two R-1 probes returned `false` unconditionally | one wait that is also the reply's wait, both probes honest, the reverse channel drained |
| the caps snapshot adoption | `ClientSession::PumpControlPlane()` | s1 logged "adopting it is c1's" and dropped the frame | one drain, one adopter, called at handshake / `Initialize` / `InitCapabilities` / every `Present` |
| R-8's liveness gates | `MG_Impl/Pipe/PipeFill.cpp` | `MGPipeGetResourceOps() != nullptr` | `CapsMirror::ServerConsumes` under split; op table under monolith |
| the 41 null checks | `MG_Remote/Client/SlotCaps.h` + 5 `MG_Impl` files | 41 slot null checks | the three CONTRACT §7 names plus every other family where "absent" is a *correct* answer |
| b1's three unwired entry points | `EmitTables.cpp` | zero callers | wired before the verb record |
| the suite | `MG_Test/Wire/RemoteClientTest.cpp` | did not exist | 17 cases, 4 of them forked death tests |
Commit range: see §9.
---
## 2. The three traps, and where each is paid
1. **`GetRendererInfo()` returns a reference** (`BackendObject.h:590`) and `LogBackendInfo()` reads it at
`MG_Backend/Init.cpp:21`, during `MG_Backend::Init()`, before any surface exists. `CapsMirror` owns a
real `RendererInfo` and `BackendObject_Remote::GetRendererInfo()` forwards to it.
**c0's stubs aborted on every accessor but `Valid()`/`Generation()`; that had to be reversed** — an
abort there is not a stricter mirror, it is a process that cannot start. Every accessor now answers a
placeholder *and logs one line naming itself*, so a wrong number that reached a caller announced itself.
`MG_Backend::Init()` is **not** restructured (scout-caps-reply §1.2 (a)).
2. **`GetFormatCapabilities()` is non-virtual** (`:594`). `BackendObject_Remote` **fills**
`m_formatCapabilities` through `MutableFormatCapabilities()`, driven by a new
`CapsMirror::SetCapsAdoptedHook` — a raw function pointer, installed in the constructor, because the
only moment the object can know to refill is when a snapshot lands, and the teardown path may not
allocate (ID-8).
3. **`GetBackendType()` answers the server's backend.** No `Remote` enumerator exists and none was added;
a snapshot naming a type this build has no enumerator for is **refused whole** rather than folded onto
`Unknown`, because `GL_Framebuffer.cpp:47`, `GL_Texture.cpp:6536` and `CompileEnv.cpp:122` switch on it
and take a wrong arm rather than failing.
---
## 3. The emit table
`kRemoteEmitSlotCount = 71`, and the partition is **arithmetic, not a comment**:
```
kUnmigratedSlots (= the X-macro's own row count + 3 hand-written) == 64
kLocallyAnsweredSlots + kEmittedSlots + kUnmigratedSlots == kRemoteEmitSlotCount // static_assert
```
A slot that changes class without changing the arithmetic is a build break.
- **Class A (2):** `GetIntegeri_v` answers `MaxComputeWorkGroupCount` / `MaxComputeWorkGroupSize` from
`MGPCaps::Dynamic`; any other indexed pname is a warn-once and **no answer**, because writing a wrong
number is worse than leaving the frontend's own. `IsTimerQuerySupported` answers `kCapTimerQuery`.
`PrefersCpuXfbPrimitiveAccounting` is not a slot and is answered from
`kCapCpuXfbPrimitiveAccounting`.
- **Class B (5):** `Clear`, `DrawArrays`, `ReadPixels`, `BlitFramebuffer`, `Present`.
- **Class C (64):** the rest, including `SetSwapInterval`, `GetGpuTimestampNs` and the whole sync / query /
XFB / compute / copy / mipmap surface.
**Class C is assigned FIRST in `BuildRemoteEmitTable`, deliberately.** If class B's assignment ran first,
a typo in the class-C list would leave a *null* slot — 91 potential null calls with no diagnostic. This
way the worst a mistake can do is name a verb that was meant to be emitted, loudly.
### Two record-shape decisions v1 and the integrator must ratify
- **`MGPClear::Kind`.** `MGPipeTypes.h:1273` states the list as a **comment** (`Whole | Color | Depth |
Stencil | DepthStencil`) and mints no enumerator, because until now the record had no producer. c1
defines `MGRemoteClearKind` in `EmitTables.h` with those five values in that order. **P5 only ever
produces `kRemoteClearWhole`** — `glClear` is the only entry point that reaches the slot, the four
`glClearBuffer*` and four `glClearNamedFramebuffer*` being class C — so `WireVerbSink::OnClear` should
`Fatal` on anything else rather than guess. When the other eight migrate, this belongs in the contract.
- **`MGPClear::Fbo` and `MGPBlit::ReadFbo`/`DrawFbo` are the NULL handle, on purpose.** The bindings are
`gPipeInputs`', written by the client's `MGP_FILL(Clear)` / `MGP_FILL(BlitFramebuffer)` immediately
before the table call and held still by the barrier. Naming a handle in the record would be a *second*
statement of the binding, and the second one is the one that goes stale.
---
## 4. The verb barrier
`ClientSession::EmitAndWait` composes s1's four primitives in the one legal order:
```
[assert the apply thread is not inside the applier] -> EncodeRecord -> PublishAndNotify
-> BarrierWaitScope + WaitForApplied -> DrainEventRing -> ReadReply
```
- **The wait and the reply's wait are one wait.** `kMGPipeCallFlagsFor(op) & kReplySlot` decides whether a
reply is read — the catalogue, never the caller — so a caller that forgot to pass a buffer cannot turn
an answer into a guess. **Acceptance is never re-derived and never assumed**: DECLINED is passed
through as a real answer, and a `kReplySlot` row whose slot does not stamp its own seq is
`Fatal{ReplyMissing}` rather than a plausible default.
- **`MOBILEGL_IPC_VERB_BARRIER=0` turns off the barrier and nothing else.** A reply-slot row still waits,
because its answer is not derivable here and R-5 forbids inventing one.
- **The R-1 invariant is a runtime check now.** `InBarrierWait()` is `thread_local`; `ApplyThreadIsInsideApplier()`
is a shared atomic. **v1 must bracket its `DecodeAndApply` with `ClientSession::ScopedApplierEntry`**
(or the two `Note*` functions) or the check is inert — see §8.
- **The wait is bounded at 30 s** and its Fatal names the seq. A wedged CI job and a lost record look
identical from outside and only one of them is a bug worth finding.
- **`SessionWait::ShutDown` is not a Fatal.** Teardown legitimately reaches it.
- **The reverse channel is drained here**, between the barrier and the reply read — the one instant at
which the apply thread is known not to be inside the applier, and the thing that gives b1's
`AwaitBufferWriteback` something to have waited *for*. `EventRingConsumer::Drained()` is called only
after every popped payload pointer has been consumed (R-11 one level down).
---
## 5. R-8
`MGPipeResourceSubsystemEnabled()`, `P4aFamilyHasItsConsumer()` and `MGPipeResourceOpsHaveSubDataResident()`
now read the caps mirror when `MG_Config::Transport != Monolith`, and the op table otherwise. The third is
CONTRACT §7's third named capability probe and reads `kCapResidentSubData`.
All four P4a families ride the **one** resource consumer bit, exactly as they do in monolith — asking per
family would be a *new* rule, and a client that withheld more than the server refuses leaves the server's
handle arm live with no records to read.
**The negative control is counted, not inferred.** `CapsMirror::ServerConsumes` is R-8's only legal
spelling, so it counts its own refusals and names the family (`ConsumerRefusals()`,
`LastRefusedSubsystem()`, plus one warn line per family). "The client emitted nothing" and "nothing called
it" are otherwise the same observation.
**A placeholder mirror consumes nothing**, which is the safe direction: the legacy pull path runs. The
unsafe direction — emitting to a server with no consumer — is ID-39's 66 lost uploads.
### One test had to change, and the change IS the finding
`SanityTest.cpp`'s `DirectGLESBufferDrawProbe.UnderSplitTheRecordAloneAnswersTheLiveHostMapQuestion`
armed `MG_Config::Transport = InProcess` **and** `MGPipeSetResourceOps(&ops)` and expected the client gate
to answer from the op table. That is precisely the "right by accident under inproc" R-8 kills, and it went
red the moment the gate moved. The probe now arms both halves (it adopts a caps snapshot carrying the
resource consumer bit). **It is the first concrete instance of R-8's defect found in the tree.**
---
## 6. The 41 null checks — the walk, and the rule it needed
CONTRACT §7 names three cases and says "the rule generalises to all 41". Walking them turned up a third
rule the contract does not state, and without it the generalisation is harmful:
> **A probe moves only where "absent" is a CORRECT and SUFFICIENT answer.**
Where the fallback behind a probe produces a *right* result, "absent" is the accurate description of a
client that does not have the slot, and converting keeps the lane running. Where the fallback produces a
*silently wrong* result, converting would manufacture exactly the defect R-4 exists to prevent, and the
probe is left alone so the class-C slot Fatals **by name** — which is R-4's stated intent.
**Converted** (`MGL_BACKEND_SLOT_CAP` where a bit exists, `MGL_BACKEND_SLOT_LOCAL` where none does):
| site | slot | becomes | the fallback that survives |
|---|---|---|---|
| `GL_Query.cpp:481`, `:558`, `:785` | `BeginOcclusionQuery` | `kCapOcclusionQuery` | the target is rejected (GL's own answer) |
| `GL_Query.cpp:534` | `BeginXfbPrimitivesQuery` | `kCapXfbPrimitivesQuery` | CPU primitive accounting |
| `GL_Query.cpp` (begin) | `BeginTimeElapsedQuery` | `kCapTimerQuery` | a zero result |
| `GL_Query.cpp:660` | `QueryCounterTimestamp` | `kCapTimerQuery` | the same |
| `GL_Getter.cpp` ×2 | `GetGpuTimestampNs` | `kCapTimerQuery` | `0`, which `BackendObject.h:192` already names |
| `GL_Sync.cpp:59` | `FenceSync` | local | always-signaled syncs — **one gate carries the family**, because every later sync site is already guarded on `syncObject->backendHandle` |
| `GL_Texture.cpp:6537` | `GetTextureImage` | local | the frontend's own CPU readback, which is exact |
| `GL_Texture.cpp:6799` | `GetTexImage` | local | the same |
| `PipeFill.cpp` | `SubDataResident` (op table, not a slot) | `kCapResidentSubData` | the non-resident upload path |
**Not converted, deliberately:**
- the **transform-feedback span family** (`GL_Drawing.cpp:1274/:1290/:1371/:1420/:1435/:1641/:1673`). The
frontend reads a null `EndTransformFeedback` as *"this backend does not own the capture, so reorder the
captured records for it"* (`FixupGsStripCaptureOrder`). Under split the server's backend **does** own
it, so "absent" would reorder a capture already in GL order — a silently corrupt buffer. XFB is off
P5's reduced path and its slots are class C, so the first XFB call aborts by name. **This family is the
first that will need a new `MGPCapBit`**, and that is an `MGPipeTypes.h` edit, i.e. c0's.
- `GL_Drawing.cpp:844` `PatchParameteri`: "absent" means the patch size is silently never set.
- the **28 unguarded slots**: no probe to convert, and `Fatal{UnmigratedVerb, "<slot>"}` is strictly
better than today's undiagnosed null call.
In a pull build both macros expand to exactly the check they replaced, so codegen is unchanged (G1).
---
## 7. b1's three entry points
- `PushPersistentMapsBeforeVerb()` — runs in **every** class-B emitter, first, before the record.
- `MarkGpuWritesForDraw()` — runs in `DrawArrays`, after the push and before the record.
- `MarkGpuWritesForDispatch()` — **wired in place, and unreachable-in-effect, and this report says so
rather than claiming a gate.** Its call site is the `DispatchCompute` / `DispatchComputeIndirect` slots,
which are class C in P5, so the abort follows it. The phase that moves compute to class B replaces the
Fatal and inherits a call site that is already correct instead of discovering that the mark walk was
never wired. No test can observe it; none is claimed.
- `MarkReadPixelsPackBuffer()` is **not** called from the emitter: b1 already wired it at
`GL_Framebuffer.cpp:3109`, and a second call would count one read as two.
---
## 8. What v1 and the integrator most need
1. **`ClientSession::ScopedApplierEntry`** (new, `ClientSession.h`). v1's apply loop must bracket its
`PipeWireDecoder::DecodeAndApply` with it. Without it `ApplyThreadIsInsideApplier()` is permanently
false and R-1's mutual-exclusion assertion never fires — which is a gate that cannot go red for its
own reason.
2. **The hook order in `MG_Backend::Init()` is load-bearing.** It must be:
`ClientSessionInstance().Start(...)` → `pActiveBackendObject = MakeUnique<BackendObject_Remote>()` →
`InitSpecificBackendLibs()` (which copies `GetBackendFunctions()` into `gBackendFunctionsTable`) →
`LogBackendInfo()`. The client tolerates the snapshot arriving late — `PumpControlPlane` runs again
from `Initialize()`, `InitCapabilities()` and every `Present` — but `ServerSession::SetBackend()`
before `Accept()` is what makes the FIRST log line accurate.
3. **`WireVerbSink`'s five arms and what the records carry.** `OnClear` gets `Kind == kRemoteClearWhole`
and `BufferMask`; the `Fbo` is deliberately null (§3). `OnDrawVbo` gets `IndexSize == 0`,
`NumDraws == 1`, one `MGPDrawRange{first, count, 0}`, `Flags == 0` (never `kDrawHasUserIndices`).
`OnReadPixels` must write **exactly `MGPReadbackInfo::DstSize`** bytes into the reply slot with
status OK — the client computed that number from the pack state and already checked it against
`MaxReplyBytes()`, so a short write is a silently truncated picture. `OnPresent` gets
`FrameSerial == 0`, meaning "stamp your own".
4. **THE BIGGEST OPEN ITEM IN THE PHASE, and it is neither mine nor obviously anyone's: the 37
`MGPipeApply*` entry points have NO client-to-wire routing anywhere in the tree.** The decode-side
hook exists (`gMGPipeWireRecordApply`, `generated/PipeWire.inc:871`); there is no encode-side twin, and
nothing in `MG_Impl/Pipe` or `MG_Pipe` branches on `MG_Config::Transport` to produce one. So under
`inproc` today every resource / CSO / texture / sampler / program record still executes
**synchronously on the GL thread**, against a context that v1 is moving to the apply thread — where
all 16 `IsBackendContextCurrentOnThisThread()` and 16 `CanTouchGLNow()` guards answer *false*.
`ClearThenReadPixels` may survive that; `TriangleScenario` needs a VBO and a program and will not.
**This decides whether the first inproc frame renders**, and it needs an integrator ruling on owner
and shape before v1 and c1 can be joined. `ClientSession::EmitAndWait` is already the whole client
half of it — it takes an opcode and a payload — so the missing piece is one hook in `MG_Pipe` plus the
37 call sites, not a new mechanism.
5. **Two unit cases were already red at the merge base, before c1 touched anything**, and c1 changes
neither file nor any generated table they read:
- `PipeWireCodecTest.NoReplyIsWrittenForARowTheCatalogueGivesNoReplySlot` — line 1203 asserts
`MGPipeCallFlagsFor(ResourceCreate) & kReplySlot == 0`; **ID-31 gave that row the flag**, so it reads
16. Pure ID-31 fallout: the test states the pre-ID-31 catalogue.
- `RingTest.TheTwoFlagSpacesAreDisjointByTranslation` — line 774, the runtime half.
6. **One knob was invented and is flagged rather than smuggled:** `MOBILEGL_IPC_E2_DROP_CLEAR=1` arms
E2's control (below). It is read with `getenv` in `EmitTables.cpp`, **not** through `MG_Config`,
because `Config.h` is c0's; it warns loudly every time it arms. Adopt it into `IpcTable` or tell me to
take it out.
7. **`MGPCaps::FormatCapabilities` / `RendererInfo` blobrefs are zeroed on adoption.** They name
SEG_STAGE runs owned by the *server's* encoder; a later client-side reader that resolved one would
read whatever the stage allocator has since put there.
---
## 9. Numbers
Commit: **`32563993..805f3322`** on `p5/c1` — one commit, 18 files, +2235 / -71.
Gate log `~/w7/p5-c1-gaterun.log`, G1 re-measure `~/w7/p5-c1-g1run.log`, symbols
`~/w7/p5-c1-symbols.md`, red-check `~/w7/p5-c1-redcheck.log`.
**The four self-tests, on FIVE build dirs** (b1's `build-verify-split` cell included):
| | pull | push | verify | split | verify-split |
|---|---|---|---|---|---|
| configure + build | rc=0 | rc=0 | rc=0 | rc=0 | rc=0 |
| `ctest -L unit` | **1813 / 1813** | **1813 / 1813** | **1813 / 1813** | 1989 / 1991 | 1989 / 1991 |
**G1 — the gate this phase is most likely to break:**
```
.text 10806323 -> 10806323 (+0, +0.000%)
27811 -> 27811 defined symbols: 0 added, 0 removed, 0 resized, 0 renamed
nm --defined-only build-linux/libMobileGL.so | grep -ic MG_Remote -> 0
nm --defined-only build-split/libMobileGL.so | grep -ic MG_Remote -> 473
```
**IT WAS RED ON THE FIRST MEASUREMENT AND THE WAY IT WENT RED IS WORTH THE PARAGRAPH.**
`.text -144`, **2 resized**: `GLImpl::GetInteger64v` -150 and `GLImpl::GetIntegerv` +2. Two sites in
`GL_Getter.cpp` were shaped `if (const auto f = TABLE.GL.Slot)`, and rewriting them as
`if (BOOL_MACRO) { const auto f = TABLE.GL.Slot; … }` is semantically identical and generates
different code. The fix is `MGL_BACKEND_SLOT_PTR_CAP` / `_PTR_LOCAL`, which expand in a pull build to
**the slot expression itself**, so the init-statement survives verbatim. `GL_Sync.cpp`'s `FenceSync`
had the same shape and did not happen to move; it was converted to the pointer form anyway, because
"did not happen to" is not a property.
**Integration:** `build-push`, `MOBILEGL_TRANSPORT=monolith`, `ctest -L integration-gpu`:
**1128 / 1128**, 0 failed.
**Names (G2 / G14):** baseline 2902, push 2941, split 3140.
push-vs-baseline **0 removed**, 39 added (all wave-1's; c1 adds none to the push lane).
split-vs-push **0 removed**, 199 added — **adds only**, of which 21 are `DirectGLES.Split.` entries
and 17 are this package's own unit cases.
**Generators** (c1 touched no `.def` and no generator): `gen_pipe --check`, `gen_pipe_dirty_surface
--check`, `gen_pipe_field_ownership --check` all report up to date. `check_include_closure`: 4 probes,
0 problems.
**The 2 split failures are PRE-EXISTING at the merge base** and c1 changes neither test file nor any
generated table they read — see §8.5.
**The acceptance scenarios do NOT run yet, and the reason is measured rather than assumed.**
`ctest -L integration-split` in `build-split` is **21 / 21 still skipping**, and the skip names the
first fact that is not true:
> `MG_Remote::Client::ClientSession::Active() is null: no client session exists in this process.`
Nothing in the test process calls `ClientSession::Start()` — **`MG_Backend::Init()`'s hook is v1's**
(§8.2), and the `MGPipeApply*` routing of §8.4 is unowned. So the first inproc frame is blocked on
those two, not on this package: `ImplementedVerbCount()` is now **5, not 0**, which is the third of
t1's three arming facts, and the fourth (the encoder's record ordinal moving) is the one the emitters
above make true. **The 21 entries and the two negative controls arm the moment a session exists.**
---
## 10. R-16: I made every gate red once, by doing X
`~/w7/p5-c1-redcheck.py` (copied from `~/w7/p5-w1-redcheck.py`; only `ROOT`, the target and the binary
path changed). It breaks the **implementation**, never the test, rebuilds `RemoteClientTest`, runs the one
control that should notice, requires `[ FAILED ]`, restores, and finally requires the whole suite green
again. Log: `~/w7/p5-c1-redcheck.log`.
| control | I made it red by |
|---|---|
| `AnUnmigratedSlotAbortsAndNamesItself` | renaming the Fatal tag `UnmigratedVerb` → `SomethingElse` |
| `EachUnmigratedSlotNamesItsOwnSlot` | making the X-macro pass the literal `"DrawElements"` instead of `#Name` |
| `TheThreeClassesPartitionAllSeventyOneSlots` | returning c0's stub value 0 from `ImplementedVerbCount()` |
| `NoSlotIsNull` | commenting out `table.SetSwapInterval = &SetSwapInterval_Unmigrated;` |
| `TheFiveEmittersAreTheOnesTheCensusMeasured` | setting `table.Present = nullptr` |
| `AClassBSlotWithNoSessionAbortsRatherThanFallingThrough` | renaming the `NoClientSession` Fatal tag |
| `SetSwapIntervalIsClassCAndSaysSo` | overwriting the slot with an empty lambda (a pass-through) |
| `AMaskWithoutAFamilyRefusesItAndNamesIt` (×2) | `ServerConsumes` returning `true`; and dropping the family id from the refusal |
| `GlGetStringReadsTheRendererStringsBackOutOfTheMirror` | deleting `m_renderer = renderer` — the producer |
| `GlGetIntegervReadsTheDynamicParametersBackOutOfTheMirror` | adopting only `CallMask` instead of the whole `MGPCaps` |
| `ReArrivalIsTheInvalidationAndMovesTheGeneration` | `m_generation = 1` instead of `++m_generation` |
| `ThePrefersCpuXfbAnswerComesFromTheCapBitAndNotFromTheTable` | returning `false` |
`CONTROLS_THAT_DID_NOT_GO_RED=none`; 13 / 13, restored build green, 17 / 17 after.
**And the first run of the red-check found a real defect in my own controls, which is the point of it.**
The forked death cases used w1's "remember the log length, fork, take the tail" helper. This suite's
parent never logs, so `MG_Util::Debug`'s `FILE*` was opened **for the first time by each child**, with
`"w"` — truncating. The remembered offset then pointed past the end of the child's own log and `substr`
handed back a *different child's* output: `EachUnmigratedSlotNamesItsOwnSlot` was reading the previous
case's message and asserting on it. Three cases were green through a broken read. Fixed by truncating in
the parent before the fork and taking the whole file. **A control that reads another control's message is
one of the three shapes R-16 was written after, and this is a fourth sighting of it.**
---
## 11. Debts this package leaves
1. **E2's emitter-drop control is armed but not RUN by me.** `MOBILEGL_IPC_E2_DROP_CLEAR=1` makes every
`glClear` skip its record while still running the pre-verb hooks, and counts the drops
(`DroppedClearEmissions()`). The statement E2 makes — "OpenRA's SSIM falls below 0.99" — is a **trace
lane's**, and the lane cannot run until the first inproc frame does (§8.4). The unit half asserts only
that the control is off unless armed.
2. **`MarkGpuWritesForDispatch` has no gate** and cannot have one while `DispatchCompute` is class C (§7).
3. **The XFB span family needs an `MGPCapBit`** before its probes can move (§6).
4. **`Encoder().MaxRecordBytesSeen()` still has no `PipeStats` publisher** (w1 flagged it as b1's line; it
is still nobody's landed code), so R-10's MEASUREMENTS number remains unowned.
5. **`GetIntegeri_v` for a pname outside the two device-owned ones warns and writes nothing.** Monolith
leaves the driver's own value in place; there is no such value here. If any target is found reaching
it, that pname needs a home in `MGPCaps`.
6. **`build-verify-split/` needed a `.git/info/exclude` line** (`~/w7/pipe/.git/info/exclude:12`),
because the four older build dirs are excluded there by name and b1's fifth cell was not. The first
commit of this branch swallowed 1625 build artefacts before that was noticed; it was reset and
redone. **Anyone adding a sixth build dir has to add the line too.**
---
## 12. Files and scripts
- `~/w7/p5-c1-gate.sh` — five build dirs, the generators, G1, the unit lanes, integration-gpu + names.
Copied from `~/w7/p5-w1-gate.sh` with b1's `build-verify-split` cell added and C-10's
`CTestTestfile.cmake` check in front of every verdict.
- `~/w7/p5-c1-redcheck.py` — R-16, 13 controls. Copied from `~/w7/p5-w1-redcheck.py`.
- `~/w7/p5-c1-names.sh` — the G2/G14 name comparison. **Use `LC_ALL=C` for both the `sort` and the
`comm`**: without it `comm` reports "input is not in sorted order" and prints a nonsense diff that
looks exactly like a catastrophic name change (267 removed / 306 added, where the truth is 0 / 39).
- `~/w7/p5-c1-submodlinks.sh off|on`, `~/w7/p5-c1-setup.sh` — the day-one symlink dance.