Files
MobileGL/docs/Disaggregated/notes/p5/p5-results/j0-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

18 KiB

j0 — round 1: ID-53 private logs for every Split integration entry

Branch p5/j0, range c3e736a3..b2dcae71, commit b2dcae713f5c81e753fe1ddfd8203b58961d7827. Author/committer identity checked immediately before commit: Swung0x48 <swung0x48@outlook.com>. Single-line commit: [Fix] (IntegrationTest): give Split entries private diagnostic logs; no attribution trailer. Worktree: /home/swung/w7/p5-j0. Integration tree and other packages were not edited or built in.


1. What changed

  • MobileGL/MG_IntegrationTest/CMakeLists.txt gives the discovered default and SmallRing families distinct TEST_LISTs. Its final CTest include, Harness/SplitLogPaths.cmake.in, appends one private log property to each discovered entry after GoogleTest discovery. CTest appends ENVIRONMENT properties here; the backend, transport, capability, vendor and SmallRing settings remain individual environment variables (verified in JSON).
  • Twenty entries now use <integration-binary-dir>/split-logs/<full-ctest-entry-name>.log. The twenty-first, b1's PersistentMapArm counting entry, retains its existing persistent-map-arm-split-DirectGLES.log and RESOURCE_LOCK=persistent-map-arm-split-DirectGLES.log. Its pmap=/mpr= reader and monolith counterpart are unchanged. The existing filename is the intentional naming exception requested by the package instruction to keep that lane's path.
  • Harness/split_log_paths.py reads CTest JSON, requires exactly one nonempty absolute path per integration-split entry, resolves aliases, and rejects any other discovered entry sharing it. Errors name the offending entry/path. SplitLogPaths.PrivateAndDistinct is an additional split-build-only test (not labeled unit or integration-split, preserving their required counts). The control script also runs the check before its baseline, including on a fully skipped lane.
  • scripts/ci/split_negative_controls.sh discovers the paths from CTest itself, removes only the selected entries' previous logs immediately before each control, and requires E1's named Fatal in a fresh selected private file. A nonzero status or a Fatal on stdout alone is insufficient. E3(a) retains the scenario-output channel but no longer accepts a generic source-line Failure.
  • scripts/ci/testdata/stub_ctest.sh models CTest metadata and the library file sink independently. New testdata/split_private_log_smoke.sh checks the private-file cases and their exact failure messages. split_negative_controls.sh --self-test runs both the existing smoke suite and this extension.

Only the six granted source/test files changed. No workflow or local gate edits were needed: both existing call sites discover paths automatically. No new dependency on the temporary CI branch trigger. No C++ changes, generated opcode/catalogue changes, LFS fetch, or adb access.

2. All 21 entries and their paths

Measured from ctest --show-only=json-v1, not inferred from a filename convention. Ten default + ten SmallRing + one PersistentMapArm = 21. All 21 files exist, are nonempty, and contain library Initializing MobileGL and MOBILEGL_TRANSPORT=inproc lines. Bytes below are the inspected completed lane run (later runs may change timestamps).

