From 50873b8bd0c03fccefc2b063c72cf7073db955aa Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sun, 12 Jul 2026 18:10:04 +0800 Subject: [PATCH] docs(rfc): remove redundant lifecycle diagram --- .../2026-07-12-agent-scope-runtime-design.md | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/docs/rfc/implemented/architecture/2026-07-12-agent-scope-runtime-design.md b/docs/rfc/implemented/architecture/2026-07-12-agent-scope-runtime-design.md index 988a30968f..318c07ad31 100644 --- a/docs/rfc/implemented/architecture/2026-07-12-agent-scope-runtime-design.md +++ b/docs/rfc/implemented/architecture/2026-07-12-agent-scope-runtime-design.md @@ -249,37 +249,6 @@ Two services split the public API from the implementation. `AgentRegistry`, reac | Publish and start | Session, agent, and lifecycle notifications appear in order | Liveness is checked between observable phases | | Dispose | Driver drains, registries detach, scope unwinds, IDs release | All owner paths join one completion promise | -The implementation treats success, rollback, handle disposal, caller unload, and AgentLoop unload as entrances to one owned transaction rather than separate cleanup algorithms: - -```mermaid -flowchart TB - caller["Caller context owner"] --> transaction["Owned create or resume transaction"] - factory["AgentLoop structural owner"] --> transaction - - subgraph creation["Create or resume"] - transaction --> reserve["Reserve both IDs and install trackers"] - reserve --> prepare["Load persistence or prepare the session"] - prepare --> lifecycle["Install the complete caller-owned lifecycle"] - lifecycle --> setup["Await unpublished setup"] - setup --> enter["Enter session and agent registries"] - enter --> announce["Emit session/created, then agent/created"] - announce --> start["Enable driving, emit agent/session-start, start driver"] - end - - transaction -.->|"reservation, load, or preparation failure before lifecycle handoff"| earlyRollback["Release acquired tracking and reservations"] - start --> live["Live handle"] - lifecycle -.->|"failure or owner loss before a handle escapes"| dispose["Join the lifecycle cleanup boundary"] - live -->|"dispose or either owner unloads"| dispose - - subgraph teardown["Reverse-order teardown"] - dispose --> barrier["Wait for synchronous publication to unwind"] - barrier --> drain["Stop driver and complete final flushes"] - drain --> detach["Detach agent, then session"] - detach --> scope["Dispose agent scope to quiescence"] - scope --> release["Release session and agent IDs"] - end -``` - The [public lifecycle contract](2026-07-08-agent-scope-contexts.md#creation-publishes-after-setup-disposal-revokes-after-work-stops) defines what callers observe. The following sections justify each ownership and ordering fact behind that contract. ### Reservations precede awaiting; lifecycle ownership precedes setup