feat(macos): persist Psyche-owned Coven sessions - #89
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS Tauri Psyche Build app to treat Coven daemon sessions as Psyche-owned only when they carry the exact provenance label source:psyche-build, to render only active eligible sessions, and to persist/reuse attachments safely across app restarts while preventing duplicated rows and accidental relabeling.
Changes:
- Introduces an explicit “Psyche-owned active” predicate for Coven sessions (label + live status), and applies it to grouping and search filtering.
- Deduplicates overlapping daemon session rows across saved projects by deterministically assigning each eligible session ID to exactly one project section.
- Wires provenance through native
coven chatlaunches (env contract), scrubs it forcoven attach, and adds regression/contract tests + updated docs/smoke guidance.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| native/macos/psyche-build-tauri/web/sessions/session-model.mjs | Adds source:psyche-build label constant + predicate; filters grouping/search to Psyche-owned active sessions only. |
| native/macos/psyche-build-tauri/web/sessions/session-model.d.mts | Extends session typings with labels and exports the new predicate/constant. |
| native/macos/psyche-build-tauri/web/sessions.bundle.js | Regenerated committed web bundle reflecting the updated session filtering logic. |
| native/macos/psyche-build-tauri/web/main.js | Implements deterministic session-to-project ownership assignment; improves attachment reuse detection; fixes browser shortcut handler; wires chat provenance env. |
| native/macos/psyche-build-tauri/src-tauri/src/lib.rs | Enforces launch env contract for coven-chat, forbids env for coven-attach, and centralizes env application (including removing provenance for attach). |
| native/macos/psyche-build-tauri/src-tauri/src/coven_sessions.rs | Normalizes/validates daemon labels into a bounded safe list; adds tests for missing/malformed labels behavior. |
| docs/superpowers/specs/2026-08-08-psyche-owned-active-coven-sessions-design.md | Documents overlap ownership rules and updated rail rendering pipeline. |
| docs/superpowers/plans/2026-08-09-deduplicate-overlapping-coven-session-rows.md | Adds implementation plan documenting the overlap dedupe approach and verification steps. |
| docs/SMOKE.md | Updates packaged smoke steps to validate provenance labels, visibility rules, and non-relabeling attachment behavior. |
| docs/COVEN-SESSIONS.md | Updates macOS rail behavior documentation to reflect the new provenance + active-only visibility contract. |
| tests/tauriWebBundles.test.ts | Adds a regression gate to node --check the committed main.js before packaging. |
| tests/tauriSessionModel.test.ts | Updates/extends model coverage for Psyche-owned active filtering and “search cannot reveal hidden sessions”. |
| tests/tauriFooterStatusBar.test.ts | Updates expectations around the new covenSessionAssignments seam in main.js. |
| tests/tauriCovenSessionSiderail.test.ts | Adds overlap dedupe behavioral tests and ensures only eligible sessions render. |
| tests/tauriCovenSessionNativeContract.test.ts | Adds a contract test ensuring provenance wiring and attach scrubbing across JS↔Rust seams. |
| tests/tauriCovenSessionLifecycle.test.ts | Updates compiled dependencies; adds lifecycle coverage for re-creating attachments after exit. |
| tests/tauriCovenLaunch.test.ts | Verifies coven-chat sets provenance env and coven-attach does not pass/serialize it. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Verification
Dependency chain