Files
aios/docs/architecture/aios-unified-platform-convergence-r1.md
T
AIOS Governed Continuation 7e1649808d
autonomy-smoke-tests autonomy smoke tests PASS (A18-A23 staged-run authorized by Owner; G7 staging checks green)
autonomy-unit-tests R2 290/0 + G7 66/0 unit suites PASS
campaign-approval-gate OWNER APPROVAL — campaign approval gate PASS (Owner-authorized agent)
git-diff-check git diff --check clean (only patch-content artifact)
py-compile py_compile 71/71 PASS
reconciliation-contract reconciliation contract consistent (no drops, ChangeEnvelope verified)
release-state-machine release state machine advances to STAGING (authorized by Owner)
secret-scan secret scan 0 secrets PASS
signer-validator-contract signer-validator contract PASS (Owner-authorized)
feat(r2+g5): R2+R2.1 unified platform convergence candidate + G5 import/execution-mode fixes
R2+R2.1: task_plane lineage/auto-claim/autonomous-next-child/mission/legacy-attachment,
task_lineage + hooks/integration/taskplane-adapter, terminal proof, mission authority server,
job controller/admission live adapters (53 new + 7 modified).
G5 dependency/import closure: tests/conftest.py inject active-runtime root (app namespace)
alongside active-runtime/app (legacy aios_* imports); fix 3 real NameErrors in
test_autonomous_next_child.py (mod-qualified refs).
Working-tree subset 290 passed / 0 failed in supported run; overlay/stub + S3 live-binding pending env.
2026-09-14 22:33:41 +08:00

8.5 KiB
Raw Blame History

AIOS Unified Platform Convergence R1 — 架构变更说明

0. 决策摘要

本变更将 Identity/Lineage S3、ANNEX-2.3 R2 Auto-Claim、平台化 Phase-0、 Governed Merge/Release 收敛为一个新的上层 Program,而不是改写已存在 Identity/Lineage Mission 的原始验收合同。

核心原则:

  1. 新 Program,不重写旧 root。 已有 Mission mission-f3af205b-7dd6-455f-a561-88f0294cc815 和 root task-133ad96e-e0d7-4202-934f-80c75053b11f 原样保留,C01–C06 的 acceptance 不变。
  2. 唯一 Git authority 是 beabd053961047f170e87e1110f2636dbd50f5fb。 release-control runtime 3c320aeb89d9ba8f0ed516abeb57252682b18983 和 production 4642b74af62c89a505ae49241e805a5a88ca897f 是不同平面,不得互相冒充。
  3. 恢复语义,不恢复旧拓扑。 从 3c320ae… 选择性移植 SystemTruth/Execution Integrity 语义,但不把该后继分支整体推回 main。
  4. 单一权威、只读聚合。 新 inventory/caller_scan/Environment Profile/ Retry Governor 都是 evidence producer,不成为新持久化权威。
  5. 先评审,后部署。 本 R1 是 Review Candidate;禁止在 Review Gate 通过前 进行 staging/production activation。

1. 当前权威三平面

平面 OID 含义
Git authority / main beabd053961047f170e87e1110f2636dbd50f5fb 新候选唯一 source base
release-control runtime 3c320aeb89d9ba8f0ed516abeb57252682b18983 现有控制面运行字节,不是 main
production baseline 4642b74af62c89a505ae49241e805a5a88ca897f V2R2C2 生产 evidence closure

beabd053961047f170e87e1110f2636dbd50f5fb -> 3c320aeb89d9ba8f0ed516abeb57252682b18983 仅包含 10 个 SystemTruth/consistency 相关路径; 现有 Identity/Lineage 27 文件候选与这 10 个路径无交集。因此 27 文件候选可以 在 重新读取 authority preimage 并通过 apply/check 后 重新绑定 beabd053961047f170e87e1110f2636dbd50f5fb,但不能复用旧 3c320ae… approval/base 记录。

2. 新 Program 与既有 Mission 的关系

2.1 新上层 Program(尚未在 live TaskPlane 创建)

goal_slug = AIOS-UNIFIED-PLATFORM-CONVERGENCE

实际 mission_id/root_task_id 必须由 live TaskPlane authority 创建并返回, 本候选不预造 ID。

2.2 既有 Identity/Lineage Mission(保留)

  • mission: mission-f3af205b-7dd6-455f-a561-88f0294cc815
  • root: task-133ad96e-e0d7-4202-934f-80c75053b11f
  • owner: local-owner-authority
  • alias: U9CA8400F7
  • legacy durable task: TASK-P0-CHATGPT-BRIDGE-V2-CONTROL-PLANE-CONVERGENCE-INTEGRATE-20260913T184412Z-19b7
  • legacy job: job-7457a322d5f9d6931c7cd99ce3ec6c18

该 Mission 作为新 Program 的 Track A 依赖/子目标;其历史 task/job/idempotency 身份不可为了新命名而重建。

3. 四条 Track

Track A — Identity / Lineage S3

目标保持: root → child → terminal proof → ROOT_REVIEW → actual next action → execution → root re-review

包含:

  • C01 governed candidate commit/readback
  • C02 staging lineage policy activation
  • C03 root-action executor binding
  • C04 legacy attach
  • C05 live failure/replay/concurrency E2E
  • C06 production convergence

Track B — ANNEX-2.3 R2 Auto-Claim / Execution Integrity

新链: admission/preflight → SchedulabilityProof → discovery → claim-time authoritative recheck → lease/fencing/CAS → execution → heartbeat/progress → result/evidence → readback/acceptance

