diff --git a/docs/Disaggregated/CURRENT_STAGE_STATUS.md b/docs/Disaggregated/CURRENT_STAGE_STATUS.md index 5b48e6f9..90fee9b9 100644 --- a/docs/Disaggregated/CURRENT_STAGE_STATUS.md +++ b/docs/Disaggregated/CURRENT_STAGE_STATUS.md @@ -4,7 +4,7 @@ **阶段:P7 DirectVulkan(Magma)全量迁移**,并行流 **P3b/P4b 深化(Espryt,wave 2-D)** 与 **Ph 小件(簇 F)**。计划 [`notes/p7/PLAN-PH-P34B-P7.md`](notes/p7/PLAN-PH-P34B-P7.md)(五波)。 -**更新:2026-09-23(ID-P7-49–59)** · 当前交接 [notes/p7/HANDOFF-2026-09-23.md](notes/p7/HANDOFF-2026-09-23.md)。CI 自 P6.5 起的七个红因已修,`1997fd88` 上 Test 全绿(含 P6.5 以来首次跑的 retrace 链);棘轮 171、门 4 关闭(ID-P7-55/56)。F2(Ph 余项 + fuzz 三臂)与门 5 预演抓出的三个 inproc CTS 缺陷已落地(ID-P7-57/58);门 3 与 CTS AFTER 在设备窗口 2(ID-P7-59)。 +**更新:2026-09-23(ID-P7-49–62)** · 当前交接 [notes/p7/HANDOFF-2026-09-23.md](notes/p7/HANDOFF-2026-09-23.md)。窗口 2(`6afa077f`):**门 5 PASS**(五块全 ≥ BASE、0 新 crash),门 3 严格读数 33/36——三例 Iris 光影包在 monolith 上同样不逐位稳定(ID-P7-62 分布判据下 36/36)。codex 收官审查的修复、spawn 冷启动心跳(协议修订 2)、1:1 blit 最近邻已落地(ID-P7-60/61/62);终局窗口 3 在最终 APK 上复跑门 3 / 门 5。 ## 1. 出口门总览(CONTRACT-P7 §8 的 9 项分母) @@ -17,8 +17,8 @@ | 5 | OQ-8 反射归档 `storageBlocks` | ✅ | C | | 6 | OQ-10 `kCapResidentSubData` 按 server 表发布 | ✅ | C | | 7 | verify × split(门 2) | ✅ | B4 集成树 verify build:unit 2439、integration-verify 1152、integration-verify-split 1086,全绿;V1/V1 r2 负控与 8 verify trace 证据仍有效 | -| 8 | 真机 ssim 1.0(门 3,分母 36) | 🔄 | p7w5 OpenRA 27/27 golden;p7w6 bsl-esc-menu DirectVulkan inproc/spawn 6/6 且图像 SHA 与 monolith 相同;DirectGLES × TCP 38 例窗口矩阵 16/29 pass、8 idle timeout、2 visual failure、3 missing result。Photon / D24 两项错图已由同 APK DirectGLES monolith 复现;36 例 DirectVulkan 三遍、同会话 monolith 对照和 M3 后 APK 回归待跑 | -| 9 | CTS 五块 AFTER ≤ 0.5 pp(门 5) | ⏳ | `$BASE` 已取(`notes/p7/device-window-1/CTS-base/`);AFTER 在 wave 4 | +| 8 | 真机 ssim 1.0(门 3,分母 36) | 🔄 | 窗口 2(`6afa077f`,reboot-clean、pinned):OpenRA 四臂 1.000000;严格读数 33/36,三例 Iris(sundial-lite / bliss / derivative d24.4.14)monolith 同样不逐位稳定(9/9、11/18、9/9 张不同图,derivative 是光影包自身同一 dispatch 内的 imageLoad/imageStore 竞态)→ ID-P7-62 分布判据;create-instancing 1:1 LINEAR blit 偏差已修;终局窗口 3 复跑 | +| 9 | CTS 五块 AFTER ≤ 0.5 pp(门 5) | ✅ | 窗口 2 inproc × DirectVulkan:shader-image +4.35 pp、texture +0.96 pp、ssbo / dsa / packed-pixels 持平,0 新 crash;UBO(GTF)不在本 glcts,记 unrun;终局窗口 3 复核 | **40% 检查点(§8 中点)已过:6/9**,不触发重定基线。G1 全程恒等(pull `.text` `0xa52203`、符号 0/0);census 79 站点 / 0 未标;棘轮 186 → 173 → **171**(ratchet88:`p7-magma` 余 86 全标 `# P13`,门 4 关闭,ID-P7-55)。 @@ -55,6 +55,9 @@ | F2 | Ph 余项:PH-1 (3)(4) 每会话闩、PH-6 事件通道弃投闩、PH-7 (5) fork 前认证 + 预认证有界 + 退避、fuzz 三臂进 CI;PH-4 两个回归(零尺寸层、`R8 == 0`)与 ID-49 回读在线内修掉 | F2 线 29 提交 + 集成 2 跟进(ID-P7-57) | | 门 5 修复 | 超槽 ReadPixels 切带、深度/模板 resolve 臂由设备探针选(+ POST FIXED 行)、单采样深/模板 blit 改 copy、越界图像单元绑占位 | ID-P7-58 | | 窗口 2 工装 | 门 3 / bsl / CTS AFTER 一条命令、可续跑、共享设备锁;判读按合同公式、五块必齐、同一 boot_id | ID-P7-59 | +| codex 收官修复 | 越界 / 空图像单元 nullDescriptor 或按单元私有占位、PH-5 最小编码宽度、闩 pop 前再查、探针按设备缓存、判读器硬编码 §7.2 常量 | ID-P7-60 | +| spawn 冷启动心跳 | server 执行 surface 操作期间发 `SurfaceProgress`,client 预算量沉默(封顶 120 s);控制协议修订 2 | ID-P7-61 | +| 门 3 判读 + blit | monolith 不稳定的 case 用最近邻分布判据、monolith ×5;1:1 LINEAR blit 走最近邻 | ID-P7-62 | ## 3. 真机(Redmi 2f7cbe2e,Adreno 830) @@ -66,13 +69,12 @@ | 工作 | 状态 | |---|---| -| 设备窗口 2(p7w7) | 最终功能 APK 构建 → reboot-clean → 门 3(36 例 × monolith ×1 + inproc ×3 + spawn ×3 + `RUN_AHEAD=0` ×1)→ bsl 映射 / `wbuf[]` → CTS AFTER 五块 → 判读 | +| 终局设备窗口 3(p7w8) | 最终 APK → reboot-clean → 门 3(monolith ×5 + inproc ×3 + spawn ×3 + `RUN_AHEAD=0` ×1)→ bsl → CTS AFTER → 判读;验证 create-instancing 回到 monolith 图、Adreno robustness2 nullDescriptor | ## 5. 下一步 -1. 窗口 2 判读:门 3(臂内三遍逐位、与同会话 monolith 差 ≤ 0.0005、OpenRA 1.0)与门 5(每块 ≤ 0.5 pp、新 crash = 0)。 -2. P7 收官异模型整体审查(codex,ID-66)。 -3. P7 收官文档(ROADMAP / 本页 / 交接)。 +1. 窗口 3 判读 → 门 3 / 门 5 收官,P7 出口门 9/9。 +2. P7 收官文档(ROADMAP P7 行、本页、交接)。 ## 6. 阻塞 / 需要人 diff --git a/docs/Disaggregated/ROADMAP.md b/docs/Disaggregated/ROADMAP.md index a547e07c..8450d54b 100644 --- a/docs/Disaggregated/ROADMAP.md +++ b/docs/Disaggregated/ROADMAP.md @@ -38,7 +38,7 @@ | **P6.5** 传输栈两轴化 + 跨机 | **第一波已落地**(`feat/disaggregated@fe28bdb5`,2026-09-22):全 TCP 控制 + StreamLink 数据,WSL client ↔ Redmi server。四切片代码审查无硬缺陷 + 两修复(`AcceptPair` 重试 `EINTR`/`ECONNABORTED`、supervisor 自设 `MOBILEGL_IPC_ROLE=server`,均 `MG_Remote` 门内 G1 不动,见 [`code-review-findings.md`](notes/p65/code-review-findings.md));固定制品(两端 stamp `p65-acceptfix-20260922`)再验收:unit 2399、integration-tcp loopback 102、**device-102 102 全 ARMED**、代表性 retrace OpenRA 1.0 全 ARMED。**残余(CI/后续)**:完整 39 例 device golden 矩阵 + 必测数。设计见本表下方「立即的下一项」节 | 包:**wf** wire 定宽与布局摘要——`wireFingerprint` = `PipeFields.def` 派生的逐成员 name / `offsetof` / `sizeof` 摘要 + 有序目录摘要 + 记录头布局 + 两个 blob codec 版本 + `kOpCount` + 字节序 / 指针宽度,**保留** `sizeof(MGPCaps)` / `sizeof(DynamicBackendParameters)`(wire 事实)、删 `sizeof(GLFunctionsTable)`;`buildFingerprint` 只在 `Dial == Fork` 下比较;`DynamicBackendParameters` / `MGPCaps` / `RenderStateParameters` 整块 blob 的定宽化(两端是不同编译器产的不同二进制,`long` / padding / 位域差异都是静默读错状态);`Refuse{code, detail, 对端值}` 控制消息,握手路径零 abort → **ct** 控制面端点种类(`fork` 继承 fd / `unix:` / `tcp://host:port`;`DialMode{No, Fork, Connect}` 与 `MGPipeShouldDial()` 按契约 §3 补齐;TCP keepalive 失败**作为传输层报告的挂断**进 dl 的闩,不是 apply 超时)→ **nd** 数据面协商(`LinkTerms{dataPlane, delivery, wireForm, maxReplyBytes, cmdWindowBytes, stageWindowBytes}` 入 Hello / Welcome,四个尺寸由 **server** 陈述;`dataPlane ∈ {SharedSegments, Stream}`;`auto` 的判据是**段实际交付成功**而不是地址判断,回落必须具名入日志与 stats;链路工厂在会话建立时选定一对,之后不变——缝是 setup-time 的,契约 §8.2)→ **sd** 共享段交付与控制面解耦(`ShmLink` 自带 AF_UNIX aux 汇合名、在 `Welcome` 里公布,`SCM_RIGHTS` 只走它;于是**控制面 TCP + 数据面共享段**在同机是合法配对;`ITransport` 收窄为纯控制帧,描述符传递归数据面)→ **sl** `StreamLink`(分块封帧;watermark 变消息且**规则逐字保留**——late-never-early、`>=` 不是 `==`、倒退是 Fatal;`appliedSeq` 修正案 + flush-on-idle;reply 变自带 seq 的消息,本链路上删 slot 池 / 取模 / stamp 自检;`SEG_STAGE` 变发送窗口,三个 cursor 要么完整复活要么不用、不留中间态;program archive 与 `draw_vbo` range 尾分片;`GetCaps` 两个 blobref 变消息;每方向每进程一条专用读线程)→ **t65** 车道。上层纯度:`SessionProducer` / `SessionConsumer` / `ServerLoop` / `PipeWireEncoder`、`ClientSession.cpp` 的 `kSegEvent` 挂载与 `ResourceTracker.h` 的 writeback 解析都只经 `ILink`。设计 `ARCHITECTURE.md` §11.9 | 门:inproc / spawn 车道结果数与逐线程 CPU 逐字不变(`ILink::ReserveRecord` 虚调用代价**实测**,`RingProducer::Reserve` 失去内联是具体风险);纯度 grep——`ShmLink` / `StreamLink` / `RingControl` / `ReplySlotPool` / `EventRingConsumer` / `m_shm.` 只出现在 `Transport/` 与其测试,上层零链路种类分支;**2×2 矩阵车道**(控制面 {unix, tcp} × 数据面 {shm, stream},loopback)名集合与 spawn 一致且同数绿,每条目记 `control=… data=…` 的 arm 证明(ID-124 的形状);跨机臂一条真 trace 逐像素;wf 三条 red-once(临时树里同宽成员互换 → 摘要变而 stamp 不变;`wireMajor = 99` → 两端具名拒绝、server exit 0、client 不回落 monolith;仅 stamp 不同的对端在 `Dial != Fork` 下连接成功——正控制);**必测数**:逐帧 `kWaitReply` 次数(`ResourceCreate` / `SetTextureParams` / 纹理半边 `ResourceSubData` 都在此列,TCP 上每次即一个 RTT)、`SEG_STAGE` 字节/帧对链路带宽、`PRESENT_CREDIT` 1..3 配对、混搭(tcp + shm)对(unix + shm)的逐线程 CPU 差 | | **Ph** 不可信对端加固 + 配对 | **已审计(2026-09-22,`notes/p7/PLAN-PH-P34B-P7.md` §1.1)**:P6.5 已在 LAN 上跑 `tcp://0.0.0.0`,「P12 之前」的顺序陈述落后于树。必需小件(supervisor 命名子进程死亡、两处漏斗旁路、D11 五处上限、常量时间令牌 + 数据面绑定、`SEG_EVENT` 弃投闩)随 P7 波次推进;fuzz 臂 2 在 P7 之后;OQ-21 已裁定令牌足够(ID-P7-3)。**进展(2026-09-22 深夜)**:supervisor 命名子进程死亡 + 两处头层漏斗旁路已随 wave 0 落地(`origin@801f8eda`,`abort_sites` 79 成下行棘轮);其余小件是簇 **F** 包:**片 1–3 已到集成树(2026-09-22 夜,ID-P7-37)**——令牌合一 / ≥16 字节具名拒绝 / 无令牌只 loopback / smoke 进 CI;`Welcome.dataNonce` 绑定,TCP 上 250 ms 配对窗口消失,`wireFingerprint` 变更;PH-8 钳制证明——片 4–6 与 PH-7 (5) 需要对端字节的 fuzz 驱动,另派 F2(原顺序:常量时间令牌 / `Refuse{Authentication}` / ≥16 字节 + `tcp_supervisor_smoke.py` 接 CI → `Welcome.dataNonce` 数据面绑定 → PH-8 单测 → D11 五处 + PH-2 → PH-6 drop-with-latch → PH-1 (3)(4));逐日状态见 [`CURRENT_STAGE_STATUS.md`](CURRENT_STAGE_STATUS.md)**F2 完成(2026-09-23,ID-P7-57)**:PH-1 (3)(4) 每会话闩、PH-6、PH-7 (5) fork 前认证 + 退避、fuzz 三臂进 CI——Ph 必需小件全部落地。**codex closeout(p7/int3)**:PH-5 界改为元素最小编码字节数(finding 3);`DrainRing` 在每次 pop 前查闩(finding 6:控制线程闩的窗口缩窄到查闩到 pop,未关闭)。 | `Session::Fail` 的策略翻成每会话闩(**按 ID-P7-1 重定界**:98 处 `SessionFail` + 6 处 `WireLogFatal` 的字面翻转拒做——≥9 处返回引用没有诚实返回值;只对对端字节可达站点 latch-and-decline;P6 dl 收口到的是**两个漏斗 + 两处头层旁路**(`Server/StagedShadow.h`、`Server/StagedTextureStore.h`),不是一处;P6.5 fork-per-session 已给出「下一连接照常服务」);handle slot 预算(`BackendSlotTable` 的两条拒绝从 `MOBILEGL_ASSERT` 变 release 下的具名拒绝,杜绝静默 null twin);readback 尺寸门挪 server 侧且在 resize **之前**设绝对上限;`StagedTextureStore` 按该 level 宣告范围设界;`ArchiveVector` 按 `count × 元素最小编码字节数` 设上限(codex closeout finding 3 改自 `count * sizeof(element)`,后者拒掉编码器自己写的紧凑归档;map / set 仍按每项 1 字节);`SEG_EVENT` 溢出不再能让一个不排空(或仅涓流排空)的对端在 30 秒内、乃至瞬间用 `Fatal{EventRingOverflow}` 打掉承载它的 server 进程(drop-with-latch,不等 PH-1,ID-P7-2;原文「60 秒」是两轮 30 s 的算术上界);**配对 / 认证**(`Hello` 带令牌与无令牌只 loopback **已由 P6.5 ct 落地**;欠常量时间比较、`Refuse{Authentication}` 入词表、≥16 字节、**数据面按 `Welcome.dataNonce` 绑定到已认证的控制连接**(今天 `AcceptPair` 按到达顺序配对、从不查 peer)、fork 前认证;OQ-21 裁定令牌足够、不做 TLS);段 / 窗口尺寸由 server 钳制(P6.5 nd 已陈述,欠一条钳制单测) | 非 loopback 监听在无令牌时具名拒绝(机制已在;名字入词表 + `tcp_supervisor_smoke.py` 接 CI 后算达成);畸形帧 / 超界计数 / 不排空对端的模糊臂下 server **不 abort、会话闩住、下一连接照常服务**(臂 1 机制已在、欠端到端脚本;臂 2 = PH-1 (3)(4) + D11;臂 3 = PH-6);`Session::Fail` 站点普查门扩到 server 镜像且 `abort_sites` 变棘轮(今天只扫 `MG_Remote`、站点数记了不比,wave 0);契约 §12.2 五处无界分配各一条 red-once(**五处全开**,不是两处) | | **P3b / P4b** 深化(Espryt) | **已审计(2026-09-22,`notes/p7/PLAN-PH-P34B-P7.md` §1.2)**;Espryt 项与 P7 文件零重叠,作为 P7 的并行流(wave 2-D)推进。**D1 / D2 / D3 已落地(`origin@22761a69`,2026-09-22)**:D1 = XFB 两洞(孤儿目标保留 varyings、回写事件切片)+ 回调 10→9 + 四个 resolver 具名启动期 stop + readback 家族三臂(+39/臂,readback 半边其实早已关,ID-P7-24);D2 + 返工 = `TextureViewAliasScenario`、`TextureUploadShape` 成门(散点内缩后零补丁 red-once)、`espryt_memo_purity.py`、`SubsystemDeps.def`(R-5)、12 场景 split 普查(+76/臂)(ID-P7-26/29);D3 = view 在 owner 上传后陈旧的产品缺陷修复(clean gate 读 storage record,三臂 3 红→14/14)+ D-K2 六处读者读同一张表(ID-P7-28/30)。**余**:R-3 另一半(`MGPSamplerView::Target` 谓词)、`KHR-GL46.texture_view.coherency` 的 split 读数、CTS AFTER(wave 4);~~Iris trace 普查结果(wave 3)~~ 已有头上结果(`3c80cd62`,[`notes/p7/iris-census-1135c664.md`](notes/p7/iris-census-1135c664.md));逐日状态见 [`CURRENT_STAGE_STATUS.md`](CURRENT_STAGE_STATUS.md) | view/属主发射游标**别名场景**(代码半已由 P4a `TextureEmit.h` 属主键控游标 + `TextureObjectView::ToOwner*` + P5e tx2 落地,欠验证);`g_fboTextureSyncList`(分离安全——记录臂先返回、退路是具名 Fatal;四个 resolver 改启动期具名 stop,文本删除受 P5e 裁定 1 约束归 P13);memo 重键**已落地**(P4a/P5f),补纯度 grep 门;~~XFB scatter 搬到 client~~(P5c/P5f 以 server staged shadow + `OnBufferWriteback` 落地;剩两处真洞:孤儿捕获目标被静默丢弃、回写事件无界——>128 KiB 即 `Fatal{EventRingOverflow}`);删 fragColor 重推导 workaround 与 `g_broadcastMemo*`(动 pull `.text`,归 P13,只改注释);raw-depth-fetch sampler 的 monolith 清理(可选);**回读收口**(pack 半已关:`set_pixel_pack_state` APPLIER_DERIVED + server 中性读 + client 侧 PACK-PBO 散射;readback 半开:`get-tex-image-shadow` / `copy-image-shadow-mirror` 非 monolith 下仍 abort、split 零覆盖);P4a 的 R-5(D-K2 规则合一处)/ R-11 必须,R-3 / R-4 / R-7 / R-10 可选;~~`ProgramArtifacts.h` 的 NDK 尺寸钉~~(P6.5 portable archive v2 + 布局指纹取代);链接实验分给它的 **14 个符号**(D12,棘轮落地后 Tier 1) | 纹理 / program 场景(split 三臂零覆盖,先普查首阻塞再注册);CTS `texture_*` / `shader_image_*` / `packed_pixels` + P4a 欠的 `direct_state_access.framebuffers*` 在 0.5 pp 内(caselist 入库 + monolith 基线 + delta 工具,今天三者皆无);每一个 Iris trace(CI 管道 P6 已建;**`3c80cd62` 主机结果**:39 例 × 双后端 × {monolith, inproc, spawn} 231 次全活,split 与 monolith 逐字节相同 70 / 77 行,7 行分歧均过阈值、无 Fatal;`texture-remint-pull` 未到达,**P9 例外表为空**——[`notes/p7/iris-census-1135c664.md`](notes/p7/iris-census-1135c664.md) §3–§4);`TextureUploadShapeScenario` 升级成门(Mali 增量无设备,按 Adreno 记录) | -| **P7** DirectVulkan(Magma)全量迁移 | **进行中;wave 0–2 已落地,40% 检查点 6/9 已过(2026-09-22,`origin@b089e0de` + 集成树上的 B3)**:审计 + 五波计划见 `notes/p7/PLAN-PH-P34B-P7.md` §1.3 / §3,规范 `MG_Remote/CONTRACT-P7.md`,裁定 `notes/p7/INTEGRATOR-DECISIONS-P7.md`(ID-P7-1..33)。**wave 0** 仪器(Magma 两进程车道三臂、`link_ratchet.py` 186 基线、普查门 79 站点下行棘轮 + `MGPipeSessionFailHook`、设备跑器 `--matrix/--repeat/--archive-dir`、CTS caselists)`origin@801f8eda`;**wave 1** 设备窗口 #1(门 3 分母 36、E0–E7 归因、CTS `$BASE` 五块);**wave 2** X1(arm64 persistent-map tracker 从不认领 fault)、F1(split 起会提前)、C(`StateObjectDeathOps`、OQ-8、OQ-10、vertex-layout 拆分)、A(对齐 / native-range)、B(mip 半退役、深度 mip 烘焙 (A)(D)、copy-image、default-color-blit、回读 fence)、B2(multisample shape/aspect、AllocatorDebtScope ×2 删、(B′)、棘轮 **186→173**)、B3(**OpenRA 真机分歧的真因**:wire 臂 completed-frame-serial floor 在中帧 pooled-fence 提交退休时无证据上升 → 帧首次 `glBufferSubData` 走无序 host memcpy;计数 26→0,spawn 臂 red-once;ID-P7-33)——**树上 `@P7` 拒绝站点归零、§3.2 六退役全成、Magma 三臂 95/74/76**。**真机**:p7w4 门 3 AFTER 34/36 与 monolith 差 ≤ 0.0005;OpenRA p7w5 **27/27 golden**(ID-P7-34,项关闭);bsl-esc-menu = server 死 VkBuffer 无界累积(一帧 1.3 M 调用,ID-P7-32,**M2** 在修)。**已到集成树(2026-09-22 夜,ID-P7-37)**:B2 返工 r1 + r2、B3 返工 + 修复轮、V1、F 片 1–3 已推送 `origin@87584d0b`(2026-09-22 夜,ID-P7-39;pipe 门全绿:magma 97 / 76 / 71、full 535、verify 构建 1140 / 1074、OpenRA split 回放 0 条 unsound;四份 fable 审查 land with fixes,修复轮已落地,ID-P7-44);**M2 + M2 r2 已推送**(主机 bsl spawn server 825 → 546 MiB;memo destroy-epoch 关闭 wire store 句柄复用的 ABA;第二个泄漏 = descriptor set → M3;ID-P7-46);V1 修复 r2 已推送(read 侧负控数到 2、FATAL=0 摘要在 Close 前写出,ID-P7-47);**在跑**:F2 待派;窗口 1b 矩阵在跑(配对窗口在直连 LAN 上同样触发,ID-P7-41)。提交尾注已按用户令改写(origin `3c80cd62`)。**2026-09-23 更新(ID-P7-49–54)**:M3 已在 7ea7ce89 推送;B4 已集成于 pipe b19297d5,源码审查 land、完整集成门全绿(ID-P7-51)。p7w6 DirectGLES × TCP 38 例对照与 Photon / D24 同 APK monolith 对照已结案(ID-P7-52/53);两项错图亦在 monolith 复现。F2 PH-4/5/PH-2 已在包分支 commits `2c6a6e25` / `51480f8c` 落地并通过 Luna 审查(ID-P7-54);该矩阵不替代门 3。**CI 与门 4(ID-P7-55/56)**:CI 自 P6.5 起的七个红因已修;棘轮 171,`p7-magma` 余 86 标 `# P13`,门 4 关闭。**F2 与门 5 修复(ID-P7-57/58)**:Ph 余项与 fuzz 三臂落地;门 5 预演的三个 inproc CTS 缺陷修掉;窗口 2 工装与判读裁定(ID-P7-59)。**余**:F2 PH-6 / PH-1 (3)(4) / PH-7 (5)、fuzz 臂 2 与完整包门;wave 3 棘轮 88;wave 4 CTS AFTER 和门 3;wave 5 fuzz 三臂与整体审查。逐日状态见 [`CURRENT_STAGE_STATUS.md`](CURRENT_STAGE_STATUS.md) | `38919d45` 已补实际游戏的 server buffer consumers 和 Android 旋转 blit([报告](notes/p5f/magma-inproc-fix.md));`194382c9` 又完成 Magma run-ahead、GPU 延迟退休与 VAO 身份碰撞修复([报告](notes/p5f/magma-runahead.md));`ed507b1a..d56c0e83` 29 个 DirectVulkan 提交的 shape 波(随 `e1bf3677` 合入,本行此前未记)已退役 packed-float mip 原生 blit(`5310ff62`)、resolve(`ec4ca06d`)、占位图像(`WirePlaceholderImages.inc`)、copy-image 端点、XFB 捕获 span、纹理回读;`70fb6689` 链关闭 inproc RD32 性能回归(86.85→116.73 fps)。其余工作(2026-09-22 审计改判):~~`SetupDrawSnapshot` 探测字段塌成 dirty mask~~ 与 ~~`VertexInputStateFactory` 内容寻址 CSO~~ **本阶段拒做**(`SetupDraw` 在非 monolith 传输下分支到 `SetupWireDraw`,monolith 快照机制在 split 下不跑;无性能门;ID-P7-5);占位纹理原生化**已落地**(缺 split 车道条目);具名 UBO host payload(D-B8)走了直绑常驻 `VkBuffer` range 的备选,欠一次测量 + 裁定关 OQ-6;内部 shader 烘焙**半已落地**(颜色 blit `WireColorBlitSpirv.h`,仅 split 臂),欠深度 mip 烘焙 + `MOBILEGL_BAKED_INTERNAL_SHADERS` 新鲜度门(0 处);D18 按 ID-P7-6 读法一句闭。**新增必须项**:Magma `StateObjectDeathOps`(六处特判)、OQ-8 归档 `storageBlocks`(`MagmaProgramSource::EnsureStorageBlocks` 每 draw 重跑 SPIRV-Reflect)、OQ-10 `kCapResidentSubData` 从未发布(split 下双后端退回就地 memcpy)、两处 `MagmaP7AllocatorDebtScope`。**P6 真机发现(2026-09-22 归此)**:`DirectVulkan` 分离路径在 Redmi 上两次观测 0.988998 / 0.976494(inproc 与 spawn 同表现,pbuffer monolith 1.0;case 归属、重复次数未记录,原始证据不在树内;取自 run-ahead ARMED 下,**lockstep 对照从未在 golden 口径下跑过**——wave 1 的 E1)——Magma × 真实 GPU;树上 `@P7` 具名拒绝**实为 15 处 / 4 文件**(`multisample-blit-shape` / `-aspect`、`depth-stencil-mipmap`(已窄化到 D\|S 合并)、`vertex-layout`、`vertex-format-conversion`、`texel-buffer-native-format`、`unaligned-{texel,storage,atomic}-buffer-range`、`storage-buffer-native-range`、`uniform-block-native-range`、`uniform-buffer-byte-tail` / `-dynamic-offset`、`copy-image-in-place`、`default-color-blit-shape`;外加 Magma 无 `StateObjectDeathOps` 与 `buffer-legacy-arm`),**全部是绕过 `Session::Fail` 与普查门的裸 abort**;必须退役 `.6/.8/.9/.11/.12/.13`,其余改 decline 即可;链接实验分给 P7 的 **101 个符号**(D12)。`DynamicBackendParameters` 定宽重写**不再是 P7 的**——它是跨平台 wire 的前提,归 P6.5 wf | 集成 + trace 在 Magma 的 push 与 split 下全绿(inproc 半已是硬门;**spawn / TCP 臂今天 DirectVulkan 条目为 0**——四条 split 臂硬编码 `MOBILEGL_BACKEND_TYPE=DirectGLES`,wave 0 补后端维度);verify 零分歧(verify 今天只注册 monolith,verify+split 撞旧 `PipeRespecifyScope` 断言,先清);真机 DirectVulkan split ssim 回到 1.0(分母排除 rd12 in-world 与 create-indirect,ID-P7-4;必须带 `RUN_AHEAD=0` 对照臂);184 符号棘轮(契约 §12.1)下降 P7 的 101 个——原 "`nm -D libMobileGLServer.so \| grep glslang` 为空" 不可达,D12 裁定 server 镜像就是整个 `libMobileGL.so`;仪器 `scripts/link_ratchet.py`(存符号列表、只对新增红)归 wave 0;CTS 五块(`texture_*` / `shader_image_*` / `packed_pixels` / `direct_state_access.*` / `uniform_buffer_object*`)先立 monolith×DirectVulkan 基线再比 inproc,≤0.5 pp 且新 crash = 0 单独硬红。**再基线检查点:中点完成子系统 < 40% 立即重定基线**(分母 = `notes/p7/PLAN-PH-P34B-P7.md` §4 的 9 项) | +| **P7** DirectVulkan(Magma)全量迁移 | **进行中;wave 0–2 已落地,40% 检查点 6/9 已过(2026-09-22,`origin@b089e0de` + 集成树上的 B3)**:审计 + 五波计划见 `notes/p7/PLAN-PH-P34B-P7.md` §1.3 / §3,规范 `MG_Remote/CONTRACT-P7.md`,裁定 `notes/p7/INTEGRATOR-DECISIONS-P7.md`(ID-P7-1..33)。**wave 0** 仪器(Magma 两进程车道三臂、`link_ratchet.py` 186 基线、普查门 79 站点下行棘轮 + `MGPipeSessionFailHook`、设备跑器 `--matrix/--repeat/--archive-dir`、CTS caselists)`origin@801f8eda`;**wave 1** 设备窗口 #1(门 3 分母 36、E0–E7 归因、CTS `$BASE` 五块);**wave 2** X1(arm64 persistent-map tracker 从不认领 fault)、F1(split 起会提前)、C(`StateObjectDeathOps`、OQ-8、OQ-10、vertex-layout 拆分)、A(对齐 / native-range)、B(mip 半退役、深度 mip 烘焙 (A)(D)、copy-image、default-color-blit、回读 fence)、B2(multisample shape/aspect、AllocatorDebtScope ×2 删、(B′)、棘轮 **186→173**)、B3(**OpenRA 真机分歧的真因**:wire 臂 completed-frame-serial floor 在中帧 pooled-fence 提交退休时无证据上升 → 帧首次 `glBufferSubData` 走无序 host memcpy;计数 26→0,spawn 臂 red-once;ID-P7-33)——**树上 `@P7` 拒绝站点归零、§3.2 六退役全成、Magma 三臂 95/74/76**。**真机**:p7w4 门 3 AFTER 34/36 与 monolith 差 ≤ 0.0005;OpenRA p7w5 **27/27 golden**(ID-P7-34,项关闭);bsl-esc-menu = server 死 VkBuffer 无界累积(一帧 1.3 M 调用,ID-P7-32,**M2** 在修)。**已到集成树(2026-09-22 夜,ID-P7-37)**:B2 返工 r1 + r2、B3 返工 + 修复轮、V1、F 片 1–3 已推送 `origin@87584d0b`(2026-09-22 夜,ID-P7-39;pipe 门全绿:magma 97 / 76 / 71、full 535、verify 构建 1140 / 1074、OpenRA split 回放 0 条 unsound;四份 fable 审查 land with fixes,修复轮已落地,ID-P7-44);**M2 + M2 r2 已推送**(主机 bsl spawn server 825 → 546 MiB;memo destroy-epoch 关闭 wire store 句柄复用的 ABA;第二个泄漏 = descriptor set → M3;ID-P7-46);V1 修复 r2 已推送(read 侧负控数到 2、FATAL=0 摘要在 Close 前写出,ID-P7-47);**在跑**:F2 待派;窗口 1b 矩阵在跑(配对窗口在直连 LAN 上同样触发,ID-P7-41)。提交尾注已按用户令改写(origin `3c80cd62`)。**2026-09-23 更新(ID-P7-49–54)**:M3 已在 7ea7ce89 推送;B4 已集成于 pipe b19297d5,源码审查 land、完整集成门全绿(ID-P7-51)。p7w6 DirectGLES × TCP 38 例对照与 Photon / D24 同 APK monolith 对照已结案(ID-P7-52/53);两项错图亦在 monolith 复现。F2 PH-4/5/PH-2 已在包分支 commits `2c6a6e25` / `51480f8c` 落地并通过 Luna 审查(ID-P7-54);该矩阵不替代门 3。**CI 与门 4(ID-P7-55/56)**:CI 自 P6.5 起的七个红因已修;棘轮 171,`p7-magma` 余 86 标 `# P13`,门 4 关闭。**F2 与门 5 修复(ID-P7-57/58)**:Ph 余项与 fuzz 三臂落地;门 5 预演的三个 inproc CTS 缺陷修掉;窗口 2 工装与判读裁定(ID-P7-59)。**窗口 2 与收官审查(ID-P7-60–62)**:门 5 PASS;门 3 严格 33/36,三例 Iris monolith 同样不稳定 → 分布判据后 36/36;codex 收官审查修复、spawn 冷启动心跳(协议修订 2)、1:1 blit 最近邻落地;终局窗口 3 复跑。**余**:F2 PH-6 / PH-1 (3)(4) / PH-7 (5)、fuzz 臂 2 与完整包门;wave 3 棘轮 88;wave 4 CTS AFTER 和门 3;wave 5 fuzz 三臂与整体审查。逐日状态见 [`CURRENT_STAGE_STATUS.md`](CURRENT_STAGE_STATUS.md) | `38919d45` 已补实际游戏的 server buffer consumers 和 Android 旋转 blit([报告](notes/p5f/magma-inproc-fix.md));`194382c9` 又完成 Magma run-ahead、GPU 延迟退休与 VAO 身份碰撞修复([报告](notes/p5f/magma-runahead.md));`ed507b1a..d56c0e83` 29 个 DirectVulkan 提交的 shape 波(随 `e1bf3677` 合入,本行此前未记)已退役 packed-float mip 原生 blit(`5310ff62`)、resolve(`ec4ca06d`)、占位图像(`WirePlaceholderImages.inc`)、copy-image 端点、XFB 捕获 span、纹理回读;`70fb6689` 链关闭 inproc RD32 性能回归(86.85→116.73 fps)。其余工作(2026-09-22 审计改判):~~`SetupDrawSnapshot` 探测字段塌成 dirty mask~~ 与 ~~`VertexInputStateFactory` 内容寻址 CSO~~ **本阶段拒做**(`SetupDraw` 在非 monolith 传输下分支到 `SetupWireDraw`,monolith 快照机制在 split 下不跑;无性能门;ID-P7-5);占位纹理原生化**已落地**(缺 split 车道条目);具名 UBO host payload(D-B8)走了直绑常驻 `VkBuffer` range 的备选,欠一次测量 + 裁定关 OQ-6;内部 shader 烘焙**半已落地**(颜色 blit `WireColorBlitSpirv.h`,仅 split 臂),欠深度 mip 烘焙 + `MOBILEGL_BAKED_INTERNAL_SHADERS` 新鲜度门(0 处);D18 按 ID-P7-6 读法一句闭。**新增必须项**:Magma `StateObjectDeathOps`(六处特判)、OQ-8 归档 `storageBlocks`(`MagmaProgramSource::EnsureStorageBlocks` 每 draw 重跑 SPIRV-Reflect)、OQ-10 `kCapResidentSubData` 从未发布(split 下双后端退回就地 memcpy)、两处 `MagmaP7AllocatorDebtScope`。**P6 真机发现(2026-09-22 归此)**:`DirectVulkan` 分离路径在 Redmi 上两次观测 0.988998 / 0.976494(inproc 与 spawn 同表现,pbuffer monolith 1.0;case 归属、重复次数未记录,原始证据不在树内;取自 run-ahead ARMED 下,**lockstep 对照从未在 golden 口径下跑过**——wave 1 的 E1)——Magma × 真实 GPU;树上 `@P7` 具名拒绝**实为 15 处 / 4 文件**(`multisample-blit-shape` / `-aspect`、`depth-stencil-mipmap`(已窄化到 D\|S 合并)、`vertex-layout`、`vertex-format-conversion`、`texel-buffer-native-format`、`unaligned-{texel,storage,atomic}-buffer-range`、`storage-buffer-native-range`、`uniform-block-native-range`、`uniform-buffer-byte-tail` / `-dynamic-offset`、`copy-image-in-place`、`default-color-blit-shape`;外加 Magma 无 `StateObjectDeathOps` 与 `buffer-legacy-arm`),**全部是绕过 `Session::Fail` 与普查门的裸 abort**;必须退役 `.6/.8/.9/.11/.12/.13`,其余改 decline 即可;链接实验分给 P7 的 **101 个符号**(D12)。`DynamicBackendParameters` 定宽重写**不再是 P7 的**——它是跨平台 wire 的前提,归 P6.5 wf | 集成 + trace 在 Magma 的 push 与 split 下全绿(inproc 半已是硬门;**spawn / TCP 臂今天 DirectVulkan 条目为 0**——四条 split 臂硬编码 `MOBILEGL_BACKEND_TYPE=DirectGLES`,wave 0 补后端维度);verify 零分歧(verify 今天只注册 monolith,verify+split 撞旧 `PipeRespecifyScope` 断言,先清);真机 DirectVulkan split ssim 回到 1.0(分母排除 rd12 in-world 与 create-indirect,ID-P7-4;必须带 `RUN_AHEAD=0` 对照臂);184 符号棘轮(契约 §12.1)下降 P7 的 101 个——原 "`nm -D libMobileGLServer.so \| grep glslang` 为空" 不可达,D12 裁定 server 镜像就是整个 `libMobileGL.so`;仪器 `scripts/link_ratchet.py`(存符号列表、只对新增红)归 wave 0;CTS 五块(`texture_*` / `shader_image_*` / `packed_pixels` / `direct_state_access.*` / `uniform_buffer_object*`)先立 monolith×DirectVulkan 基线再比 inproc,≤0.5 pp 且新 crash = 0 单独硬红。**再基线检查点:中点完成子系统 < 40% 立即重定基线**(分母 = `notes/p7/PLAN-PH-P34B-P7.md` §4 的 9 项) | | **P8** emulation 下放 + 索引宿主镜像 + 协议广度 | 待排 | `MG_Impl/Pipe/HostResolve.cpp`(~~client 数组范围~~ 已由 `beba0256` 落地为 owned buffer;最大索引扫描、`*IndirectCount` 解析,逐站点 reconcile);`Server/IndexHostMirror` **待重裁**(树里 0 处;a6 §6 实测宿主索引 span 无 producer、client 索引已是 owned buffer——按 `kCapNeedsHostIndexBytes` 的真实消费者重新裁定,不照抄 `ARCHITECTURE.md` §10.3);multi-draw client indices(`MultiDrawElements+CLIENT_INDICES` 仍具名拒绝);CopyImage 镜像搬到 client;viewport-array 回放验证;`generate_mipmap` 计划 + CPU 回退纹素;`texture-remint-pull` 仿真下放(15 处具名拒绝);大 blob carrier 只剩 **program archive 与 `draw_vbo` range 尾**(a6 §6;与 P6.5 sl 共用同一分片);`kCapDriverOrderedXfbCapture`(0 处);~~无 present fence tick~~ 只记在 P10 | `'^DirectGLES\.Split\.'` 与 `'^DirectGLES\.'` 逐名相同;trace split 双后端 SSIM ≥ 0.99 含两个 `coherent_as_flush` fixture;`ClientArrayAfterComputeWriteScenario`;`create-indirect` 上 `roundtrips-per-frame` 读零;`index-mirror-bytes` 逐用例发布 | | **P9** 反向通道 | 待排,**P6.5 之后**(2026-09-22 重定范围) | **异步 reply 语义**,机制建立在 P6.5 的消息式 reply 之上(不再造 `SEG_REPLY` slot 池——池今天就有,stream 链路会删它);2 MiB reply cap 与 chunked readback(契约 §10.2.3 从 P6 改判至此,ID-47);PACK-PBO 回读 fire-and-forget + client 侧 `MarkGpuWritten`(ID-57,P6 未做);十个回调里未武装的四个:`OnTextureWriteback`、`OnTexturePullRequest`、`OnMipLevelsGenerated`、`OnLog` 分级(`OnXfbScatterReady` 是零生产者、零消费者、无 EventKind 的死声明——随 P3b/P4b 删除,`kMGPipeCallbackCount` 10→9;`ClientSession.cpp:429`;`OnBufferWriteback` / `OnGpuWritten` / `OnSurfaceChanged` / `OnGlError` / `OnCapsInvalidated` 已武装);`OnGpuWritten` 收窄;`OnBufferWriteback` 批处理 + epoch 排序;`OnGlError` 有序(CONTRACT-P5C §4.2);纹理拉取四条缓解 + 终止符;XFB 命名空间(`DeleteTransformFeedback` 的 server 侧泄漏——按裁定无行、最后两个 class-C 之一)。~~`SEG_EVENT` 溢出策略~~ 机制已由 P5e 落地(`ARCHITECTURE.md` §11.7),剩余的"不排空对端杀宿主"归 Ph | 回读 / XFB 场景在 split 下绿;`TextureRemintPullScenario`(含无解用例);拉取计数逐 trace 发布;两条故障注入 | | **P10** sync / query / present 节奏 | 待排 | ~~client 铸造 query handle~~(已是:`QueryCreate` 为 `kWaitNone`);轮询入口成门铃点 + `MOBILEGL_IPC_POLL_ESCALATE`(0 处;TCP 上是首要杠杆之一);DirectGLES 的 fence 完成度来自逐 fence 退休(`g_completedFrameSerial` 仍只在 `Present` 前进;Magma 那半已由 run-ahead 落地);非 present fence tick(唯一记载处);`present` 1:1(已是);~~credit 默认 1~~(已是默认,`ConfigLoader.cpp:414`);**`PRESENT_CREDIT > 1` 从未量过**(重审 §8.7)——带延迟链路上的首要杠杆,inproc 臂上即可取;roundtrip 计数器与输入延迟直方图(今天只有 `MapPersistentRoundtrips`);`SetSwapInterval`(最后一个手写 class-C,`EmitTables.cpp:1665`) | query / XFB / `AsyncCompile` 场景在 split 下绿;trace 上 draw / state / upload 路径 roundtrip 读零;零 timeout 轮询有界退出;credit 1..3 在 TCP loopback 与跨机臂上的配对记录;配对 A/B 记录 | diff --git a/docs/Disaggregated/notes/handoff/review-p7-closeout-codex.md b/docs/Disaggregated/notes/handoff/review-p7-closeout-codex.md new file mode 100644 index 00000000..22774c34 --- /dev/null +++ b/docs/Disaggregated/notes/handoff/review-p7-closeout-codex.md @@ -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` 紧凑编码的合法归档(多个短名 + 空尾向量)被拒 → 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` 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. diff --git a/docs/Disaggregated/notes/p7/INTEGRATOR-DECISIONS-P7.md b/docs/Disaggregated/notes/p7/INTEGRATOR-DECISIONS-P7.md index 0e0d2c4f..b142b3db 100644 --- a/docs/Disaggregated/notes/p7/INTEGRATOR-DECISIONS-P7.md +++ b/docs/Disaggregated/notes/p7/INTEGRATOR-DECISIONS-P7.md @@ -62,4 +62,7 @@ | ID-P7-57 | 2026-09-23 | **F2 落地:Ph 余项全做完(PH-6、PH-1 (3)(4)、PH-7 (5)、fuzz 三臂),集成者审查 = land。** 基底四提交(Luna 审查 land)只跑过 49 条定向测试;全车道 + 主机 CTS 抓出 PH-4 两个真缺陷——零尺寸 `glTexImage*` 被判 `Fatal{ProtocolCorruption,"ResourceRespecify.ExtentCarrier"}`(dEQP 每例 reset 都发,inproc 下**每个** KHR 用例 abort)、`TextureInternalFormat::R8 == 0` 被当「未声明」(设备 dsa 块 11 个新 crash)——另 PH-3 把 ID-49「DstSize≠tight 读 tight」改成了拒绝;三者在 F2 线内各修一次(空层修复 + f2-latch 片 A)。PH-1:只有 spawn/TCP 会话子进程武装的每会话闩(首错胜出、未武装 = `SessionFail` 原样、inproc 保持 Fatal),DrainRing 入口 + 每记录后查闩、`_exit(75)`、supervisor 照常服务下一连接;64 处闩调用 53 行有原始对端负控、8 处论证不可达(`ph_latch_sites.py --self-test`)。PH-6:drop-with-latch、`MOBILEGL_IPC_EVENT_WAIT_MS`(默认 2000)。PH-7 (5):supervisor 在 fork **前**读 Hello、先验令牌(未认证只回 `Refuse{Authentication}`,不泄漏指纹)、预认证队列按地址共享 + 退避(`MOBILEGL_IPC_PREAUTH_{MS,MAX}`、`AUTH_BACKOFF_{AFTER,MS}`)。三臂 fuzz 全进 CI 车道。**流程裁定**:F2 类「server 字节界」包落地必须跑全车道 + 主机 CTS 子集,定向测试不算门。 | F2 线 29 提交 + 集成 2 个跟进(`TcpLane.EventForfeitPeer` 取 `mobilegl-tcp` 锁、`EventForfeitPeerTest` 钉 headless EGL);审查 `notes/handoff/review-f2.md` | `FatalFunnel.{h,cpp}`、`ServerMain.cpp`、`PreAuthGate.h`、`ServerSession.cpp`、`ServerLoop.cpp`、`PipeWireCodec.cpp`、`PipeApplier.cpp`、`StagedTextureStore.h` | | ID-P7-58 | 2026-09-23 | **门 5 的三个 inproc × DirectVulkan CTS 缺陷修掉(窗口 2 预演 dry run 发现)。** (1) `direct_state_access.renderbuffers_storage`:256×512 RGBA/FLOAT 恰 2 MiB,比回复槽大 16 字节 → `Fatal{ReplyTooLarge}`(ID-47 旧债):客户端把超槽的 ReadPixels 切成行带(单行超槽切行内片),每带一条普通 `read_pixels`、tight DstSize,server PH-3 界不变——CONTRACT-P6 归 P9 的「分块回读」ReadPixels 部分提前还;(2) `renderbuffers_storage_multisample`:Adreno 830 的无 draw render-pass 深度/模板 resolve 不写目标 → **运行时探针**(六格式、生产同一 render-pass 臂、对照组 = 生产着色器臂、对照不过则 inconclusive)选臂 + POST「Known Driver Bugs」FIXED 行;包最初按 Qualcomm vendorID 选臂,按用户 2026-08-22 规则(后端限制一律 POST 探针、不按驱动名硬编码)返工;顺带单采样深/模板 1:1 blit 改 copy(Adreno 深度格式无 BLIT_DST、单面 blit 会踩另一面);(3) `shader_image_load_store.incomplete_textures`:图像单元指向纹理没有的 level/layer 时 wire 臂 `Fatal{UnmigratedVerb,"Magma:image-view-window"}` → 按 GL 4.6 §8.26 绑存储占位(读 0、写丢)。主机 CTS 三例 inproc 全 Pass(monolith `incomplete_textures` 仍 Fail = BASE);红米 msrbo 3/3。 | 审查 `notes/handoff/review-g5.md`;`docs/Disaggregated/notes/p7/g5-msrbo.md` | `EmitTables.{h,cpp}`、`WireDepthResolveProbe.{h,cpp}`、`WireDepthResolveArm.h`、`DriverBugProbes.cpp`、`UniformManager.cpp`、`VkTextureManager.cpp`、`WirePlaceholderImages.inc` | | ID-P7-59 | 2026-09-23 | **设备窗口 2 工装与判读裁定。** `docs/Disaggregated/notes/p7/device-window-2/tools/`(= `~/w7/notes/p7/window2/`)一条命令:构建 → reboot-clean preflight → 安装 → 门 3(36 例 × monolith ×1 + inproc ×3 + spawn ×3 + inproc `RUN_AHEAD=0` ×1)→ bsl 映射/wbuf → CTS AFTER 五块 → 判读 → 复原;可续跑、共享设备锁。**裁定**:门 3 的「三遍逐位相同」按臂内判;inproc/spawn/monolith 跨臂同图只报告、不同则 WARN、不设门;同一 boot_id 贯穿(否则 INVALID-SESSION);CTS 每块率 = Pass/(Pass+Fail)(NS、CompatibilityWarning 不入分母),缺块 / 空读 / 子集一律不给 PASS,新 crash = 0 单独硬红;UBO(GTF)块记 unrun。跑器修复:POSIX 主机可起跑、每遍先清上一遍产物(旧行为会把死掉的一遍归档成通过且逐位相同)。 | window-2 工装 6 提交;dry run 证据 `device-window-2/dry-run/` | `run_android_retrace_local.py`、`60-reduce.py` | +| ID-P7-60 | 2026-09-23 | **P7 收官异模型审查(codex,`6afa077f`)= yes-with-fixes,分诊后修掉五项、记债两项。** 修:越界 / 空存储图像单元有 `VK_EXT_robustness2` nullDescriptor 时绑空描述符(读 0、写丢,GL §8.26 精确),否则按 (形状, 单元) 私有占位(上限 384)——原共享占位让单元 A 的写被单元 B 读到;PH-5 改按元素最小编码宽度限 count(原 `sizeof(T)` 会拒掉编码器自己产出的紧凑合法归档,如多个短 XFB 名);DrainRing 每次 pop 前再查闩(控制线程闩住后的窗口收窄到 check→pop);深度 resolve 探针判定按物理设备身份缓存;窗口 2 判读器硬编码 §7.2 常量(≥3 遍、四臂齐、规范 36 例集合)、CTS 的 Pass→NotSupported 流失计入非通过(裁定过的出分母)、跨臂不同图未裁定即 PASS-NEEDS-ADJUDICATION。记债:对端在已声明大层末尾写几字节会按整层零填(上限 = 设备限制,已认证对端用合法大纹理也能要到同量,不在 ID-P7-3 威胁模型内);`SessionRings` 对闩住的记录也前进 `appliedSeq`。 | 分诊 `notes/handoff/review-p7-closeout-codex.md`;修复 `p7/int3` | `WirePlaceholderImages.inc`、`WirePlaceholderKey.h`、`ProgramArtifactsCodec.cpp`、`ServerLoop.cpp`、`WireDepthResolveArm.h`、`60-reduce.py` | +| ID-P7-61 | 2026-09-23 | **spawn 冷启动:client 的回复预算改量「沉默」而不是「操作时长」,控制协议修订 1 → 2。** `6afa077f` 的 CI 有一条 spawn retrace 腿「ALIVE BUT SILENT,20 s 内没有 CreatePbufferSurface 回复」;同签名在 F2 之前(5 s 预算时 11/77、17/77 腿)就有,本地 4,820 次拉起 0 复现,模拟 21 s 冷拉起与 CI 逐行同形——根因是冷 runner 上首次 `eglInitialize` 装载 libLLVM/libgallium ≈ 20 s,而不是丢唤醒。修法:server 在 apply 线程执行 surface 操作期间每 250 ms 发 `SurfaceProgress{seq, elapsedMs}`,client 每收到一个就重置预算(从发送起封顶 120 s);冻住的 server 照样按名超时;≥1 s 的控制分派记日志。red-once:3 s 拉起对 1 s 预算修前 10/10 红、修后 30/30 绿。**wireFingerprint 变,设备 server 随 APK 重部署。** | `p7/spawnhang` `307535dc` | `ServerLoop.cpp`、`ServerMain.cpp`、`ClientSession.cpp`、`protocol.fbs` | +| ID-P7-62 | 2026-09-23 | **门 3 判读裁定:monolith 自身不逐位稳定的 case 改用分布判据;create-instancing 的 1:1 LINEAR blit 偏差修掉。** 窗口 2(`6afa077f`)门 3 严格读数 33/36:sundial-lite、bliss、derivative d24.4.14 的 split 三遍各三张不同图。同会话设备追查:monolith 也不稳定(sundial 9/9 不同、derivative 9/9、bliss 11/18),两臂变动的是同一批像素(Jaccard 与 split-vs-split 基线相当),lockstep / FIF=1 都不稳定,主机 syncval 0 hazard;derivative 的根因在光影包自身(同一 dispatch 内对同一图像 `imageLoad`/`imageStore` 的边框竞态)。**规则(CONTRACT-P7 §7.2 修订)**:同会话 monolith ≥3 遍不逐位相同的 case,split 的逐位条款换成「每遍对每个 monolith 读数 \|Δssim\| ≤ 0.0005,且每个 split 遍对最近的 monolith 遍:差异像素 ≤ 1.25 × D_mm + 32、最大通道差 ≤ 1.5 × Δ_mm + 8(D_mm / Δ_mm 取 monolith 留一最近邻的最大值)」,monolith 臂改跑 ×5;按窗口 2 的实拍图模拟,×5 下 sundial / bliss / derivative 通过率 100% / 99.9% / 100%、纯噪声对照 100%,窗口 2 加同会话追查的 monolith 读数重判 36/36;monolith 稳定的 case 仍逐位严格。create-instancing:split 两臂逐位稳定但与 monolith 差 712 px ±1 LSB——wire 臂把 1:1 `GL_LINEAR` 默认帧缓冲 blit 走着色器 + 线性采样,Adreno 采样位置微偏;未缩放时改最近邻(结构性单测,lavapipe 看不到)。 | 追查 `~/w7/logs/g3det/{DEVICE,HOST,VERDICT}.md`;终局窗口读数见 §7.2 | `WireColorBlit.inc`、`30-gate3.sh`、`60-reduce.py` | | ID-P7-19 | 2026-09-22 | OpenRA 真机分歧改判为 **wire 臂的 GPU 时序竞态**(冷驱动缓存 = 慢 pipeline 创建 → 最终帧回读在最后几批 draw 完成前采样),归 wave 2-B 第 0 片;主机 red-once 用 pipeline 创建延迟旋钮复现;真机验收 = 三次 `pm clear` 冷跑 1.0。F1 保留(机制正确)但不再被当作分歧原因。 | E7:`pm clear` 三遍 0.976493989 / 14658 逐字相同、热跑 1.0、冷 monolith 1.0、`FRAMESINFLIGHT=1` 一绿一红;两臂 client/server 日志逐行相同;diff 只缺最后画的对象。 | `WireFramebuffer.inc`、`VulkanRenderer.cpp`、`F1-verify/README.md` |