Propose the N3 implementation plan: durability and observability #43

Merged
weichen merged 1 commits from feature/agent-stack-n3-plan into main 2026-10-07 14:56:11 +00:00
Owner

Why: N2 is closed; per the completion doc dependency order N3 is next and needs a plan grounded in current code.

What: five-area current-state survey (RunState durability, file checkpoints, memory surface, telemetry, usage/fallback/retry) with file:line citations, then six work packages:

  • WP1 RunState closure: orphan-tail pairing repair for the crash window between persist(assistant) and commitToolIntent, kill-window tests, N6 residual, graceful-shutdown subagent resume semantics (acceptance ① library)
  • WP2 product conversation durability: directRun opens the session transcript (acceptance ① product)
  • WP3 checkpoint closure: rollback-eligibility pinning, symlink guard, partial-restore in Result, retention, HTTP and edge tests (acceptance ②)
  • WP4 OTel GenAI alignment: span-name suffixes, gen_ai.* attributes, shared TraceID + parent links, resource, settings surface (acceptance ③; prompt-body denylist already satisfied and kept)
  • WP5 Memory port: runtime/memory Store + loop recall injection + MemoryScope consumption + backend scope-aware impl + memory_write tool
  • WP6 usage split + retry/fallback closure: cache-token accumulation, Last*/cache into usage event and core.Usage, subagent token accounting, library-default retry, observability events

Verified while drafting: intent journal + recoverPending + replay double-declaration exist; audit N1/N21 fixed; N6/N20 still open; OTel prompt-body denylist already tested.

Impact: documentation only; implementation starts after merge.

Refs: 2026-10-02-agent-stack-completion.md N3 section

Why: N2 is closed; per the completion doc dependency order N3 is next and needs a plan grounded in current code. What: five-area current-state survey (RunState durability, file checkpoints, memory surface, telemetry, usage/fallback/retry) with file:line citations, then six work packages: - WP1 RunState closure: orphan-tail pairing repair for the crash window between persist(assistant) and commitToolIntent, kill-window tests, N6 residual, graceful-shutdown subagent resume semantics (acceptance ① library) - WP2 product conversation durability: directRun opens the session transcript (acceptance ① product) - WP3 checkpoint closure: rollback-eligibility pinning, symlink guard, partial-restore in Result, retention, HTTP and edge tests (acceptance ②) - WP4 OTel GenAI alignment: span-name suffixes, gen_ai.* attributes, shared TraceID + parent links, resource, settings surface (acceptance ③; prompt-body denylist already satisfied and kept) - WP5 Memory port: runtime/memory Store + loop recall injection + MemoryScope consumption + backend scope-aware impl + memory_write tool - WP6 usage split + retry/fallback closure: cache-token accumulation, Last*/cache into usage event and core.Usage, subagent token accounting, library-default retry, observability events Verified while drafting: intent journal + recoverPending + replay double-declaration exist; audit N1/N21 fixed; N6/N20 still open; OTel prompt-body denylist already tested. Impact: documentation only; implementation starts after merge. Refs: 2026-10-02-agent-stack-completion.md N3 section
weichen added 1 commit 2026-10-07 14:55:53 +00:00
Why: N2 is closed; per the completion doc's dependency order N3 is
next and needs a plan grounded in current code (the crash window
between persist and intent commit is unprotected, the product
conversation path has zero durability, span names/attributes do not
follow the GenAI convention, the memory port does not exist).
Evidence: five-area survey with file:line citations at the pinned
baselines (agent-native 74aa60b, backend 7980a8a, core 0b5c774);
audit N1/N21 verified fixed, N6/N20 verified still open.
Impact: documentation only; work starts after this plan merges.
Refs: 2026-10-02-agent-stack-completion.md N3 section
weichen merged commit 5ccbe027ca into main 2026-10-07 14:56:11 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Documents#43