Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions docs/architecture/rfcs/typescript-control-plane-migration-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,15 @@ shipped Stage 2B cutovers are in place:
zero.
- Todo completion: TypeScript owns completion identity, terminal replay fence,
validation declaration/effect planning, validation-receipt reduction,
continuation/recovery, and completion metadata in one transaction. A Todo
without declared validation, including a replay, uses one reduction. A real
caller-approved validation command remains an explicit Python provider
between two reductions. A source snapshot is compared after the mutation
lock so a receipt for one declaration cannot authorize a changed Todo.
Materialized and event-projected writes consume the same typed result.
continuation/recovery, completion metadata, registered-agent admission,
successor ownership/exclusion, and existing-successor selection in one
transaction. Python projects registry and Todo-source facts without deciding
policy. A Todo without declared validation, including a replay, uses one
reduction. A real caller-approved validation command remains an explicit
Python provider between two reductions. Todo and policy-source snapshots are
compared after the mutation lock so a receipt for one declaration or agent
registry cannot authorize changed facts. Materialized and event-projected
writes consume the same typed result.
- Scheduler heartbeat/state: TypeScript owns receipt freshness, ACK and
host-failure validation, identity-aware progression, failure-cache
retention/counting, replay and CAS fencing, preview reduction, the locked
Expand Down Expand Up @@ -519,11 +522,12 @@ Until then Python supplies compact projection facts, clock/effect identity,
result validation, and the shared legacy index lock. The Todo cutover removes
the Python state-evaluation dataclass, local identity
projection, replay helper, and public runtime handlers for those implementation
leaves. The remaining Python Todo facade owns transport, external command
execution, source compare-and-swap, legacy response projection, and the actual
Markdown/event write. It exits when those writers and the CLI move into the
native TS transaction. The remaining fine-grained Turn facade exits after
quota and host-adapter callers move to their own coarse transactions. The
leaves. The remaining Python Todo facade owns fact projection, transport,
external command execution, source compare-and-swap, legacy response
projection, and the actual Markdown/event write. It exits when those writers
and the CLI move into the native TS transaction. The remaining fine-grained
Turn facade exits after quota and host-adapter callers move to their own coarse
transactions. The
task-lease semantic facade, atomic Python providers, settlement bridge
operation, and lifecycle rule engine are deleted. Python retains compact source
projection, one process transport, context-manager plumbing that carries the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,12 @@ window 仍需 differential proof 时才保留 characterization corpus;引入
一次;空 candidate 的 short circuit 仍为零次。
- Todo completion:TypeScript 在一笔 transaction 中拥有 completion identity、
terminal replay fence、validation declaration/effect planning、validation receipt
reduction、continuation/recovery 与 completion metadata。没有声明 validation 的
Todo(包括 replay)使用一次 reduction;真实 caller-approved validation command
作为显式 Python provider,位于两次 reduction 之间。取得 mutation lock 后会比较
source snapshot,确保一份 declaration 的 receipt 不能授权已经变化的 Todo。
reduction、continuation/recovery、completion metadata、registered-agent admission、
successor ownership/exclusion 与 existing-successor selection。Python 只投影 registry
和 Todo source facts,不再决定 policy。没有声明 validation 的 Todo(包括 replay)使用
一次 reduction;真实 caller-approved validation command 作为显式 Python provider,
位于两次 reduction 之间。取得 mutation lock 后会同时比较 Todo 与 policy-source
snapshot,确保一份 declaration 或 agent registry 的 receipt 不能授权已经变化的事实。
Materialized 与 event-projected 写入消费同一 typed result。
- Scheduler heartbeat/state 由 TypeScript 拥有 receipt freshness、ACK 与
host-failure validation、带 identity 的 progression、failure-cache
Expand Down Expand Up @@ -428,10 +430,10 @@ facade 即可退出。在此之前,Python 只提供 compact projection facts
identity、result validation 与共享 legacy index lock。Todo cutover 删除了 Python
state-evaluation dataclass、local identity projection、
replay helper,以及这些 implementation leaf 的 public runtime handler。剩余 Python
Todo facade 只拥有 transport、external command execution、source compare-and-swap、
legacy response projection 与实际 Markdown/event write;当 writer 与 CLI 进入 native
TS transaction 后即可退出。剩余细粒度 Turn facade 则在 quota 与 host-adapter
caller 进入各自 coarse transaction 后退出。Task-lease semantic facade、Python atomic
Todo facade 只拥有 fact projection、transport、external command execution、source
compare-and-swap、legacy response projection 与实际 Markdown/event write;当 writer 与
CLI 进入 native TS transaction 后即可退出。剩余细粒度 Turn facade 则在 quota 与
host-adapter caller 进入各自 coarse transaction 后退出。Task-lease semantic facade、Python atomic
provider、settlement bridge operation 与 lifecycle rule engine 已经删除。Python 只保留
compact source projection、一次 process transport、携带 opaque fence token/receipt id
的 context-manager plumbing、legacy response projection,以及现有 Python caller 所需的
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ LoopX 已经提供的通用机制包括:
| Agent-facing packet | `loopx/control_plane/work_items/interaction_contract.py::build_interaction_contract` | selected work、gate、replan、terminal 是否完整投影 |
| Goal frontier replan | `loopx/control_plane/goals/goal_frontier/replan_rules.py::select_goal_frontier_replan_rule` | runnable、gate、succession gap、monitor exhaustion 的优先级 |
| Vision checkpoint | `loopx/state_refresh.py::build_vision_checkpoint` | material closeout 后如何防止局部目标替代长期方向 |
| Todo succession | `loopx/control_plane/todos/succession_warning.py::build_open_parent_successor_advisory`、`loopx/control_plane/todos/completion_policy.py::resolve_completion_policy` | successor 为什么只记录 lineage,open parent 为什么仍需显式 complete/defer |
| Todo succession | `loopx/control_plane/todos/succession_warning.py::build_open_parent_successor_advisory`、`loopx/control_plane/todos/completion_policy.ts::resolveTodoCompletionPolicy` | successor 为什么只记录 lineage,open parent 为什么仍需显式 complete/defer |
| Turn transaction | `loopx/control_plane/turn_driver/executor.py::run_loopx_turn_once` | phase failure 怎样恢复,何时允许 commit |
| Domain State seam | `loopx/domain_state.py::default_domain_state_file_path`、`upsert_domain_state_jsonl` | goal/pack 分区、稳定 key、原子 upsert 和 unchanged observation |
| Issue lifecycle | `loopx/capabilities/issue_fix/pr_lifecycle.py::build_issue_fix_pr_lifecycle_monitor_packet` | 外部 PR observation 怎样变成有限 proposal |
Expand Down
Loading