Entry MOBILEGL_LOG_FILE_PATH Bytes
DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels.log 24081
DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToASubRectReadback /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToASubRectReadback.log 24081
DirectGLES.Split.ClearThenReadPixelsScenario.ABlitIntoTheDefaultFramebufferSurvivesAnEarlierClear /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.ClearThenReadPixelsScenario.ABlitIntoTheDefaultFramebufferSurvivesAnEarlierClear.log 24081
DirectGLES.Split.ClearThenReadPixelsScenario.AMultisampleResolveBlitIntoTheDefaultFramebufferKeepsItsOrientation /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.ClearThenReadPixelsScenario.AMultisampleResolveBlitIntoTheDefaultFramebufferKeepsItsOrientation.log 24081
DirectGLES.Split.ClearThenReadPixelsScenario.ADrawIntoTheDefaultFramebufferSurvivesAnEarlierClear /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.ClearThenReadPixelsScenario.ADrawIntoTheDefaultFramebufferSurvivesAnEarlierClear.log 24081
DirectGLES.Split.TriangleScenario.AVboBackedTriangleReachesReadPixels /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.TriangleScenario.AVboBackedTriangleReachesReadPixels.log 24081
DirectGLES.Split.TriangleScenario.TheSameVboAndVaoRedrawAcrossAFrameBoundary /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.TriangleScenario.TheSameVboAndVaoRedrawAcrossAFrameBoundary.log 24081
DirectGLES.Split.PersistentCoherentMapScenario.TwoWritesThroughTheCoherentPointerEachReachTheirOwnDraw /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.PersistentCoherentMapScenario.TwoWritesThroughTheCoherentPointerEachReachTheirOwnDraw.log 24081
DirectGLES.Split.PersistentCoherentMapScenario.AWriteAfterAFrameBoundaryReachesTheNextFramesDraw /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.PersistentCoherentMapScenario.AWriteAfterAFrameBoundaryReachesTheNextFramesDraw.log 24081
DirectGLES.Split.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares.log 24081
DirectGLES.Split.PersistentMapArm.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/persistent-map-arm-split-DirectGLES.log 24549
DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels.log 24080
DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToASubRectReadback /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToASubRectReadback.log 24080
DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ABlitIntoTheDefaultFramebufferSurvivesAnEarlierClear /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ABlitIntoTheDefaultFramebufferSurvivesAnEarlierClear.log 24080
DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.AMultisampleResolveBlitIntoTheDefaultFramebufferKeepsItsOrientation /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.AMultisampleResolveBlitIntoTheDefaultFramebufferKeepsItsOrientation.log 24080
DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ADrawIntoTheDefaultFramebufferSurvivesAnEarlierClear /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.ClearThenReadPixelsScenario.ADrawIntoTheDefaultFramebufferSurvivesAnEarlierClear.log 24080
DirectGLES.Split.SmallRing.TriangleScenario.AVboBackedTriangleReachesReadPixels /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.TriangleScenario.AVboBackedTriangleReachesReadPixels.log 24080
DirectGLES.Split.SmallRing.TriangleScenario.TheSameVboAndVaoRedrawAcrossAFrameBoundary /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.TriangleScenario.TheSameVboAndVaoRedrawAcrossAFrameBoundary.log 24080
DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.TwoWritesThroughTheCoherentPointerEachReachTheirOwnDraw /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.TwoWritesThroughTheCoherentPointerEachReachTheirOwnDraw.log 24080
DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.AWriteAfterAFrameBoundaryReachesTheNextFramesDraw /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.AWriteAfterAFrameBoundaryReachesTheNextFramesDraw.log 24080
DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares /home/swung/w7/p5-j0/build-split/MobileGL/MG_IntegrationTest/split-logs/DirectGLES.Split.SmallRing.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares.log 24080

Evidence: ~/w7/p5-j0-split-list.log, p5-j0-split-tests.json, p5-j0-log-inventory.json, and the files above. The counting lane's RESOURCE_LOCK was also retained in JSON.

Correction to the task's premise: the harness does not write the literal ClientSession::Active() is null skip reason through MGLOG on this head. All 21 skip reasons are in GoogleTest/JUnit output (p5-j0-split.xml); zero private logs contain that string. The private files contain real library initialization/configuration/backend/shutdown lines. No C++ logging change was invented to make the premise true.

3. The two controls' expected strings, derived from source

E1 — MOBILEGL_IPC_VERB_BARRIER=0

Required private-file pattern: Fatal{BarrierViolation, "<slot>"}; for example Fatal{BarrierViolation, "DrawVbo"}. The implemented regex accepts an identifier slot and requires the exact Fatal category, quotes and closing brace.

