feat: expose durable material-progress inspection - #2721
Conversation
the repo-pinned Node 22 runtime is not already available.
|
| Filename | Overview |
|---|---|
| packages/server/src/server/agent/agent-manager.ts | Adds continuation-boundary and outcome lifecycle management, but the previously reported stale-terminal-event overwrite remains reachable. |
| packages/server/src/server/agent/material-progress.ts | Introduces the timeline-based material-progress classifier and terminal assistant-result semantics. |
| packages/server/src/server/agent/agent-storage.ts | Extends durable agent records and snapshot persistence for progress state, continuation boundaries, and outcomes. |
| packages/protocol/src/messages.ts | Adds the optional validated material-progress payload to agent snapshots. |
| packages/server/src/server/session.ts | Attaches the manager-derived material-progress snapshot to inspection responses. |
| packages/cli/src/commands/agent/inspect.ts | Exposes structured material progress and a concise state-and-reason table row. |
Sequence Diagram
sequenceDiagram
participant Provider
participant Manager as AgentManager
participant Timeline
participant Storage
participant Inspect
Provider->>Manager: turn_started(turnId)
Manager->>Timeline: capture continuation boundary
Manager->>Storage: persist cleared outcome and boundary
Provider->>Manager: timeline events
Manager->>Timeline: append events
Manager->>Storage: persist derived material progress
Inspect->>Manager: getMaterialProgressSnapshot
Manager->>Timeline: resolve continuation rows
Manager->>Storage: read retained classification
Manager-->>Inspect: materialProgress snapshot
Reviews (3): Last reviewed commit: "test: cover failed continuation boundary" | Re-trigger Greptile
|
Greptile found a blocking stale-outcome fallback at the exact current head: an explicit live |
|
The exact-head stale-outcome fallback is repaired at 6c71167. Live explicit null now remains authoritative while a new turn is running instead of falling back to an older persisted completion. The deterministic regression forces that stale persistence condition; agent-manager tests pass 148/148, with Node 24 server typecheck and changed-file lint/format/diff checks green. Submitted head is 4097571. |
|
Accepted-start material-progress repair is now frozen at exact head The manager persists an authoritative continuation sequence before publishing Exact Node 24.18.1 proof: 6 files / 182 tests passed; server build passed; repository-wide all-workspace pre-commit typecheck passed; changed-file lint/format and |
|
Exact-head review found the #2721 product implementation clean and requested one focused missing regression only. That proof is now added at exact head The daemon/client test starts from a two-compaction stalled continuation, accepts a new provider turn, emits Exact Node 24.18.1 proof: 6 files / 183 tests passed; repository-wide pre-commit typecheck, lint, format, and diff checks passed. Normal non-force push. PR remains draft pending final exact-tip rereview. |
|
Independent exact-head review of |
Linked discussion
Discussion #2690: Workflow: distinguish material agent progress from transport activity.
This replaces draft PR #2689 with the material-progress capability only. Provider-history hydration, quarantine, and lifecycle reconciliation are deliberately excluded into separate review units.
Type of change
What does this PR do
Adds a provider-agnostic, read-only
materialProgresssnapshot to the existing agent protocol andpaseo agent inspectpath. The snapshot reports whether the current continuation has made material progress, the latest material event, and whether repeated compaction without useful output has reached warning or stalled state.Material progress includes completed edits and writes, concrete read/search/fetch evidence, successful shell verification with output, non-empty explicit decisions, and a completed turn's terminal assistant deliverable. Stable result fingerprints prevent repeated identical activity from resetting the compaction count. Failed, empty, missing-output, and no-op activity remains non-material.
The state is persisted with the agent record, survives worker collection/archive/restart, and is protected against older queued snapshots overwriting a newer continuation. A live agent's explicit null turn outcome is authoritative while a new turn is running, so stale persisted completion cannot classify in-progress work as terminal.
The manager also persists its own accepted-start timeline boundary before publishing the running state. Inspection therefore does not depend on a provider first projecting a
user_messagerow. Duplicate/pre-resolutionturn_startedevents cannot move that boundary past already-emitted events, and the foreground waiter is installed before the durable write so a fast terminal event cannot strand the stream. Legacy records without the boundary retain the latest-user-message fallback.This PR does not stop, retry, route, archive, or otherwise control an agent. Downstream patch receipts and machine-specific state are excluded from the upstream diff.
The candidate was first reconstructed directly on official stable v0.2.5 (
6fc491e6220fba6543bbbe4bf1b1f58cfe59228b) and then merged normally with upstreammain; follow-up review repairs and regression proof were committed normally on top. No commit was rewritten or force-pushed.Exact submitted head:
65c98a30a74f8639c0827f7deec50c75b9546a5b.Exact submitted tree:
243d20df8ab720b3df2d3c04a6bd9bbe01434923.Accepted-start boundary source repair:
a045df727f6a161c17998714fcd1322f90bba032.How did you verify it
All latest repair commands used Node 24.18.1 against the exact submitted head.
git diff --checkpassed.Tested on macOS. No UI, desktop bundle, mobile runtime, daemon installation, or live agent state is changed or activated.
Checklist
npm run typecheckpassesnpm run lintpassesThis contribution was developed with AI assistance. I reviewed the final diff and ran the commands reported above against the exact submitted branch.