Repository navigation
feat(agent): expose recoverable history checkpoints - #6581
Conversation
Use let chains for nested composition conditions and borrow single-element paths instead of cloning them. Generated-by: Codex
Expose admitted preview, publish, receipt, head, and bounded exact-read methods through the Agent service. Preserve original Host recovery observations alongside durable publication receipts, and verify the real Host and product endpoint behavior with recovery, integrity, and authorization tests. Regenerate the SDK contracts, document the history-only scope, and record a manual performance baseline. Generated-by: Codex
M4n5ter
left a comment
There was a problem hiding this comment.
English
Reviewed 4d7b37c. The scope and implementation look good to me. The public methods reuse the existing history checkpoint publisher, Host admission/recovery, and resource custody without introducing another persistence path or compatibility layer.
The distinction between a committed checkpoint and an unresolved Host outcome is correct. Original-operation lookup, exact-revision streaming, cancellation, and backpressure are handled coherently, with meaningful real-Host and public-endpoint tests.
The history-only scope is clear; restore/activation, workspace snapshots, automatic retention/GC, and broader platform support remain follow-up work. This approval is based on code and test inspection; I have not rerun the Rust suite locally.
Approved. Ready to merge once the remaining CI checks pass.
简体中文
看过 4d7b37c 了,范围和实现都比较清楚。这次直接复用了现有的历史 checkpoint 发布、Host 准入与恢复、资源清理机制,没有另起一套持久化路径或兼容层。
checkpoint 已经提交、Host 结果仍未确认,这两个事实分开表达是对的。查原操作回执、精确版本下载、取消和背压的处理也比较完整,测试走了真实 Host 和公开端点,保护的是实际行为。
当前定位是历史存档管理;恢复激活、Workspace 快照、自动保留与清理,以及更广的平台支持继续留给后续工作。这次我审查了代码和测试,没有在本地重新运行 Rust 测试套件。
我这边 approve,剩余 CI 没问题就可以合入。
Summary
The native checkpoint publisher added in #6498 was internal to the Agent. This PR connects it to the admitted public Agent service so trusted clients can explicitly publish a verified history checkpoint, recover the original publication result, and download the exact retained bundle.
Refs #2370. Follow-up to #6498; this does not close the broader checkpoint work.
previewHistoryCheckpoint,publishHistoryCheckpoint,historyCheckpointReceipt,historyCheckpointHead, andreadHistoryCheckpoint, with generated SDK contracts and English/Chinese documentation.RecoveryRefand input without redispatch or recapture. A committed domain publication can coexist with an unresolved Host outcome and unconfirmed cleanup; the query reports both facts rather than fabricating Host completion.A separate commit fixes eight existing Clippy warnings in composition/settings code without changing behavior. The native test fixture also supplies the upstream-added
Input.basefield.Scope and operating cost
This is native history-only, including the native bundle's historical closure and referenced artifacts. The payload is
MAKA-SESSIONv2, not the TypeScript checkpoint format. Workspace snapshots, complete Memory/Goal state, restore/activation, UI and automatic triggers are outside this PR. Publication uses the existing Unix implementation; local verification was on macOS.Immutable objects are conservatively retained, with no automatic retention/GC. The performance baseline records nine runs, streaming RSS, disk/WAL growth and same-partition message admission. Development-build median publication times were 391 ms for a small history, 4.59 s with a 32 MiB artifact, and 1.30 s for 64 turns. Concurrent message admission slowed in these samples; these are measurements, not a production SLA.
Verification
Passed locally:
cargo test -p maka-agent-api --locked: 7 tests.cargo test -p maka-agent-native --locked checkpoint -- --nocapture: 8 tests; the ignored manual benchmark was run separately nine times.cargo clippy -p maka-agent-api -p maka-agent-native --all-targets --locked -- -D warnings.git diff --check.Product tests used the existing
nsh-platform-gpui/runtime-shadersfeature because this machine lacks the Apple MetalToolchain.cargo testwas used because cargo-nextest is not installed. Full repository checks, the complete native test suite, and Linux/Windows runs were not performed locally; CI remains to be evaluated.AI use
Tool(s) and scope: Codex contributed implementation, tests, documentation, validation and this PR description. Both commits carry
Generated-by: Codex; preserve the trailer when squashing. The submitting human contributor remains responsible for the contribution.Checklist
The focused checks above pass; the full repository and complete native suite were not run locally.
Does this PR entail a change in behavior?