Verified read-only from the committed p5/c1@f280baf2b34e06eb6332263adfb5ad57d01e4eb4 using git show: MobileGL/MG_Remote/Client/ClientSession.cpp:692-697 checks ApplyThreadIsInsideApplier(), emits MGLOG_F("MGPipe: Fatal{BarrierViolation, \"%s\"} ...", Wire::WireOpName(op)), and aborts. The diagnostic has moved from ID-53's approximate line 635 to line 693 on that committed branch. It is not yet present in the j0/integration base's client implementation.

The selection remains the ID-53-approved default and SmallRing Triangle/ClearThenReadPixels families. Evidence comes exclusively from a selected entry's fresh private file, not the config knob announcement or ctest stdout/status.

E3(a) — MOBILEGL_IPC_PERSISTENT_BLOCK_KB=0

There is no Fatal for zero block size in this source. MobileGL/MG_Remote/Client/PersistentMapTracker.cpp:29-30 converts KiB to bytes; :83-88 explicitly returns when blockBytes == 0, disabling the push. The resulting expected diagnostics are the scenario's own pixel assertions:

  • the SECOND write through the same mapping, announced by nothing — Scenarios/PersistentCoherentMapScenario.cpp:414-417.
  • frame 1's write through the SAME mapping, after a Present — the same source, :442-443.

The existing counting lane additionally asserts cannot have pushed zero bytes at :532-541, but it is not selected by this E3(a) filter, so the control does not pretend that its message can prove the selected run. Both selected messages are emitted through GoogleTest and read from the ctest failure transcript. Any generic PersistentCoherentMapScenario.cpp:<line>: Failure alone is now rejected.

4. R-16: the plumbing and control were made red

Command: wsl.exe -d Arch -- bash -lc "cd ~/w7/p5-j0 && bash scripts/ci/split_negative_controls.sh --self-test".

  • Existing smoke suite: 9 passed, 0 failed.
  • Private-log extension: 5 passed, 0 failed: missing Fatal in an existing file, Fatal only on stdout, stale Fatal from before the run, actual fresh file Fatal, and an unrelated E3(a) red after E1 succeeded. The first three assert E1 FAILED: selected private logs lack expected Fatal; the positive case must pass both controls; the last asserts E3(a)'s own missing-diagnostic message.
  • I made it red once by removing the production E1 private-file read and accepting the nonzero ctest status instead. The missing-Fatal stub then made both controls falsely pass; the smoke test exited 1 with NOT OK missing-fatal: control must report FAILED for its own reason. Restored the read and reran: 9/9 + 5/5. Evidence: ~/w7/p5-j0-red-once.log, p5-j0-smoke.log.
  • I made the ownership gate red by temporarily replacing the generated per-entry filenames with shared.log. It failed naming the first entry, duplicate absolute path, and all colliding owners. Evidence: p5-j0-path-duplicate-red.log.
  • I made the ownership gate red by temporarily removing the generated per-entry log properties. It failed naming the first entry and requires exactly one nonempty MOBILEGL_LOG_FILE_PATH. Evidence: p5-j0-path-missing-red.log.
  • Both generated-file perturbations were restored; the actual registered test is green: 21 entries, 21 distinct private paths, p5-j0-path-check.log.

5. Builds and acceptance numbers

Both builds use the supplied Clang/Ninja/ccache Release INFO recipe, CCACHE_BASEDIR=/home/swung/w7, -j 14, the supplied Mesa vendor/ICD, integration and unit tests on, benchmark off. Split additionally enables DISAGGREGATED and INPROC; push enables PIPE_PUSH alone. Checked build-split/CTestTestfile.cmake before trusting ctest. Build commands completed successfully. Test lanes use GLIBC_TUNABLES=glibc.malloc.tcache_count=0 in the retained test/control recipe; push explicitly uses MOBILEGL_TRANSPORT=monolith.

