mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
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.
222 lines
14 KiB
Markdown
222 lines
14 KiB
Markdown
# j0 round 2 — put ID-53's private-log checks on the actual gates
|
|
|
|
Branch **p5/j0**. Round-2 range **b2dcae71..68d8ef9f**; full package range **c3e736a3..68d8ef9f**.
|
|
Commit **68d8ef9f3444b6878b84695dd04e585082a8278f**:
|
|
`[Fix] (IntegrationTest): gate private split logs and repair control red-checks`.
|
|
Immediately before committing, `git var GIT_COMMITTER_IDENT` printed
|
|
`Swung0x48 <swung0x48@outlook.com>`. Single-line message, no attribution trailer.
|
|
|
|
Read the entire 361-line review, PACKAGE-PREAMBLE, ID-53, ID-60 and BRIEF §13/R-16 before edits.
|
|
Eight repository files changed in round 2, all granted. The external local gate has exactly one
|
|
invocation-line edit, reproduced below; it is outside this repository commit.
|
|
No C++, headers, `.def`, generator inputs, or library build-graph changes: **G1 unaffected**.
|
|
No new binary G1 comparison is claimed. No LFS fetch, adb access, other package edits/builds, or
|
|
integration-tree writes. The temporary `feat/disaggregated` trigger is unchanged and no new
|
|
condition or step depends on it.
|
|
|
|
## Findings and falsification
|
|
|
|
### F1 — CI and the local gate now execute the private-file cases
|
|
|
|
`control_smoke_test.sh` now runs `testdata/split_private_log_smoke.sh` before emitting its final
|
|
success marker. A failure in the extension propagates as `CONTROL_SMOKE_TEST_FAILED`, exit 1.
|
|
The existing CI command is unchanged: **`bash scripts/ci/control_smoke_test.sh`**. Its result is
|
|
**9 passed + 5 passed, 0 failed**, exit 0. `split_negative_controls.sh --self-test` delegates to
|
|
that complete suite, so the five cases are not run twice.
|
|
|
|
The local gate previously had no smoke invocation. Changed only
|
|
`~/w7/notes/tools/wsl_p5_gate.sh:179` to:
|
|
|
|
```bash
|
|
( bash scripts/ci/control_smoke_test.sh && cd build-split && MOBILEGL_ITEST_REQUIRE_GPU=1 CONTROL_TMPDIR="$LOG-controls" bash ../scripts/ci/split_negative_controls.sh )
|
|
```
|
|
|
|
Executed that exact line using `p5-j0-v2-local-gate.sh`, with LOG/TMPDIR set to this package's
|
|
scratch paths, and checked the gate's Bash syntax. It passes the complete smoke test and then
|
|
reports the runtime lane disarmed (21 skips). The integrator's full multi-build gate was not run.
|
|
|
|
**I made it red once by removing only the E1 Python private-file read and accepting the nonzero
|
|
CTest status:** the actual CI command exited **1**, with
|
|
`NOT OK missing-fatal: control must report FAILED for its own reason` and
|
|
`CONTROL_SMOKE_TEST_FAILED`. Restored the read; the same command passes 14/14.
|
|
Evidence: `p5-j0-v2-f1-red.log`, `p5-j0-v2-smoke.log`, `p5-j0-v2-local-gate.log`.
|
|
|
|
### F2 — the mechanised red-check works with both evidence channels
|
|
|
|
`redcheck_control_smoke_test.sh` now recognizes `if !` and `elif !`, preserving the appropriate
|
|
keyword when it disables the transcript check. It independently requires exactly one E1 Python
|
|
evidence branch and disables that read too. The heredoc Python invocation has `|| exit 1`, so a
|
|
failed perturbation stops the runner instead of falling through and blaming the controls.
|
|
Both mktemp callers now stop on allocation failure instead of continuing with an empty WORK.
|
|
|
|
The restored runner exits **0**, prints `P5_T1_CONTROL_SMOKE_REDCHECK_OK`, and requires all three
|
|
named failures: unrelated split red, unrelated retrace red, and missing private-file Fatal.
|
|
Its internal deliberate mutation produces a smoke exit 1; its trap restores both control files.
|
|
|
|
**I made the red-check itself red once by deliberately deleting the production E1 read:** it
|
|
exited **1**, reported `the smoke test is ALREADY RED; the red-check below would prove nothing`,
|
|
and included `NOT OK missing-fatal: control must report FAILED for its own reason`. Restored the
|
|
production read and reran the runner green. Evidence: `p5-j0-v2-f2-red.log`, `p5-j0-v2-redcheck.log`.
|
|
|
|
### F3 — the failure artifact covers all 21 private logs
|
|
|
|
The existing `integration-split-logs` artifact retains `*.log*` for the counting file and adds only
|
|
`build-split/MobileGL/MG_IntegrationTest/split-logs/*.log`. The step's `if: always()` is unchanged.
|
|
The retained inspector reads the actual workflow's artifact patterns and compares their filesystem
|
|
matches against the 21 paths extracted from CTest JSON: **21/21 covered, 0 missing**.
|
|
|
|
**I made it red once by deleting the new split-logs pattern:** coverage dropped to **1/21**, exit
|
|
**1**, with **20** `ARTIFACT FAILED: missing private log <path>` messages. Restored the line and
|
|
verified 21/21 again. Evidence: `p5-j0-v2-f3-red.log`, `p5-j0-v2-artifact.log`,
|
|
`p5-j0-v2-inspect.py`. This is a local glob/actual-file coverage check, not a claim to have uploaded
|
|
a GitHub artifact from this machine.
|
|
|
|
### F4 — ownership has the integration-split label and really runs
|
|
|
|
`SplitLogPaths.PrivateAndDistinct` now has **integration-split**, which the existing
|
|
`integration-split` job selects with `ctest -L integration-split`. It is not labeled unit or GPU.
|
|
`ctest --test-dir build-split -L integration-split -R SplitLogPaths --no-tests=error --output-on-failure`
|
|
runs **1/1 passed**. The full label now has **22** tests, of which **21** are runtime entries.
|
|
|
|
Two necessary consequences are handled: the Python ownership helper identifies the actual
|
|
`DirectGLES.Split.*` entries by name rather than demanding a log from the metadata test itself;
|
|
the control's baseline uses `-R '^DirectGLES\.Split\.'` so the metadata pass cannot arm skipped
|
|
runtime entries. Real execution confirms **0 passed / 0 failed / 21 skipped** in the control's
|
|
baseline, despite the full label containing the passing ownership check.
|
|
|
|
**I made it red once by dropping exactly one entry's path** in the generated CTest include (a
|
|
temporary `continue()` for the named entry): the above labeled command exited **8**, with
|
|
`SplitLogPaths FAILED: DirectGLES.Split.TriangleScenario.TheSameVboAndVaoRedrawAcrossAFrameBoundary: requires exactly one nonempty MOBILEGL_LOG_FILE_PATH`.
|
|
Restored the generated file and reran 1/1 green. Evidence: `p5-j0-v2-f4-red.log`,
|
|
`p5-j0-v2-ownership.log`, `p5-j0-v2-controls.log`.
|
|
|
|
### F5 — function name
|
|
|
|
Corrected the E1 comment from `ClientSession::Post` to `ClientSession::EmitAndWait`.
|
|
This is documentation of the source site established in the review, not a new behavior or gate.
|
|
The private-evidence behavior it describes has the F1 red-once above.
|
|
|
|
### F6 — race-only evidence, recorded explicitly
|
|
|
|
E1 now asserts: after a green runtime baseline, the selected knob-off run fails, and at least one
|
|
selected entry's freshly reset private log contains `Fatal{BarrierViolation, "<slot>"}`. The
|
|
comment explicitly states that the overlap with the applier is timing-dependent. There are no
|
|
pixel-assertion, generic source-line, stdout-Fatal, or nonzero-status fallbacks. If no selected emit
|
|
observes the applier inside its critical region, E1 **fails for missing Fatal**, even if another
|
|
scenario assertion fails. The F1 red-once and the missing/stdout/stale cases enforce that rule.
|
|
No deterministic firing rate or successful real E1 execution is claimed on this unarmed head.
|
|
Per ID-53, the joint-head run remains required before E1/E3(a) count as executed controls.
|
|
|
|
### F7 — evidence line pinned exactly
|
|
|
|
The positive private-file case now uses `grep -qFx` on the full
|
|
`private-log evidence: <exact selected entry>: <exact case directory>/entry.log` line, in addition
|
|
to exit 0 and E3(a)'s success diagnostic.
|
|
**I made it red once by suppressing only the helper's evidence print:** the CI smoke command
|
|
exited **1** with `NOT OK private-file evidence line must name the selected entry and path`.
|
|
Restored the print, reran 14/14. Evidence: `p5-j0-v2-f7-red.log`, `p5-j0-v2-smoke.log`.
|
|
|
|
### F8 — duplication and dead variable
|
|
|
|
Removed the unused `TEST_LIST MGL_SPLIT_ARM_TESTS`; the counting entry retains its path and
|
|
`RESOURCE_LOCK=['persistent-map-arm-split-DirectGLES.log']`. SmallRing discovery and the generated
|
|
log include now consume the same `MGL_SPLIT_SMALL_RING_SCENARIOS` list instead of spelling the
|
|
three scenarios twice. Build/configure pass; JSON still shows 21 distinct paths. The ownership
|
|
gate's F4 missing-path red-once is the enforcement if discovery ever loses a path.
|
|
|
|
### F9 — explicit Python policy; REQUIRED retained
|
|
|
|
Python is **not globally mandatory for the library-only build**. The optional purity check is
|
|
not proof of that, nor is `Vulkan-Utility-Libraries`' REQUIRED lookup: the latter is guarded by
|
|
the optional `VUL_CODEGEN` setting. I do not claim otherwise. The P5 verification workflow already
|
|
requires Python (the existing controls unconditionally use it to tally JUnit), and this enabled
|
|
split-integration ownership gate is mandatory. Its policy is therefore **fail configuration if
|
|
the interpreter is missing, rather than silently omit this gate**; `REQUIRED` is intentional and
|
|
now documented at the lookup. This is a new configure requirement for this enabled test suite.
|
|
|
|
One scope correction to the review: it is not every `MOBILEGL_BUILD_DISAGGREGATED` configure.
|
|
The top-level `CMakeLists.txt:872-874` enters MG_IntegrationTest only when
|
|
`MOBILEGL_BUILD_INTEGRATION_TEST` is enabled; the lookup is inside that subdirectory's split block.
|
|
Both configured acceptance builds succeed with the installed interpreter. No missing-interpreter
|
|
configure experiment is claimed. The mandatory ownership test's own red-once is F4.
|
|
|
|
### F10 — stale workflow comment
|
|
|
|
Reworded only the permitted comment: all Split entries have private paths, while PersistentMapArm
|
|
retains its private counting log and nobody else writes that particular file. The existing grep
|
|
command is unchanged. JSON verifies the counting path/lock; F3 tests artifact coverage.
|
|
|
|
### F11 — require GPU in the integration command
|
|
|
|
Added `MOBILEGL_ITEST_REQUIRE_GPU=1` to the one permitted local-gate invocation line and to the
|
|
joint-head command below. All round-2 acceptance runtime runs used it. The actual local-gate line
|
|
was executed successfully; its 21 skips are the null client-session arming state, not a GPU-less
|
|
pass. No GPU-device manipulation was performed. F1's smoke red-once still applies to this line.
|
|
|
|
## Acceptance numbers and commands
|
|
|
|
Both configured builds completed using the existing `p5-j0-build.sh` recipe (Clang/Ninja/ccache,
|
|
Release INFO, split DISAGGREGATED+INPROC and push PIPE_PUSH; `-j 14`). Links were enabled before
|
|
builds, and `CTestTestfile.cmake` existence checked. A final split rebuild includes the policy
|
|
comment. Runtime tests used `GLIBC_TUNABLES=glibc.malloc.tcache_count=0` and REQUIRE_GPU=1.
|
|
|
|
| Check | Actual result |
|
|
|---|---|
|
|
| split `ctest -L unit --no-tests=error -j 14 --output-on-failure` | **1985 selected: 1974 passed, 1 failed, 10 skipped**, rc 8 |
|
|
| only unit red | `PipeWireCodecTest.NoReplyIsWrittenForARowTheCatalogueGivesNoReplySlot`, known c1 debt |
|
|
| push `MOBILEGL_TRANSPORT=monolith ctest -L integration-gpu --no-tests=error -j 4 --output-on-failure` | **1128/1128, 0 failed**, rc 0; JUnit: **935 passed, 193 skipped** |
|
|
| split `ctest -L integration-split` | **22 selected: 1 passed, 0 failed, 21 skipped**, rc 0 |
|
|
| labeled `-L integration-split -R SplitLogPaths` | **1/1 passed**, rc 0; missing-path mutation rc 8 |
|
|
| CTest JSON runtime log ownership | **21 entries, 21 distinct absolute paths, 21 nonempty files**, counting lock retained |
|
|
| smoke gate | **9 + 5 = 14 passed, 0 failed**, rc 0; file-read removal rc 1 |
|
|
| red-check | rc **0**, required named mutation failures observed; broken production read rc 1 |
|
|
| workflow artifact coverage | **21/21**; old glob red at **1/21** |
|
|
| push all-label `ctest -N` | **2942** names; frozen baseline **2902**, **0 removed / 40 added** |
|
|
| push names versus integrated t1 list | `comm -3`: **0 lines**, exact equality |
|
|
| split all-label `ctest -N` | **3135** names; frozen baseline **0 removed / 233 added** |
|
|
| G1 | **Unaffected: no C++ change**; no new symbol comparison claimed |
|
|
|
|
Literal equality to the old frozen 2902-name baseline is impossible on this already-integrated
|
|
head without deleting the 40 pre-existing additions. I agree with the review's correction rather
|
|
than claiming equality. The full `ctest -N` lists cover every label, including unlabeled tests;
|
|
`comm` results have zero removals. The 40 added names are retained explicitly. There is no name
|
|
change from this round's label assignment.
|
|
|
|
I accept F1-F8/F10-F11 and withdraw round 1's broad claim that no workflow/local-gate edits were
|
|
needed. F9's scope/policy distinction is stated above. These are the only review qualifications.
|
|
|
|
## Joint-head handoff
|
|
|
|
After the integration owner merges c1/v1/j0 and builds the joint split head, run:
|
|
|
|
```powershell
|
|
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 MOBILEGL_ITEST_REQUIRE_GPU=1 GLIBC_TUNABLES=glibc.malloc.tcache_count=0 CONTROL_TMPDIR=/home/swung/w7/p5-j0-joint-controls bash ../scripts/ci/split_negative_controls.sh"
|
|
```
|
|
|
|
This command is for the integrator; I did not execute in or edit `~/w7/pipe`. Require an armed
|
|
green baseline, E1's `private-log evidence: <entry>: <path>` and success line, and E3(a)'s own
|
|
second-write/frame-boundary diagnostic and success line. An all-skipped warning is not completion.
|
|
The timing-dependent Fatal may fail to occur; do not substitute a pixel/status fallback.
|
|
ID-42's emulated-arm perturbation remains the integrator's separate obligation.
|
|
|
|
## Retained evidence and final state
|
|
|
|
All new artifacts below live directly under `~/w7/` and have prefix `p5-j0-v2-`:
|
|
|
|
- Reproducers: `accept.sh`, `record.sh`, `inspect.py`, `local-gate.sh`; the prior report's
|
|
`p5-j0-build.sh` and `p5-j0-submodlinks.sh` are also reused. `record.sh` captures the executed
|
|
command's actual exit status inside Bash; perturbations were made/restored through UNC file tools.
|
|
- Builds: `build.log`, `rebuild.log`.
|
|
- Acceptance: `unit.log`, `unit.xml`, `push.log`, `push.xml`, `split.log`, `split.xml`,
|
|
`split-summary.log`, `push-summary.log`.
|
|
- Names/metadata: `split.json`, `push.json`, `split-names.txt`, `push-names.txt`,
|
|
`added-push-names.txt`, `t1-name-diff.txt` (empty).
|
|
- Controls/gates: `controls.log`, `controls/isplit.xml`, `local-gate.log`,
|
|
`local-gate-controls/isplit.xml`, `smoke.log`, `redcheck.log`, `ownership.log`, `artifact.log`.
|
|
- Deliberate reds: `f1-red.log`, `f2-red.log`, `f3-red.log`, `f4-red.log`, `f7-red.log`.
|
|
|
|
The 21 library files remain in the build tree at the CTest JSON paths, with the same names as
|
|
round 1. Previous-round artifacts remain as cited by j0-v1.md; no reviewer artifacts were changed.
|
|
All deliberate source/generated-file perturbations are restored. New uncited scratch data was
|
|
removed. Repository worktree clean after commit; submodule links **off**.
|