implP4E4implemented · gate-open2026-09-04

CORE-5 GPU Schema 与 Lifecycle 候选事件

开发方案(先于代码)

GPU schema

复用同一 pmd3 Graphics service,新增显式 GPU schema Adapter。它只识别当前已观察字段:

字段值只接受有限数值,原始单位按字段名保留为 source-native。字段集合完全未知或已知字段类型错误时,raw payload 仍保存,但 decodeStatus=candidate-unknownquality=unsupported-schema,不生成 GPU 指标。当前 Registry 已有三项 GPU metricID,仍保持 experimental;本阶段不修改公式。

Lifecycle

在唯一 DTX provider 上周期性读取 DeviceInfo.proclist(),根据 Bundle ID/PID 观察状态变化:

事件时间是主机收到状态变化的时间,窗口上限等于 polling interval,不是 App 内埋点真值。scope process,unit state-event;unknown/missing 不转 0。

被动与受控模式隔离

默认 passive-observation:不 launch、不 kill、不发 signal。若后续产品需要冷启动实验,必须由独立 controlled-launch coordinator 显式开启并写入 Session mode;不得复用被动事件名称冒充精确启动耗时。本阶段只实现被动观察。

指标/公式状态

Lifecycle 目前没有 Registry metricID,仅为 candidate event;Startup Duration 需要定义起点、终点、时钟域和聚合规则后另行发布。GPU 三项沿用既有 raw gauge 定义,不增加计算。

实施结果

验收数据

验收结果等级
Python 3.12 / 系统 Python各 53/53E2
GPU known/invalid/unknown schema3 种 fixture;invalid/unknown 均 unsupported-schemaE2
Lifecycle 状态机running→foreground→terminated→running;generation 1→2E2
iOS 16 raw4 秒:GPU schema 4、Lifecycle 1;GPU 9 个已知字段,schemaKnown=trueE4
受控前后台刺激下的被动观察7 秒:observed-running/foreground=true → observed-background → observed-foreground;generation 不变E4 candidate event
冻结二进制3 秒:GPU schema 3、Lifecycle 1;4 条严格回放、drop 0、generation 10E4
Swift62/62(未改 Swift 产品代码)E2

第一次 raw 观测时目标 App 为后台;同 Session 的 Graphics 仍出现动态值。这再次证明 Graphics scope 是 foreground-device,并非目标进程专属 GPU。文档和 Adapter 不把它冒充 App GPU。

Lifecycle 前后台三事件是在外部测试 harness 受控切换两个已安装 App 时观察到的;Adapter 自身未调用 launch/kill/signal。0.5 秒轮询时间窗意味着它只能作为候选状态事件,不能用来宣称精确 Startup Duration。

阶段结论

CORE-5 完成 GPU schema fail-closed 与被动 Lifecycle 状态流,当前 iOS 16 和冻结候选二进制达到 E4。Startup、termination、rebound 的状态机已有 fixture 覆盖,但本轮真机只验收 running/foreground/background;精确启动耗时和 CoreProfile lifecycle decoder 仍不具备。

冻结归档:CORE-5 GPU Schema 与 Lifecycle 验收