fix(harness): persist compaction, fail-closed spill, cassette tools, recovery, exec - #184
Merged
Merged
Conversation
Persist semantic compaction on the session projection ledger so the next provider request still sees the summary, and skip re-archiving dropped turns. Bound tool-output previews on UTF-8 boundaries and fail closed with a typed spill notice. Replay recorded cassette tool_calls through a no-op executor. Emit typed Event::Recovery for empty-turn and stuck-tool actions. Drain unified exec pipes, register the exec tool, and emit process lifecycle events. Make repomap cache roots injectable and honest on write failure. Co-authored-by: Max Carter 祁明思 <max@tsc.hk>
Co-authored-by: Max Carter 祁明思 <max@tsc.hk>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a8297b38-fd40-4b9c-8277-cc4c87fe9c16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Post-merge harness should-fixes. Hosts can forward
Event::Recoverythemselves; this PR only lands the engine surface.Changes
Semantic compaction survives the next provider request
projectionledger (summary+archived_ids).request_messages()/serialize_provider_request/ JSONL replay apply that ledger.compact()uses live (unarchived) turns, so the same dropped turns are not re-archived.Tool-output spill is UTF-8 safe and fail-closed
preview_bodytruncates on a character boundary.SpillStatus/Event::ToolSpill/ToolResult.spillso hosts do not parse locator text.Cassette replay emits recorded
tool_callsReplayProvider::streamemitsCassetteTurn.tool_calls.detect_tool_divergenceplusAgent::enable_cassette_replaysimulate recorded tools instead of executing them.Typed recovery host event
Event::Recovery { action, reason }.RecoveryKindis a stable serde-tagged variant (prefill/nudge/retry/halt).Unified exec is usable
exectool (spawn/stdin/wait/kill) is registered with the builtin loadout.ProcessStart/ProcessEndlifecycle events (plus existingProcessStdin).Nit
RepoMap::with_cache_rootfor workspace-safe tests.save_cacheno longer reports success when the cache path cannot be written.Out of scope
Host adapter forwarding of
Event::Recovery(separate follow-up). Do not merge until review.Validation
cargo fmt --check