feat(tui): register interactive sessions in the Coven ledger (opt-in) (Phase 3, Track B)#152
Merged
Conversation
When `daemonLedger` is enabled and a Coven daemon socket is present, the interactive TUI registers itself via POST /api/v1/sessions/external on start and POST /api/v1/sessions/<id>/complete on exit. Best-effort: every failure is swallowed so a dead or absent daemon never affects the TUI. Opt-in (default off).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds an opt-in path for the interactive TUI to register and complete its session in the Coven daemon “ledger”, so it can appear in coven sessions, using new daemon client endpoints and a small best-effort notifier layer.
Changes:
- Add
daemonLedger(default off) to settings to enable ledger notifications. - Implement best-effort ledger notifier functions (
notify_session_start/notify_session_complete) in core. - Extend
DaemonClientwithregister_external_sessionandcomplete_sessionplus serialization tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src-rust/crates/core/src/lib.rs | Exposes coven_ledger module and adds daemonLedger setting merge behavior. |
| src-rust/crates/core/src/coven_ledger.rs | Adds best-effort session start/complete notifier wrappers around daemon IPC. |
| src-rust/crates/core/src/coven_daemon.rs | Adds external-session register/complete endpoints and serialization tests. |
| src-rust/crates/cli/src/main.rs | Wires opt-in registration at interactive start and completion at interactive exit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4572
to
4577
| if let Some(id) = &ledger_session_id { | ||
| claurst_core::coven_ledger::notify_session_complete(id, Some(0)); | ||
| } | ||
|
|
||
| restore_terminal(&mut terminal)?; | ||
| Ok(()) |
BunsDev
requested review from
CompleteDotTech
and removed request for
CompleteDotTech
July 13, 2026 05:40
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.
Summary
Phase 3, Track B (engine side): when enabled, the interactive TUI registers itself in the Coven daemon's ledger so the session appears in
coven sessions. Companion to the daemon-side PR on OpenCoven/coven (the/api/v1/sessions/external+/completeendpoints).What's in this PR
DaemonClientmethods (coven_daemon.rs):register_external_sessionandcomplete_session, mirroring the existingcreate_sessiontransport. Request keys are camelCase (id,projectRoot,harness,title,transcriptPath;exitCode) — verified to match the daemon's parser exactly.daemonLedgersetting (opt-in, default off): only acts when a Coven daemon socket is present.coven_ledger.rs,#[cfg(unix)]-gated): registers on session start (off the TUI event loop viaspawn_blocking) and completes on the single clean exit. Every failure is swallowed to a debug log — a dead or absent daemon never affects the TUI./resume(which rebinds the session) can't leave a registration uncompleted.Verification
cargo test --workspace,cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check— all clean. Serialization tests assert the camelCase keys and that snake_case doesn't leak.Review
Spec-compliant and quality-approved; a final cross-repo integration review confirmed the notifier↔daemon wire contract end-to-end and the
/resumeid-capture fix. Commit signed; no AI co-author trailer (per this repo's AGENTS.md).