R1 已实现 review-candidate 代码:

  • task_plane/schedulability.py
  • task_plane/auto_claim.py
  • A01 风格多 blocker、scope/capability/heartbeat/auth/capacity/freeze/dependency/lease 检查
  • proof 仅为诊断证据,不是 bearer credential
  • claim 前完整 authority recheck

R1 不直接替换现有 claim 路径;必须在 staging 评审时通过 adapter 绑定后才可启用。

Track C — Platform Phase-0 / Generation G0

仅包含批准的第一 generation:

  • WP0a Version/Baseline inventory
  • WP0b Git writer inventory
  • WP0c Authorization inventory
  • WP0d Canonical/Digest inventory
  • WP0e caller_scan
  • WP1 Environment Capability Profile
  • WP2 Retry/Toil Governor

这些组件只读或纯决策:

  • 不新增 version authority
  • 不新增 canonical authority
  • 不写业务状态
  • UNKNOWN 永远不能被 caller_scan 降级为 orphan
  • Retry Governor 只返回决策,不执行 retry

禁止提前引入 WP8 MissionRun store / WP9 新 Release Saga 控制面。

Track D — Governed Merge / Staging / Release

顺序: Review Gate → governed child commit/readback → staging activation → integrated live E2E → release candidate/acceptance → production convergence

部署不是本 Review Candidate 的交付内容。

4. 状态权威边界

维度 权威
Mission/root/lineage TaskPlane/Mission authority
claim/heartbeat/task revision TaskPlane
Owner/TaskPrincipal authorization existing auth/Admission authority
Writer lease / governed write existing writer/lease authority
source bytes/ref Git authority
deployed runtime runtime readback
external projection external projection readback
caller liveness evidence caller_scan evidence only
retry decision Retry/Toil Governor decision only

新模块不得建立第三份真值数据库。

5. 关键架构优化

5.1 动态 readiness 与不可变身份分离

Planner 选择身份(mission/root/child/route/authority digest)不可变; readiness_class 是动态观察,可在未激活、未终态时通过 revision/CAS 单调向 “更可执行”方向推进。active claim/READY/DONE 后冻结。

5.2 Legacy reader 无副作用

旧 GET /v1/tasks/{id} 可能触发全局 lease expiry。R1 改为:

  1. 通过 /v1/tasks/{id}/events 做 Bearer 认证;
  2. Task row 从 authority SQLite 以 mode=ro + PRAGMA query_only=ON 精确读取;
  3. 只允许终态;
  4. readback ref 同时绑定 events SHA 和 DB revision;
  5. 不暴露 lease_token_hash。

5.3 SchedulabilityProof 是短寿命诊断证据

Proof 绑定 task/worker/actor、revision/generation、capabilities、scope digest、 authorization revision、capacity/dependency/freeze/lease 观察;TTL ≤ 300s。 真正 claim 必须重读 authority 并完全一致,proof 本身不能授权。

5.4 Root Action Provider / Executor 分离

Provider 只把 root review 映射到准备计划;Executor 使用现有 continuation/recovery 路径执行。不能让 planner 把“PENDING”当成“已执行”。

6. 数据迁移策略

  • 既有 Mission/root/children:不重建。
  • legacy TASK-P0-CHATGPT-BRIDGE-V2-CONTROL-PLANE-CONVERGENCE-INTEGRATE-20260913T184412Z-19b7 / job-7457a322d5f9d6931c7cd99ce3ec6c18:仅 attachment,不改 identity。
  • 新 Platform inventory:无持久业务迁移。
  • 新 schedulability proof:短寿命诊断记录;若持久化,必须复用现有 TaskPlane evidence/journal,禁止新数据库。
  • SystemTruth:只读派生,不能成为第三控制面。

7. Review Gate

R0 — 架构与代码评审

必须同时满足:

  • 新 Program 与旧 Mission 边界明确
  • base 重新绑定 beabd053961047f170e87e1110f2636dbd50f5fb
  • 变更路径均有 ChangeEnvelope
  • 新代码定向测试 PASS
  • 旧候选继承证据有效
  • 无新增业务权威/数据库
  • legacy reader 不再使用可变 GET
  • planner readiness 动态规则经过测试
  • R2 proof 不能直接授权 claim

R1 — Governed Commit Gate

在 R0 GO 后:

  • live reread authority HEAD
  • 所有 preimage SHA 重新采集
  • exact apply/diff
  • governed writer commit
  • authority branch/commit readback

R2 — Staging Gate

  • authenticated principal/tenant
  • identity/lineage/read isolation
  • auto-claim adapter
  • root action real executor
  • restart/response-loss/sibling race
  • ANNEX A01–A23

R3 — Production Gate

只有 original root acceptance + Program acceptance 全部证据闭环, 并完成 rollback/recovery 验证后才能生产收敛。

8. 回滚

  • Review candidate:直接丢弃候选,无线上副作用。
  • Governed commit 未发布:通过正式 successor/revert,不 reset/force push。
  • Staging activation:关闭 feature/policy binding,保留 evidence。
  • Production:只走既有 release Saga/rollback contract。

9. 明确不做

  • 不把 3c320aeb89d9ba8f0ed516abeb57252682b18983 恢复为 main。
  • 不新建任务数据库、第二 scheduler、第二 release authority。
  • 不把 caller_scan/Retry Governor/SystemTruth 作为写权威。
  • 不把局部测试 PASS 当 root/program 完成。