Skip to content

feat(macos): persist Psyche-owned Coven sessions - #89

Merged
BunsDev merged 1 commit into
mainfrom
feat/psyche-owned-active-sessions
Aug 12, 2026
Merged

feat(macos): persist Psyche-owned Coven sessions#89
BunsDev merged 1 commit into
mainfrom
feat/psyche-owned-active-sessions

Conversation

@BunsDev

@BunsDev BunsDev commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • mark Psyche-launched Coven Code sessions with the exact source:psyche-build provenance label
  • show only active Psyche-owned sessions, deduplicate overlapping native and daemon rows, and focus the existing physical attach pane
  • preserve sessions across packaged app restarts without creating duplicate attach processes
  • add a parser regression test and repair the pre-existing malformed browser shortcut handler found during packaged acceptance

Verification

  • pnpm exec vitest --run --minWorkers=1 --maxWorkers=1: 2146 passed, 11 skipped
  • pnpm typecheck
  • cargo fmt --check
  • cargo check
  • cargo test: 115 passed
  • pnpm smoke
  • pnpm smoke:pack
  • node --check native/macos/psyche-build-tauri/web/main.js
  • git diff --check
  • clean packaged restart/rehydration acceptance: exact session 5d6ab4c0-4bcd-4925-80f3-9fc353b9f097 and source label survived restart; one daemon row and one native attach process; no historical completed rows
  • packaged DMG SHA256: 7f61dd6c20048ce45ea2b51ca94e1485cdc68b7adc4dad944558bd0782be5a77

Dependency chain

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
psyche-build-docs Ready Ready Preview Aug 12, 2026 4:12am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 chat launches (env contract), scrubs it for coven 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.

@BunsDev
BunsDev merged commit dd4bfee into main Aug 12, 2026
4 checks passed
@BunsDev
BunsDev deleted the feat/psyche-owned-active-sessions branch August 12, 2026 04:28
@BunsDev BunsDev self-assigned this Aug 12, 2026
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.

2 participants