mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-19 16:01:57 +09:00
[Docs] (.claude/skills, .github/workflows, CMakeLists.txt, docs/archive, docs/Disaggregated, docs/MobileVA, docs/Performance, MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Backend/Record, MG_Gbm, MG_Impl, MG_Impl/EGLImpl, MG_Impl/GLImpl, MG_Impl/GLXImpl, MG_Impl/Pipe, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Pipe/generated, MG_Remote, MG_Remote/Client, MG_Remote/Server, MG_Remote/Transport, MG_Remote/Wire, MG_State/GLState, MG_Test/Pipe, MG_Test/Util, MG_Test/Wire, MobileGL, scripts, scripts/data, tools/device_bench, userguide): archive the planning notes and agent contracts under docs/archive
- DEBTS.md and OPEN-QUESTIONS.md stay maintained, now in docs/Disaggregated.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Review: B3 fix round 3 (pipe bd849b28 10220b56 3b8bf9ec c8fc4fb7) + B2 round 4 (e385ea96 4b96f55d) — integrator (Fable 5.1, main session)
|
||||
|
||||
**Verdict: land** (no findings that need a change).
|
||||
|
||||
B3 r3: `wire_declines_audit.py` — `#endif` crossings are counted; a same-indent log under an outstanding `#endif` is accepted only if every opener found by continuing upward is the whole-line `#if MOBILEGL_BUILD_DISAGGREGATED` (`PP_DISAGGREGATED` anchored `\s*$`, so `&& !defined(X)` is fail-closed — stated); `PP_STOP` matches `#else`/`#elif` at any indentation and returns False before the indent test; `#if*` with no outstanding `#endif` stays a plain skip. 16/16 fixtures; tree 53/53/0 (gate on 4b96f55d). `run_trace_case.cmake` message now carries `MOBILEGL_IPC_CONTROL` (message only). `retrace_pull_library_control.sh`: the `case` guard `*$'\n\n'*|*$'\n'|$'\n'*` refuses a blank middle line, a trailing and a leading newline; `stub_ctest.sh` is 100755 at HEAD. No product file touched.
|
||||
B2 r4: the window leg primes the default framebuffer magenta / 0.625 (source 0.25/0.75, user FBO blue/0.5), probes expect exactly that, so reading the FBO or the source both fail (the package showed the wrong-surface red once); the gate is `!PeekSplitRuntime().transportResolved` after `Ready()`; `SplitLane.h` include dropped; note cites by symbol. Gate on 4b96f55d: unit 2436, magma 100/79/71, full 538, verify 1148/1082, the three `MsFlip.` entries Passed.
|
||||
@@ -0,0 +1,22 @@
|
||||
# B4 集成源码审查(2026-09-23)
|
||||
|
||||
## Verdict
|
||||
|
||||
**land**。审查针对 pipe 在 a4c1bc8b / b19297d5 后的源码;没有遗留正确性问题。
|
||||
|
||||
## 源码核对
|
||||
|
||||
- MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:13524-13593:WaitForFrameSerial 不再把首个匹配 fence 当成整个 frame serial 已完成。它复制 submit index、等待完整 fence 前缀、在记录被退休后从头重扫,并且只在 IsFrameSerialComplete 为真时返回成功;异常路径 drain graphics queue 后也重新检查完成地板。
|
||||
- VulkanRenderer.cpp:13678-13694 与 Renderer/SubmitFencePrefix.h:16-38:聚合等待包含目标 submit 及其之前的所有在飞 fence,使用 waitAll=VK_TRUE;缺失目标记录或无效 fence 会拒绝等待,不会用更早的前缀冒充目标完成。只在整段 wait 成功后推进 submit 完成记录。
|
||||
- VulkanRenderer.cpp:13602-13612:pending-work 判断同时包含主 command buffer 和 pre-pass command buffer 状态,避免把 pre-pass 录制漏出 pending 账本。
|
||||
- VulkanRenderer.cpp:14272-14282、:14408-14422:在 FrameContext 等待并重置槽 fence、释放退休 command buffer 之前,先等待该槽覆盖的完整 submit 前缀;初次获取没有历史 submit,仍走原路径。
|
||||
- VulkanRenderer.cpp:7064-7071、:7689-7695:wire draw 与 dispatch 路径都调用纹理垃圾回收;其内部 256 次调用节流保留,避免只在 frame boundary 清理导致长帧记录滞留。
|
||||
- MobileGL/MG_Remote/Server/StagedTextureStore.h:234-252:extent 改变时清掉旧 bytes 与 coverage,再接收新 run;StagedTextureStoreTest.AdoptRunExtentMoveDoesNotInheritOldCoverage 覆盖旧坐标系内容不可沿用。
|
||||
- MagmaAggregateWaitTest 通过生产 fence-prefix selector 对照两笔同 serial submit 与单 fence 反事实;单 fence 保留目标帧在飞,生产选择覆盖目标前缀并排除下一帧;另有缺失目标索引拒绝用例。
|
||||
- MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:177 的 ::Display* 是仅为 GCC -Wchanges-meaning 编译错误加的类型限定,未改变对象布局或执行逻辑。
|
||||
|
||||
## Luna 验收证据
|
||||
|
||||
B4 包树的 split 八车道均为 0 失败:unit 2439(2428 pass / 11 skip)、integration split 304(295 / 9)、spawn 220(211 / 9)、TCP 223(214 / 9)、Magma split 102(100 / 2)、spawn 81(79 / 2)、TCP 71(69 / 2)、full split 540(478 / 62)。Verify lanes:1152(865 / 287)与 1086(958 / 128),失败均为 0。G1 .text=0xa52203、符号增删 0/0;fatal census 79/0 未标记;ratchet 173;parity 通过;wire decline audit 53/53、0 未记录或未知;OpenRA inproc/spawn 均 SSIM 1.000000、0 mismatch、0 Fatal、0 unsound serial。
|
||||
|
||||
pipe 集成树合并后的完整门另由 Luna 续跑;这些包树结果不替代该集成门。
|
||||
@@ -0,0 +1,7 @@
|
||||
# Review: F fix round (pipe 0293aebb c69d8dfd 8c8fc319 9cea5140) — integrator (Fable 5.1, main session)
|
||||
|
||||
**Verdict: land** (two nits, recorded in CONTRACT-P7 §12 / ph-f.md; no code change required before push).
|
||||
|
||||
1. nit — `ServerMain.cpp` `RunSession`: between `session.Accept()` returning and `::close(sourceFd)` a DataBind the supervisor already forwarded is closed with the child's queue (the passed fd goes with it), so that one peer sees a bare close instead of `Refuse{Authentication}`. Window is microseconds; acceptable; record.
|
||||
2. nit — `scripts/ci/protocol_revision_pin.py`: any byte change to `protocol.fbs` (comment/whitespace) forces a revision bump; strict by design, say so in the docstring.
|
||||
Verified from the diffs: child closes `pair[1]` after Accept (supervisor's `SendFd` then fails ECONNREFUSED/ENOTCONN → TRANSPORT_CLOSED → named refusal on the extra connection; `MSG_NOSIGNAL` already set, `MSG_DONTWAIT` maps EAGAIN → TIMEOUT → same refusal); the refusal is written on the extra connection and its object is closed by the caller as before; listener closed only on the single-session (`ListenerSource`) path, `--serve` keeps the supervisor's listener; `DrainUnread` bounded 256×4 KiB; `MalformedHello` is a generated `RefuseCode` (already in the vocabulary, census unchanged 79/44/3); pin script LF-normalises, two-sided (stale row / missing row), `--write` refuses re-pin, CI step in flatc-check with nonzero exit; token compare width = max(64, configured length) with both operands zero-padded, the >64 length class leak stated; `MintNonce` failure now sends `Refuse{LinkTerms}` and still exits 67; PH-8 log line fires only when a peer asks for more than granted; no pull-build file touched (G1 holds by construction; gate on 9cea5140: unit 2436, tcp 223, spawn 220, magma 100/79/71, verify 1148/1082).
|
||||
@@ -0,0 +1,15 @@
|
||||
# review-f2(集成者审查,2026-09-23)
|
||||
|
||||
**Verdict: land.** `p7/f2-all@ec845daa`(29 提交 = 基底 4 + f2-event 7 + f2-latch 8 + f2-auth 8 + 合并收尾 2),`~/w7/p7-f2-driver`。
|
||||
|
||||
| 片 | 核对 | 结论 |
|
||||
|---|---|---|
|
||||
| 基底 PH-2/3/4/5(Luna 审查 land) | 只跑了 49 条定向测试;全车道下 PH-4 两个真缺陷(零尺寸 `glTexImage*` 被判 `ExtentCarrier` 腐坏、`TextureInternalFormat::R8 == 0` 被当「未声明」)+ PH-3 把 ID-49「DstSize≠tight 读 tight」改成拒绝 + PH-2 测试期望 | 由 f2-latch 片 A(`20b827c0`)与空层修复(`58835fa4`)一次修掉;**教训:F2 落地必须全车道 + 主机 CTS 子集** |
|
||||
| PH-1 (3)(4) 闩 | `FatalFunnel.cpp` 首错胜出(mutex + release store)、未武装=`SessionFail` 原样;只有 spawn/TCP 会话子进程武装(`ServerMain` RunSession),inproc 保持 Fatal(同进程无 supervisor,理由在 `FatalFunnel.h`);DrainRing 入口 + 每记录后查闩、apply 线程离环、闩后控制帧不执行、`_exit(75)` | 正确;64 处闩调用 53 行有原始对端负控、8 处论证不可达、`ph_latch_sites.py --self-test` 丢行即红 |
|
||||
| fuzz 臂 2 | 64 行表驱动 `PeerLatchTest`,每行独立 `--serve` supervisor、会话 A 伪造、会话 B 必须渲染;D11 五界全有行,PH-5 行已改为旧字节界放行、新界拒绝(RLIMIT_AS 红一次) | 正确 |
|
||||
| PH-6 + fuzz 臂 3 | drop-with-latch、`MOBILEGL_IPC_EVENT_WAIT_MS`(默认 2000,测试用非默认值并回读)、Stop 结束等待、shm 服务端铃有死亡见证、闩后队列不再 drain | 正确 |
|
||||
| PH-7 (5) + fuzz 臂 1 | supervisor 在 fork **之前**读 Hello 并先验令牌(未认证只回 `Refuse{Authentication}`,不泄漏指纹/stamp);预认证队列按地址共享 + 置换 + 退避;五种畸形控制帧 + `CtrlEnvelopeBufferHasIdentifier` | 正确;`MOBILEGL_IPC_PREAUTH_{MS,MAX}` / `AUTH_BACKOFF_{AFTER,MS}` 四旋钮已入文档 |
|
||||
| 门 | G1 `.text` 0xa52203 / 符号 0/0;census 79;棘轮 173;parity 0;unit 2546、split 306、spawn 223、tcp 227、magma 104/83/73、full 542;verify 构建 1156/1090;OpenRA 两臂 1.0 | 全绿 |
|
||||
|
||||
**记 §12 的债**:PipeApplier / QueryServer 另有 29 处读对端字节的 `WireProtocolFatal` 仍是 Fatal(会话进程死、supervisor 照常服务下一个);生成门 `MGPipeWireProtocolFatal` 与 MG_Pipe D11 钩子按设计 Fatal(改闩会碰 pull 构建);被丢弃事件的记录仍回 `kStatusOk`,client 无 `DroppedEvents()` 消费者。
|
||||
**协议变化**:`ControlSchemaRevision` 并入 respecify 尺寸载体修订 → wireFingerprint 变,设备 server 随下一个 APK 重部署。
|
||||
@@ -0,0 +1,11 @@
|
||||
# review-g5(集成者审查,2026-09-23):门 5 的三个 inproc × DirectVulkan CTS 缺陷
|
||||
|
||||
| 包 | 提交(只取这些) | Verdict | 核对 |
|
||||
|---|---|---|---|
|
||||
| g5-readback | `18d3f27d`、`60eabf7b`、`e521c72b`(跳过重复的 `01f95c7b`) | **land** | 客户端把超出一个回复槽的 ReadPixels 切成行带(单行超槽则切行内片),每带是一条普通 `read_pixels`、DstSize 取带的 tight 值,server 侧 PH-3 界不变;中性 pack 态保零拷贝、bounce 只一带、scatter 与整读同一函数;`Fatal{ReplyTooLarge}` 只剩「一个像素都放不下」。7 个场景含 2 MiB 整、2 MiB+1 行、17 MB > 整个 SEG_REPLY、pack 缝隙、PBO、深度/模板,red-once 72/86 红 |
|
||||
| g5-imgwin | `e8869c2a`(跳过 `8cc63c0b`);F2 落地后按包注记把 view 窗口用例并入门控臂 | **land** | 图像单元指向纹理没有的 level/layer(GL 4.6 §8.26)= 空单元:绑存储占位(着色器声明维度、每次清零),格式无声明时取应用绑定格式;只由 `ResolveWireTextureStorage` 的「确实不在」答案触发,死记录/陈旧 view 仍是具名拒绝;monolith 不动(BASE 本就 Fail) |
|
||||
| g5-msrbo | `7c1a3b74`(单采样深/模板 1:1 blit 改 copy)、`b10c8529`;`e80392ec`/`19c78bb9` 的**按 vendorID 选臂** | **rework → g5-msprobe** | 根因成立(Adreno 830 的 render-pass 深度/模板 resolve 不写目标),但按 Qualcomm vendorID 选臂违反用户 2026-08-22 规则「后端限制类判定一律 POST 探针、不按驱动名硬编码」→ 改为带对照组的运行时探针 + POST Known Driver Bugs 行(FIXED) |
|
||||
| g5-msprobe(p7/g5-msrbo 续) | `52d1099b`、`d2f2971a`、`926869f0` | **land** | 删 `WirePrefersShaderDepthResolve(vendorID)`;`WireDepthResolveProbe` 在 server 侧 Magma 初始化跑一次:六种深度/模板格式 4×4×4 样本、清到 0.25/0x5A、目标预填哨兵,用**生产同一个**无 draw render-pass resolve,对照组 = 生产着色器臂;对照不过的面不计 → inconclusive 保默认序。红米 6 格式全 `render pass 0/16 / shader control 16/16` → verdict broken,CTS 3/3;强制 clean 同库即 Fail。POST Vulkan「Known Driver Bugs」加 FIXED 行(无 stencil export 为 UNFIXABLE)。补一条 should-fix:`elide-subject` 测试旋钮让 lavapipe 的真实测量路径判 broken,证明主机上探针的真测量能红 |
|
||||
| w2-reducer(p7/devprep) | `fe4c8745..f93a9da9` | **land** | 门 3/门 5 化简器按合同公式、五块必齐、同一 boot_id、缺块/空读/子集不给 PASS,自测覆盖;设备共享锁 |
|
||||
|
||||
共同基底:三个包都带 PH-4 空层修复的重复拣选(补丁 id `92d463c8`);只随 F2 线落一次(`58835fa4`)。
|
||||
@@ -0,0 +1,14 @@
|
||||
# Review: M2 round 2 (pipe 4d207468 959ebc9e 6e18acaa 5ba34fcf + integrator f62703e9 1ab62ece) — integrator (Fable 5.1, main session)
|
||||
|
||||
**Verdict: land** (no change required before push; one cost recorded in CONTRACT-P7 §12 as M3's denominator).
|
||||
|
||||
The must-fix from round 1 (memo handle-reuse ABA) is closed the way the review asked: `VkBufferManager::m_wireStoreDestroyEpoch` is bumped on every path that destroys a wire store's VkBuffer and never reset; `UniformManager` folds it into the descriptor-reuse signature (`mix64(epoch)`) and records/compares it in `FastRebindMemo`, all under `MOBILEGL_BUILD_DISAGGREGATED`.
|
||||
|
||||
Verified on the pipe source, not the note:
|
||||
1. Every destroy site is covered. `DeferWireRelease`'s immediate destroy (`buffer.Destroy(); ++epoch`), `SweepDeferredWireReleases` (returns at `dead == 0` BEFORE the bump, so a sweep that freed nothing does not defeat the memo on the next draw), `DestroyAllDeferredWireReleases` (bump iff non-empty), `Shutdown`'s `m_wireBuffers.clear()` (bump iff non-empty). `DestroyWireBuffer` moves the store into `DeferWireRelease` and only then erases the record, so the erase destroys nothing. The seven remaining `buffer.Destroy()` calls in the file are the non-wire records, which still die at the frame boundary that clears the memos.
|
||||
2. The epoch is the destroy count's parity, not the slice epoch: `m_sliceEpochCounter` moves on every `WriteWireBuffer` and would miss on every `glBufferSubData`; the destroy epoch moves ~26k times over bsl's 1.3M calls. Cost = one extra descriptor-set acquire+write on the first draw after each destroy event, which also feeds §6.1's in-frame descriptor-set growth (M3).
|
||||
3. `FastRebindMemo` aggregate initialiser order matches the struct (epoch last, guarded on both sides); the wire arm never takes the fast rebind (`SetupWireDraw` passes no sampler hint), so the signature half is the one the scenario reds through; the memo half is defensive and costs nothing.
|
||||
4. The red-once is deterministic by construction (no sleep, no fence-poll race): orphan → flush-without-wait → a staged copy keeps the recording pending so the blocking wait cannot take the memo-clearing drain → the next park's sweep destroys S1 → a 64 KiB mint through the freed handle cannot alias the 256-byte hole a 1 MiB pin bounds → the draw reads the dead store's colour without the epoch. Both arms red at base, green with the guards; the note's static-link finding (the Split arm runs the backend compiled into the test binary) is worth keeping for every future red-once.
|
||||
5. Integrator additions: `RespecifyWireBuffer` clears B3's `lastUseSubmitIndex` beside `lastUseSerial` (pipe-only field; the create path already zeroes it at :303, so 0 = never submitted); the parity exception list on pipe is keyed by exact tail (two merges ago) so the fourth Reclaim case is named there (the package branch excepts by prefix). `ServerSpawn` keeps `SPIN_US` / `SERVER_AFFINITY` / `AUDIT` for the child (tuning / audit values, no endpoint, role, path or size; ServerMain's catch (b) still verifies its four).
|
||||
|
||||
Gate on f62703e9: unit 2436, split 304, spawn 220, tcp 223, magma 101 / 80 / 71, full-split 539, G1 `.text` 0xa52203 nm +0/-0, census 79, ratchet 173, wire-declines 53/53/0 + 16/16, OpenRA DirectVulkan inproc + spawn ssim 1.000000 / 0 unsound lines, verify lanes 1150 / 1084; parity 0 errors after 1ab62ece.
|
||||
@@ -0,0 +1,11 @@
|
||||
# M3 集成者源码审查(pipe `9fd768d4`,2026-09-23)
|
||||
|
||||
**Verdict: land.** 审查对象是集成树源码,不以包 note 代替。`p7/m3` 包提交 `7acad6b8` 已拣为 pipe `9fd768d4`;下述注释措辞的一处小修在本轮文档提交中落地。
|
||||
|
||||
1. `MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:7065` 与 `:7687` 只在 wire draw / compute 的外层入口触发,发生于本次 draw 的资源准备、descriptor 写入之前。触发条件来自 `MobileGL/MG_Backend/DirectVulkan/Renderer/UniformManager.cpp:678` 的当前帧槽实际 Acquire 次数;memo 命中不增加此数,因而不会因重复 draw 无谓地强制等待。
|
||||
2. `MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:13580`:尚有当前录制就先 flush;之后 `vkQueueWaitIdle` 覆盖 graphics queue 上所有已提交工作,包括 B4 尚未修复的单 fence 站点可能提前从 tracker 移除的记录;再推进 `through` 并复核无待提交录制。此处在 `m_wirePreparationDepth` 进入前执行,不会回卷本次 draw 尚未录制的 slice。只看 tracker 的聚合 fence 仍有被旧退休站点漏掉记录的风险,因此保守队列等待是本轮必要的完成证明。原注释的“exact submit index”易误读为单 fence 等待,已改为说明 queue idle。
|
||||
3. `MobileGL/MG_Backend/DirectVulkan/Renderer/UniformManager.cpp:683` 保留每个 layout 的 pool/set,只回卷 cursor;清 descriptor-reuse、fast-rebind、bind-dedup 与 sampler-resolve memo,旧 set 不会被新 draw 的 memo 当作未改写继续命中。image/buffer view 保留到原帧生命周期,避免提前销毁。`OnDescriptorSetLayoutDestroyed` 的逐 pool 释放规则仍在;活 layout 数量自身的增长不属于此游标界。
|
||||
4. `MobileGL/MG_IntegrationTest/Scenarios/MagmaWireReclaimScenario.cpp:525` 固定一个 SSBO store/layout,在同一帧切 2049 个对齐窗口,不触发 M2 的 orphan-store 上限;两臂最后像素正确,server `retiredSubmit=2 budget=2048 cached=2048`。仅删 draw 入口回卷调用并重建三目标,两臂都在“2049 distinct descriptor writes ... did not rewind”处红;恢复后绿。`MobileGL/MG_IntegrationTest/CMakeLists.txt:3479` 只把它注册到 split/spawn 私有 server 日志车道,`scripts/ci/spawn_lane_parity.py:91` 对 TCP 的例外是精确 tail。
|
||||
5. 集成树门:pull G1 `.text=0xa52203`、符号 +0/−0;census 79、棘轮 173、parity 0、审计 53/53/0;unit 2436、split 304、spawn 220、tcp 223、magma 102/81/71、full-split 540、verify 1152/1086,全部 0 红。OpenRA inproc / spawn 1.000000、0 Fatal / 0 unsound。主机 bsl-esc-menu inproc / spawn 都是既有 `ssim=0.998402`、306892 mismatch、0 Fatal / 0 unsound;server 实际发出一次 M3 回卷(frame 0、submit 32、budget 2048、缓存 3555),spawn `wbuf[wlivepk=1052 wdefsync=22]`,与 M2 后的数量级一致。
|
||||
|
||||
**记录项:** queue idle 在极长帧每 2048 次 descriptor Acquire 后可能加一次 stall,性能按 CONTRACT-P7 的非门规则记录;固定活 layout 的游标增长已界定,多 layout 的缓存总量可高于 2048(bsl 的 3555 是各 layout 历史缓存),不把 2048 误写成进程全局上限。设备 p7w6 的 bsl 验收针对 M2,M3 的下一版 APK 仍要做设备回归。
|
||||
@@ -0,0 +1,51 @@
|
||||
# P7 收官异模型审查(codex,2026-09-23,`6afa077f`)· 集成者分诊
|
||||
|
||||
codex 结论:yes-with-fixes。原文附后(`codex-review.md`)。
|
||||
|
||||
| # | 发现 | 分诊 | 去向 |
|
||||
|---|---|---|---|
|
||||
| 1 | 暂存纹理:对端在已声明的大层末尾写 4 字节,server 按终点 `resize` 零填到整层(16384² RGBA8 ≈ 1 GiB) | **记债,不修**:上限是设备限制下的整层,已认证对端用合法 `glTexStorage` 也能要到同量内存(ID-P7-3 威胁模型 = 未认证远端,已由令牌 + fork 前认证关闭);稀疏存储是重设计 | CONTRACT-P7 §12 |
|
||||
| 2 | 越界图像单元共用可写占位:单元 A 的写经 barrier 后可被单元 B 读到(GL 要求写丢、读 0) | **修**:有 `VK_EXT_robustness2` nullDescriptor 时绑空描述符(语义精确),否则每 (binding, unit) 私有占位 | cf-magma |
|
||||
| 3 | PH-5 按 `sizeof(Element)` 限 count,`Vector<String>` 紧凑编码的合法归档(多个短名 + 空尾向量)被拒 → split 下丢合法程序产物 | **修**(真回归):按该类型最小编码宽度限 count | cf-core |
|
||||
| 4 | 门 3 判读信 runner 自报的遍数 / 臂 / 分母,`--repeat 1` 也能 PASS | **修**:判读器硬编码 §7.2 常量(≥3 遍、四臂齐、规范 36 例集合) | cf-reducer |
|
||||
| 5 | CTS `Pass/(Pass+Fail)` 看不见 Pass→NotSupported 的流失 | **修**:BASE Pass → AFTER 非 Pass/Fail 计入非通过并列出,未裁定即 FAIL;字面公式仍打印 | cf-reducer |
|
||||
| 6 | 闩:控制线程在 apply 线程每记录检查之后闩住,apply 还会再弹一条;`appliedSeq` 对闩住的记录也前进 | **修前半**(每次 pop 前再查一次);后半记债 | cf-core / §12 |
|
||||
| 7 | 深度 resolve 探针判定函数级 static,同进程换物理设备复用旧判定 | **修**:按物理设备身份缓存 | cf-magma |
|
||||
| — | 跨臂 PNG 不同只报告:需收官时逐例裁定 | 判读器改为「未裁定即 PASS-NEEDS-ADJUDICATION」 | cf-reducer |
|
||||
| — | 门 1 数字取自 M3、最终树未见完整门 | 最终树 `431bda67`(+ 仅文档到 `6afa077f`)已跑 v2 全门(`~/w7/logs/int2b/gate.log`);修复轮合入后再跑一次 | 记录 |
|
||||
|
||||
---
|
||||
|
||||
## codex 原文(`6afa077f`)
|
||||
|
||||
## P7 closeout review
|
||||
|
||||
**Verdict: yes-with-fixes.** Gates 3 and 5 turning green would not, by themselves, justify closeout at `6afa077f`. The findings below include two peer-facing correctness or resource failures and two ways the window reducer can report green without proving the promised result.
|
||||
|
||||
I reviewed the `14e1c8b9..6afa077f` comparison and files fetched at `6afa077f` read-only. I did not build or run tests. The local shell did not return commands, so the source review used the repository connector.
|
||||
|
||||
### Findings
|
||||
|
||||
1. **Major — a tiny texture upload can allocate a gigabyte in the session child.** [StagedTextureStore.h:673](../../../../MobileGL/MG_Remote/Server/StagedTextureStore.h:673) grows `Bytes` through the *end offset*, while [the new bound](../../../../MobileGL/MG_Remote/Server/StagedTextureStore.h:196) limits dimensions and arithmetic, not staging memory. On a server allowing a 16384×16384 RGBA8 level, a peer can declare that level and send a four-byte slab at its last pixel; the computed end makes `resize` zero-fill about 1 GiB. Repeating this can exhaust memory or kill the child and put the supervisor under system memory pressure. PH-4 raw-peer tests exercise out-of-bound records; this slab is **within** the declared bound.
|
||||
|
||||
2. **Major — invalid image stores can become observable through a shared placeholder.** [WirePlaceholderImages.inc:77](../../../../MobileGL/MG_Backend/DirectVulkan/Renderer/WirePlaceholderImages.inc:77) keys writable storage placeholders by format and target, and [line 173](../../../../MobileGL/MG_Backend/DirectVulkan/Renderer/WirePlaceholderImages.inc:173) clears them before descriptor use. Two invalid image units of the same shape therefore bind the same Vulkan image. A shader that stores through invalid unit A and, after an image memory barrier, loads invalid unit B can see A’s value; GL requires the invalid store to be discarded and the load to return zero. The new scenario loads its invalid source **before** storing to its invalid destination, so it cannot catch this alias. CONTRACT-P7 §12 records sharing as a debt; its classification is too mild for this within-dispatch correctness failure.
|
||||
|
||||
3. **Major — PH-5 can reject an archive produced by its own encoder.** [ProgramArtifactsCodec.cpp:309](../../../../MobileGL/MG_State/GLState/ProgramState/ProgramArtifactsCodec.cpp:309) requires remaining serialized bytes to cover `count * sizeof(Element)` before decoding every vector. A `Vector<String>` element can serialize as an eight-byte length plus a short name while occupying roughly 32 bytes in the vector. A valid `LinkArtifacts` archive with, for example, ten short [XFB interface names](../../../../MobileGL/MG_State/GLState/ProgramState/ProgramArtifacts.h:593) and empty later vectors can fail decode solely because its compact wire form is smaller than its in-memory form. The round-trip test uses two longer names; the PH-5 negative controls test malicious counts, not this valid compact case. A split client then loses a valid program artifact that monolith can use.
|
||||
|
||||
4. **Major — gate 3 can report PASS without the specified repetitions or control arm.** [60-reduce.py:182](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:182) accepts the repeat count written by the runner; [line 251](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:251) checks against that count, not three. `30-gate3.sh --repeat 1` can thus yield PASS for 36 cases after one inproc and one spawn image each. [The `RUN_AHEAD=0` arm is optional to the reducer](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:279), and [the denominator check](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:298) tests only the number 36, not the canonical case set. The default runbook uses the intended inputs, but its green verdict does not prove they were used; reducer self-tests do not enforce these contract constants.
|
||||
|
||||
5. **Major — ID-P7-59’s CTS rate can hide loss of supported cases.** [60-reduce.py:410](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:410) implements the agreed `Pass/(Pass+Fail)` formula, but [line 525](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:525) only warns when `NotSupported` changes. If 123 of the 124 baseline-passing SSBO cases become `NotSupported` and one still passes, the block remains 100% by that formula, has no new crash, and can be marked PASS. This is a flaw in the **recorded gate criterion**, rather than a mismatch between code and contract. The reducer even lists Pass-to-other-status regressions but does not gate on them. The CTS tests cannot catch a loss that their verdict rule explicitly accepts.
|
||||
|
||||
6. **Minor — the latch’s “no further record” guarantee has a control/apply race.** [ServerLoop.cpp:673](../../../../MobileGL/MG_Remote/Server/ServerLoop.cpp:673) checks the latch before the batch and [line 711](../../../../MobileGL/MG_Remote/Server/ServerLoop.cpp:711) after applying each record. If the control thread latches a malformed SurfaceOp just after that latter check, the apply thread can pop and execute the next queued command before checking again. Separately, [SessionRings.h:465](../../../../MobileGL/MG_Remote/Transport/SessionRings.h:465) advances `appliedSeq` even when the record’s callback latched a refusal, so a waiter can briefly see that record as applied before the fault reaches it. The batch negative controls latch on the apply path; they do not arrange this cross-thread ordering. The child still exits, limiting the impact to that session.
|
||||
|
||||
7. **Minor — the depth-resolve verdict belongs to the first device in a process.** [VulkanRenderer.cpp:15840](../../../../MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:15840) stores a choice derived from `this` device in a function-static value. If inproc tears down a renderer and initializes another physical device or changed driver environment in the same process, it reuses the first verdict and skips the new device’s probe. The current device gate and host controls start with one device, so they do not exercise that lifetime.
|
||||
|
||||
### Gate evidence and decisions
|
||||
|
||||
The notes substantiate gates 2–7 on their stated host scopes, with **gate 4 achieved by reclassifying 86 still-linked symbols as `# P13`**, not by removing all 101 original Magma references. That deferral is explicit and defensible while the disaggregated monolith reference arm remains required. The closeout should preserve that wording.
|
||||
|
||||
Gate 1’s displayed Magma counts in [CURRENT_STAGE_STATUS.md:13](../../../../docs/Disaggregated/CURRENT_STAGE_STATUS.md:13) are from M3. F2 has a later full local gate, while the gate-5 review records targeted tests for subsequent changes. The notes do not establish a full gate run on the final `6afa077f` tree. Gates 3 and 5 are correctly shown as pending.
|
||||
|
||||
ID-P7-59’s **report-only cross-arm SHA** rule follows CONTRACT-P7 §7.2, but [the reducer can PASS a stable split-only pixel difference](../../../../docs/Disaggregated/notes/p7/device-window-2/tools/60-reduce.py:284) when its SSIM change stays within 0.0005. Any such mismatch needs explicit image-diff adjudication at closeout; a green summary alone is insufficient.
|
||||
|
||||
**Must fix before closing:** bound total staged texture allocation; make invalid image writes truly discard without aliasing loads; preserve valid compact artifact archives; make gate 3 enforce three repeats, the required arms, and the named 36 cases; gate or adjudicate Pass-to-NotSupported CTS regressions; and run the full host gate on the final code after those fixes. Then assess the device-window gates 3 and 5 on that same code.
|
||||
@@ -0,0 +1,11 @@
|
||||
# review-ratchet88(集成者审查,2026-09-23)
|
||||
|
||||
**Verdict: land.** p7/ratchet88 `6a488d90`(产品 + 基线)/ `989c53fb`(CONTRACT-P7 §4.1/§12)。
|
||||
|
||||
| 项 | 核对 | 结论 |
|
||||
|---|---|---|
|
||||
| 退役 `MGPipeTextureLegacyArmScope` | `VkTextureManager.cpp` SyncTexture 只在 monolith 臂被调用(唯一调用者 `SyncTextureAndGetDescriptor`);split 臂同步走 `SyncTextureResourceByHandle`;探针 + 检查者 78 行 split 子集 retrace 0 命中 | 正确;回归现由 `Fatal{RoleViolation,"texture-legacy-arm"}` 按访问器名拦截 |
|
||||
| G1 | 替换注释与原块同行数(`__LINE__` 进 pull `.text`);`.text` sha256 与基线相同、符号 30570/30570 | 不动 |
|
||||
| 余 86 标 `# P13` | disaggregated 构建里 monolith 是默认运行时且是门 3 / 门 5 的参照臂(`ConfigLoader.cpp:322-330`、`test.yml:1531`、`CMakeLists.txt:805-811`);改用 wire placeholder 会改变参照臂可观测行为 | 接受;**新裁定 ID-P7-55 取代 ID-P7-31 的「不标 # P13、归 wave 3」**,§4.2 加注 |
|
||||
| 措辞 | 4 个 MGB_CTX 符号里 `PipeInputs::HasOpenTransformFeedbackSpan` / `InvalidateCompileEnv` 不在 monolith draw 路径,计入原因是 `PipeFill.cpp` 按路径规则归 FRONTEND(同 5 个 SlotAllocator 符号) | 集成文档更正 |
|
||||
| 缺口 | 退役后无常驻负控证明 apply 线程 `SyncTexture` 会按名 abort(只有临时探针 + 棘轮 red-once) | 记 §12 债 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# Review: V1 fix round 2 (pipe 403b5669 ffc4fb7d 07f4e3ac 9814bc74 336174e3) — integrator (Fable 5.1, main session)
|
||||
|
||||
**Verdict: land** (no change required before push).
|
||||
|
||||
Fix 1 — the read-side control counts to two. The server reads the pack field twice inside the ReadPixels window (the applier's saved-pack read before it installs the neutral pack, the backend's read after), and the hook perturbs its oracle once per read because the ID-49 overwrite inside the window wipes the first perturbation. A control satisfied by one report was satisfied by either block alone and falsified neither. Verified: `CountReadReports` is line-based (ReportDivergence is one MGLOG_F per report, so no report spans lines and none share one); the scenario's `EXPECT_GE(reads, 2)` and the CI step's `-lt 2` red are the same threshold; the CI count is `grep -c … || true` with `${reads:-0}`, so a missing file reads 0 and reds instead of erroring. The falsifier asymmetry is measured and stated (block 2 reverted: both backends drop to 1; block 1 reverted: DirectVulkan drops to 1, DirectGLES stays at 2 because its backend reads twice after the install), which is what justifies the CI step needing both backends.
|
||||
|
||||
Fix 2 — the FATAL=0 summary is written before `Debug::Close`. Cause was pre-existing: the namespace-scope `VerifyState` destructor ran from `__run_exit_handlers` after `DestroyImpl` had closed the sink, and Log.cpp's next write reopened the role's file with "w", so every FATAL=0 client half was the summary alone (121 B / 1 line). Verified: `FlushSummary` is idempotent through `Summarised` (the destructor after Close has nothing new and writes nothing; a process that never called Destroy keeps the old arm, where no Close ran); the two writers are sequential (DestroyImpl, then exit handlers), so the non-atomic `Summarised` is fine; the call sits before the `logLifecycle` check and before Close; the include, the declaration and the call are all under `MOBILEGL_PIPE_VERIFY`, so the pull build gains no byte (G1 checked on the gate). Client halves now carry the arming line, the entry report and the summary as the last line (121 B → 7461 / 7386 B).
|
||||
|
||||
Nits 3 and 4 are citation fixes. The CONTRACT-P7 §6 hunk conflicted with the integration tree's own version of that sentence; resolved by keeping the tree's sentence and applying the package's edit (the CMake line-number citation goes, the guard `if (MOBILEGL_PIPE_VERIFY)` stands alone). The note's lane-count tables were left for the integrator to re-measure: the gate on 336174e3 is the measurement (below).
|
||||
|
||||
Gate on 336174e3: unit 2436、split 304、spawn 220、tcp 223、magma 101 / 80 / 71、full 539、G1 恒等、普查 79、棘轮 173、parity 0、审计 53/53/0、OpenRA inproc + spawn ssim 1.0 / 0 unsound、verify 1150 / 1084.
|
||||
Reference in New Issue
Block a user