Skip to content

fix: preserve aborted stream attempts and compaction history - #190

Merged
BunsDev merged 3 commits into
mainfrom
fix/176-177-stream-durability
Oct 13, 2026
Merged

BunsDev merged 3 commits into
mainfrom
fix/176-177-stream-durability

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Preserve sampled provider output and tool calls when a stream stalls, fails, or is cancelled. Reconcile finalized attempts into the transcript without duplicate or empty retry assistants, and replace history only after a complete compaction summary.

Context

Changes

  • Preserve indexed text/thinking/tool blocks, initial tool inputs, and incomplete JSON; require explicit stream completion and parse output-only usage updates.
  • Assign each sampled attempt a fresh UUID; account drained cancellation/retry usage once, close unexecuted tools, and suppress empty retry assistants.
  • Reject failed or incomplete compaction summaries before replacing history; retain cancellation recovery across proactive, reactive, and emergency compaction.
  • Reconcile typed durable assistants and tool-result carriers into the TUI without provisional duplicates or erasing a newer stream.
  • Isolate shared roster-cache tests after the parallel suite exposed a pre-existing race.

Validation

All Rust commands used stable Rust 1.99.0 with an external target directory.

  • git diff origin/main --check
  • rustup run stable cargo fmt --all --check
  • rustup run stable cargo check --workspace
  • rustup run stable cargo clippy --workspace --all-targets -- -D warnings
  • rustup run stable cargo test --workspace — 2,073 passed, seven ignored, zero failures, including PR test: freeze engine, command, keybinding and Classic TUI contracts (TUI restart step 1) #189 contract fixtures.
  • Targeted regressions first reproduced initial-input loss, repeated IDs, cancellation accounting, empty retries, premature compaction, and TUI duplication before passing with the fixes.
  • rustup run stable cargo build --package claurst then COVEN_BIN=<debug binary> REQUIRE_TMUX=1 scripts/tui-tests/run.sh — 45 passed, zero failed/skipped.
  • Independent code review completed; findings addressed and re-reviewed.
  • Not run: live authenticated provider calls. Stream behavior uses deterministic provider fixtures and local HTTP/SSE servers; terminal checks run offline.

PR Readiness

  • Diff is limited to seven intended files.
  • Generated files were not edited by hand.
  • No user-facing command or configuration changes require docs.
  • No secrets, credentials, local paths, or unrelated logs are included.
  • Remaining validation gap is listed above.

Coven-Harness: Codex / GPT-6

BunsDev and others added 3 commits August 1, 2026 06:12
Not merge-ready: tracked by follow-up issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate current main, finish stream and query durability, reconcile finalized TUI messages, and isolate roster-cache tests. Keep unrelated goal-loop WIP on its original branch.

Fixes #176
Fixes #177

Coven-Harness: Codex / GPT-6
Integrate PR #189 with workspace check, Clippy, 2,073 passing tests, and seven ignored tests.

Fixes #176
Fixes #177

Coven-Harness: Codex / GPT-6
@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 13, 2026 9:23am UTC

Request Review

@BunsDev
BunsDev merged commit 532d108 into main Oct 13, 2026
4 checks passed
@BunsDev
BunsDev deleted the fix/176-177-stream-durability branch October 13, 2026 12:15

This branch was successfully deployed

1 active deployment
Preview — d1e47a6e Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish durable abnormal query termination and compaction handling Harden provider stream accumulation and attempt identity

1 participant