mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 15:33:22 +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.
260 lines
15 KiB
Markdown
260 lines
15 KiB
Markdown
# t1 — round 2 (wave 1.5): ID-48 finding 8, and ID-41's three stale `test.yml` comment lines
|
|
|
|
**Branch** `p5/t1`, range **`ce53553c..0a22f363`** (2 commits, both `Swung0x48 <swung0x48@outlook.com>`
|
|
as author and committer, no attribution trailer). Based on `ce53553c`, reached by
|
|
`git merge --no-edit feat/disaggregated` — a fast-forward, because round 1 (`949ed1f0`, ID-40) was
|
|
already integrated.
|
|
|
|
Files touched: `.github/workflows/test.yml`, new `scripts/ci/**`. Nothing else. One file outside the
|
|
repo, in t1's grant per BRIEF §5: `~/w7/notes/tools/wsl_p5_gate.sh`.
|
|
|
|
---
|
|
|
|
## 1. What changed
|
|
|
|
### 1.1 The control bodies moved out of the workflow (finding 8's precondition)
|
|
|
|
`run:` blocks execute nowhere but on a runner. That is why the review's claim could only be
|
|
confirmed by hand-copying the blocks into throwaway harnesses (`wave1-codex-verify.md` §8), and a
|
|
copy is not the thing it copies. Both bodies are now files:
|
|
|
|
| was | is now |
|
|
|---|---|
|
|
| `test.yml:1086-1127` inline block | `scripts/ci/split_negative_controls.sh` |
|
|
| `test.yml:1964-1992` inline block | `scripts/ci/retrace_pull_library_control.sh` |
|
|
| the inline JUnit counter | `scripts/ci/junit_tally.py` |
|
|
|
|
The workflow steps now call those files; `scripts/ci/control_smoke_test.sh` drives **the same files**
|
|
against a stubbed ctest. There is no second implementation to drift.
|
|
|
|
I also pointed `~/w7/notes/tools/wsl_p5_gate.sh` at `scripts/ci/split_negative_controls.sh`. The gate
|
|
carried its own copy of the E1/E3(a) loop **with the identical defect** — `elif env "$knob" ctest …;
|
|
then FAIL … else "turned N selected entries RED, as it must"` — and the gate is the one a package
|
|
author runs before pushing. Fixing CI and leaving that would have left the same wrong verdict in the
|
|
tool everyone actually runs.
|
|
|
|
### 1.2 Each control now asserts its own failure reason (ID-46 finding 8, both halves)
|
|
|
|
**E1 / E3(a)** (`split_negative_controls.sh`):
|
|
|
|
1. **The baseline must be GREEN.** The arming run's `|| true` is gone and the counter counts
|
|
**passed**, not "not `<skipped/>`". A baseline with any failed entry is now a hard error with its
|
|
own message: turning an already-red entry red is not a measurement. This was the second half of
|
|
the finding and it is the half that makes the first half mean anything.
|
|
2. **The red must carry the selected scenario's own diagnostic.** `run_control` takes an evidence
|
|
regex and refuses a red that matches none of it. Whitespace is normalised across the whole
|
|
capture first (newlines included) so a wrapped diagnostic still matches.
|
|
|
|
**The retrace control** (`retrace_pull_library_control.sh`):
|
|
|
|
1. **A `ctest -N` selection guard**, which this control had never had — unlike the split lane's
|
|
`run_control`, which has had one since M-4. The verifier measured the hole: a case/backend regex
|
|
matching nothing exits 8 through `--no-tests=error`, and `if [ "${control_rc}" -eq 0 ]` accepted
|
|
8. `--no-tests=error` can no longer be the thing that makes it pass.
|
|
2. **The red must carry `run_trace_case.cmake`'s own sentence**, `never reported resolving it`
|
|
(`run_trace_case.cmake:281`). A loader failure, a missing fixture, a timeout or an SSIM drop all
|
|
used to pass it after the `nm` identity check.
|
|
|
|
### 1.3 ID-41's debt — b1-v2.md §1.4, applied verbatim
|
|
|
|
`test.yml:2328` `3e298c9a` → *"a sha pinned in the script at 3dadd4c1 (ID-41), because that one was
|
|
born in P3a and is compared against the reviewed body rather than against the base ref"*;
|
|
`:2340` "six canned controls" → eight, naming the pin-precedence control and the one-token pinned-ladder
|
|
edit; `:2377` "FOUR negative ones" → NINE.
|
|
|
|
I verified all three against the live scripts rather than transcribing b1's counts: `3dadd4c1` is
|
|
`PINNED_BASELINE_REF` in both scripts, `p3a --self-test` prints 3 positive + 3 negative + the pin
|
|
control + the one-token pinned control = **8**, and `p4a --self-test` ends *"9 negative controls, all
|
|
tripped and all named"*. Both self-tests pass on this head. The `FOUR negative ones` line also named
|
|
four targets that are now perturbed at head **and** tail, so the corrected sentence says that too.
|
|
|
|
---
|
|
|
|
## 2. R-16: the smoke test, and the red-once line
|
|
|
|
`scripts/ci/control_smoke_test.sh` runs both real control scripts against
|
|
`scripts/ci/testdata/stub_ctest.sh`. Nine cases, all green on this head:
|
|
|
|
```
|
|
ok unrelated failure with a non-empty selection FAILED <- the finding, reproduced
|
|
ok the scenarios' own diagnostic PASSED
|
|
ok the knob leaves the selection green FAILED
|
|
ok the baseline is already red FAILED
|
|
ok every split entry skipped (lane not armed) PASSED
|
|
ok empty selection (--no-tests=error exit) FAILED <- finding 8(b), reproduced
|
|
ok red without the transport-resolution message FAILED
|
|
ok run_trace_case.cmake's own sentence, wrapped PASSED
|
|
ok a pull library passed the split retrace FAILED
|
|
smoke test: 9 passed, 0 failed / CONTROL_SMOKE_TEST_OK
|
|
```
|
|
|
|
The workflow runs it too, in `pipe-gates`, with **no branch guard** — it asks a question every branch
|
|
can answer and nothing new hangs off the TEMPORARY `feat/disaggregated` trigger (R-14).
|
|
|
|
**I made it red once, by doing X.** X = remove the evidence check from both controls, i.e. put them
|
|
back in the state finding 8 found them in. Mechanised as
|
|
`scripts/ci/redcheck_control_smoke_test.sh`, so the claim can be re-checked rather than believed: it
|
|
asserts the smoke test is green first, replaces each control's single evidence `if` with `if false;
|
|
then`, requires the smoke test to go red **on exactly the two cases that pin the evidence check**,
|
|
and restores the files. Log: `~/w7/p5-t1-control-redcheck.log`. With the check removed the control
|
|
prints, verbatim:
|
|
|
|
```
|
|
UNRELATED_CONTROL_FAILURE: the harness aborted in setup before the knob was read
|
|
negative control E1 (MOBILEGL_IPC_VERB_BARRIER=0) turned 1 selected entries red, ... as it must
|
|
```
|
|
|
|
— which is the verifier's `HARNESS_EXIT=0` reproduced inside the repository.
|
|
|
|
---
|
|
|
|
## 3. Two things the integrator's brief got wrong, both load-bearing
|
|
|
|
### 3.1 `Fatal{BarrierViolation, "DrawVbo"}` does not exist
|
|
|
|
The round-2 brief says `~/w7/p5-v1-joint-isplit-barrier0.log` recorded *"eighteen
|
|
`Fatal{BarrierViolation, "DrawVbo"}`"*. It did not:
|
|
|
|
- `grep -c Fatal ~/w7/p5-v1-joint-isplit-barrier0.log` → **0**.
|
|
- `grep -rn BarrierViolation` over the whole tree → **0**. There is no such Fatal kind anywhere.
|
|
|
|
The 18 entries in that log are `Subprocess aborted` with **no output after `[ RUN ]`**. This is
|
|
ID-50's caveat made concrete: ctest captures only gtest output, the library's console sink is
|
|
compiled out of this configuration, and the three `DirectGLES.Split.` lanes set no
|
|
`MOBILEGL_LOG_FILE_PATH` (only the `PersistentMapArm` lane has one,
|
|
`MG_IntegrationTest/CMakeLists.txt:1945`). **No `MGLOG_` output of any level reaches CI from the E1
|
|
selection.** So the barrier knob has no named diagnostic a control can require. Recorded as a debt in
|
|
§5, not papered over.
|
|
|
|
### 3.2 The `:290/:295` assertion came from an entry the E1 filter excluded
|
|
|
|
`ClearThenReadPixelsScenario.cpp:290/:295` ("reading back 0 where >200 was cleared") is real and is
|
|
in that log — but it belongs to
|
|
`DirectGLES.Split.**SmallRing**.ClearThenReadPixelsScenario.AMultisampleResolveBlit…`, and the old E1
|
|
filter was `DirectGLES\.Split\.(Triangle|ClearThenReadPixels)`, which the intervening `SmallRing.`
|
|
excludes. Every entry the old filter *did* select aborted silently. **A control whose selection
|
|
contains no case able to say why it failed cannot assert its own failure reason at all.**
|
|
|
|
So E1's filter is now `DirectGLES\.Split\.(SmallRing\.)?(Triangle|ClearThenReadPixels)` and E3(a)'s
|
|
is `DirectGLES\.Split\.(SmallRing\.)?PersistentCoherentMapScenario`. The SmallRing entries are the
|
|
same scenarios under the same transport with `SEG_CMD`/`SEG_STAGE` at their floor, so this widens the
|
|
selection strictly within E1's charter (BRIEF §7 E3(e) is the same lane). **This is the one change
|
|
that wants a ruling** — see §5.
|
|
|
|
### 3.3 Why I did NOT use ConfigLoader's per-knob line as the evidence
|
|
|
|
`ConfigLoader.cpp:385-393` logs `MOBILEGL_IPC_VERB_BARRIER=0 is the R-1 NEGATIVE CONTROL …` and
|
|
`MOBILEGL_IPC_PERSISTENT_BLOCK_KB=0 is the E3(a) NEGATIVE CONTROL …`. It is the obvious thing to grep
|
|
for and it is **not evidence**: it is written at config load by every process in the run, whatever
|
|
happens afterwards. A setup abort carries it too. It proves the knob was *read*, never that the knob
|
|
caused the red. Stated here so nobody "completes" this work by reaching for it. (It is also
|
|
unreachable — §3.1.)
|
|
|
|
For E3(a) the knob DOES have reachable evidence: with the push off, the write that no GL call
|
|
announces cannot reach its draw, and the cases fail on their own wording
|
|
(`PersistentCoherentMapScenario.cpp:414-417`, `:442-443`, and the counting case's `cannot have
|
|
pushed … zero bytes` at `:531-541`). That is what the E3(a) control requires.
|
|
|
|
---
|
|
|
|
## 4. The four self-tests, on `0a22f363`
|
|
|
|
| | result |
|
|
|---|---|
|
|
| **1. G1** (`symbol_report.py --threshold 0` vs `~/w7/p5-before-libMobileGL.so`, baseline marker `4595163c`) | `.text 10806611 -> 10806611 (+0, +0.000%)`; `27814 -> 27814 defined symbols: 0 added, 0 removed, 0 resized, 0 renamed`. **0/0/0/0.** |
|
|
| **1b. G1-split purity** | `nm MG_Remote pull=0, split=345` |
|
|
| **2. `ctest -L unit`** | pull **1814/1814**, push **1814/1814**, verify **1814/1814**, split **1975 with exactly 1 red** |
|
|
| | the one red is `PipeWireCodecTest.NoReplyIsWrittenForARowTheCatalogueGivesNoReplySlot` — c1's, ID-43, not mine |
|
|
| **3. `ctest -L integration-gpu`** | push **1128/1128**; split under `MOBILEGL_TRANSPORT=monolith` **1149/1149**. G2 pull-vs-push name diff **0**; G14 removed **0**, added 40 |
|
|
| **4. generators** | `gen_pipe --check` up to date, `--self-test` 9 trips + positive control OK; `gen_pipe_dirty_surface --check` OK; `gen_pipe_field_ownership --check` up to date. t1 touched no `.def` and no generator. |
|
|
|
|
Every number matches the brief's expectation for this head. Workflow edits cannot move G1 and did
|
|
not.
|
|
|
|
**`integration-split` is 21 entries, all SKIPPED** (`ClientSession::Active()` is null) until c1/v1
|
|
land, so E1/E3(a) cannot be run for real yet. I ran the new script against the real `build-split`
|
|
anyway: it reports `split entries - passed: 0, failed: 0, skipped: 21 (ctest exit 0)`, emits the
|
|
disarmed `::warning::` and exits 0 — the correct behaviour on this head, and not a green that
|
|
asserted anything.
|
|
|
|
---
|
|
|
|
## 5. What the integrator runs on the joint head, and the one ruling I want
|
|
|
|
Once c1/v1 land and the 21 entries arm, **one command** decides whether E1 and E3(a) are real:
|
|
|
|
```
|
|
cd ~/w7/<joint-tree>/build-split && \
|
|
CONTROL_TMPDIR=~/w7/p5-t1-controls bash ../scripts/ci/split_negative_controls.sh ; echo "RC=$?"
|
|
```
|
|
|
|
Expected, given v1's joint tree measured a **green** baseline (`~/w7/p5-v1-joint-isplit.log`:
|
|
21 entries, 19 passed, 2 skipped):
|
|
|
|
- `split entries - passed: 19, failed: 0, skipped: 2` — the baseline gate passes.
|
|
- **E3(a)**: should print `… turned N selected entries red, and the red carries the scenario's own
|
|
diagnostic, as it must`.
|
|
- **E1**: will print the **unattributed-red error** and exit 1 *unless* at least one of the 14
|
|
selected entries fails by assertion rather than aborting. On the recorded barrier-0 run exactly one
|
|
did (`:290/:295`, the SmallRing multisample case — which is why §3.2's filter widening exists). If
|
|
that case aborts on the joint head instead, E1 has no evidence at all and the error message says so
|
|
by name.
|
|
|
|
**The ruling I want:** §3.2's filter widening, and the debt behind it. E1 cannot assert its own
|
|
failure reason while the barrier path aborts silently. Two ways out, neither mine to take:
|
|
|
|
1. **A named Fatal on the barrier path** (v1/s1): `Fatal{BarrierViolation, "<verb>"}` is what the
|
|
brief already believes exists. If it is added, E1's evidence becomes exact rather than incidental.
|
|
2. **A private `MOBILEGL_LOG_FILE_PATH` for the three `DirectGLES.Split.` lanes** (mine,
|
|
`MG_IntegrationTest/CMakeLists.txt`). I deliberately did **not** do this in this round: it changes
|
|
the runtime environment of lanes that arm on the joint merge, the library truncates its log per
|
|
process so it interacts with `ctest -j`, and I cannot test the armed path from this head. Doing it
|
|
blind is exactly the kind of change that breaks a joint merge. Say the word and it is a ten-line
|
|
commit — but it should land *with* the merge that arms the lanes, not before it.
|
|
|
|
Note that (2) alone does not give causation either (§3.3) — it only makes `Fatal{…}` readable, which
|
|
is why (1) is the real fix.
|
|
|
|
---
|
|
|
|
## 6. Correcting my own round-1 report
|
|
|
|
**`t1-v1.md:419`** — *"with an `nm` assertion that the control's own library really has no
|
|
`MG_Remote` in it, **so the control cannot pass for the wrong reason either**"* — the clause in bold
|
|
was **false**, and the verifier falsified it by execution against the real ctest in a real build tree.
|
|
The `nm` check establishes that the library is a pull build; it says nothing about why the replay
|
|
failed. The control had no selection guard, so a regex matching no tests exited 8 through
|
|
`--no-tests=error` and was accepted as success, and any loader failure, missing fixture or timeout was
|
|
accepted the same way.
|
|
|
|
What is true after this round: the control counts its selection first and requires
|
|
`run_trace_case.cmake`'s own `never reported resolving it` in the output, and both of those
|
|
statements are pinned by `scripts/ci/control_smoke_test.sh`, which I made red once by removing them
|
|
(§2). It still cannot distinguish *which* transport-identity defect produced the message — that is
|
|
one sentence from one assertion — and it is still not BRIEF §7 E2's charter control ("patch the
|
|
`Clear` emitter to drop one emission"), which remains the debt t1-v1.md §7.4 item 1 recorded.
|
|
|
|
---
|
|
|
|
## 7. Debts, and temp files
|
|
|
|
**Debts this round leaves:**
|
|
|
|
1. E1 has no knob-specific diagnostic (§3.1, §5). Owner: v1/s1 for the named Fatal, or t1 for the
|
|
lane log path, on a ruling.
|
|
2. E3(a)'s evidence is **unverified by execution** — the block-size knob has never been run against
|
|
an armed lane, so the regex is derived from the scenario
|
|
source, not observed (`split_negative_controls.sh:150`). The §5 command settles it.
|
|
3. BRIEF §7 E2's charter control (the `Clear`-emitter patch) is still substituted by the pull-library
|
|
control. Unchanged from round 1, still owned by whoever lands the emitter.
|
|
4. `~/w7/notes/tools/wsl_p5_gate.sh` now depends on `scripts/ci/split_negative_controls.sh` existing
|
|
in the tree under test; it prints a named "NOT RUN" line on an older checkout rather than a green.
|
|
|
|
**Temp files kept** (cited above): `~/w7/p5-t1-control-redcheck.log`,
|
|
`~/w7/p5-t1-build-*.log`, `~/w7/p5-t1-cfg-*.log`, `~/w7/p5-t1-symbols.md`,
|
|
`~/w7/p5-t1-igpu-{push,split-monolith}.log`, `~/w7/p5-t1-names-{linux,push}.txt`, and the two
|
|
scripts `~/w7/p5-t1-{build,selftests}.sh`. Deleted: `~/w7/p5-t1-probe.sh`,
|
|
`~/w7/p5-t1-commit{1,2}.sh`. The verifier's originals
|
|
(`~/w7/p5-verify-f8-*.sh`, `~/w7/p5-verify-f8-stub/`) are left untouched — they are v1's verifier's,
|
|
and their in-repo descendants are `scripts/ci/testdata/stub_ctest.sh` and `control_smoke_test.sh`.
|