Gate Result
Split ctest -N -L integration-split 21 entries
Split CTest JSON 21 distinct private paths; 21 nonempty library logs
Split runtime lane 0 passed / 0 failed / 21 skipped, null Active() client session
Split unit 1985 selected: 1974 passed / 1 failed / 10 skipped; CTest reports 1 failed out of 1985
Known unit failure PipeWireCodecTest.NoReplyIsWrittenForARowTheCatalogueGivesNoReplySlot, unchanged c1 debt
Push integration-gpu CTest 1128/1128, zero failures; precise JUnit split 935 passed / 0 failed / 193 skipped
Push all-label ctest -N 2942 names
Frozen all-label baseline 2902 names; comm: 0 removed / 40 added
Prior integrated t1 push names 2942, exactly identical to j0, comm -3 empty
Split all-label JSON 3135 entries including the one new unlabelled ownership test
G1 Unaffected by construction: no C++ or library build-graph change; no new G1 binary comparison claimed

The supplied frozen name baseline is older than P5. Literal equality against that file is not true, and was already not true in t1-v2.md §5 (0 removed / 40 added). The 40 are the existing 11 integration additions plus 29 other tests; j0's push names are exactly equal to ~/w7/p5-t1-names-push.txt. No existing name was removed or changed. The new ownership test exists only in the split build.

Evidence: ~/w7/p5-j0-build.log, p5-j0-unit.log/.xml, p5-j0-push.log/.xml, p5-j0-split-run.log/p5-j0-split.xml, p5-j0-push-names.txt, p5-j0-name-parity.log. The latter records the complete 40-name difference. Reproducers retained: p5-j0-build.sh, p5-j0-test.sh, p5-j0-names.sh, p5-j0-submodlinks.sh. The link script uses its own temporary filename and parses .gitmodules without invoking git while links are on.

6. Pending joint-head execution / exact integrator command

On feat/disaggregated@c3e736a3, ClientSession::Active() is null. Real E1 and E3(a) negative controls cannot be measured here. The unchanged runtime arming rule reports all skipped and disarms them honestly; it does not claim that a zero script exit proves either control. Evidence: ~/w7/p5-j0-controls.log, p5-j0-controls/isplit.xml.

After merging c1/v1/j0 and building the joint head's build-split with the prescribed recipe, run:

wsl.exe -d Arch -- bash -lc "cd ~/w7/pipe/build-split && test -f CTestTestfile.cmake && env -u MOBILEGL_IPC_VERB_BARRIER -u MOBILEGL_IPC_PERSISTENT_BLOCK_KB GLIBC_TUNABLES=glibc.malloc.tcache_count=0 CONTROL_TMPDIR=/home/swung/w7/p5-j0-joint-controls bash ../scripts/ci/split_negative_controls.sh"

This first requires a green armed baseline, then runs the barrier-zero ctest selection (which must go red), reads its private Fatal file, and prints private-log evidence: <entry>: <path> before E1's success line. It then requires E3(a)'s own second-write/frame-boundary assertion. Missing Fatal, unrelated red, green knob-off selection, or red baseline fails the script. An all-skipped warning is not joint-head completion. The integration owner must execute both on the joint head before closing ID-53/E1/E3(a); ID-42's emulated-arm perturbation remains the integration owner's separate task.

7. Scope, limitations, and handoff

No contract ruling was changed. ID-53(1) plumbing is implemented and falsified by the controls above. ID-42/46/48 were read; their client/server/ownership work was not taken over. Pull/verify builds and a new G1 symbol report were not run because this package's explicit acceptance scope is split unit + push integration and there is no C++ change. No generator input changed, so no generator revalidation was needed.

Two brief/task assumptions are corrected by evidence, not silently claimed: the frozen names have 40 pre-existing additions, and the skip reason is in JUnit rather than the library file. Real barrier and persistent-block failures remain pending the joint head, as explicitly required by the task.

Worktree left clean, all submodule links off. Temporary generated-file/source perturbations are restored. Report is outside the repository at ~/w7/notes/p5/p5-results/j0-v1.md; all retained p5-j0 artifacts are cited above.