Add workspace foundation#99
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces the initial “workspace foundation” layer in the store/CLI, adding workspace persistence and basic APIs, creating a default local workspace during chorus setup, and adding early workspace-scoped channel creation coverage. It also adds a user-visible “empty-run warning” when an agent completes a run without sending a message.
Changes:
- Add workspace tables + migrations, plus store APIs to create/list/read active workspaces.
- Update channel storage to support workspace scoping (workspace_id + per-workspace name uniqueness) and add
create_channel_in_workspace. - Update
chorus setupto ensure a local workspace exists (default “Chorus Local”) and add related tests; add empty-run warning behavior + tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/store_tests.rs | Adds tests for workspace creation/ownership, workspace-scoped channel naming, and unknown workspace mode errors. |
| src/store/workspaces.rs | New workspace data model + Store APIs for creating a local workspace, getting active workspace, and listing workspaces for a human. |
| src/store/schema.sql | Adds workspace tables and introduces workspace_id + new uniqueness strategy for channels/agents/teams. |
| src/store/mod.rs | Exposes the new workspaces module/types from the store. |
| src/store/migrations.rs | Adds workspace foundation migration: new tables, workspace_id columns, and uniqueness indexes. |
| src/store/channels.rs | Adds create_channel_in_workspace for explicit workspace-aware channel creation. |
| src/cli/setup.rs | Ensures an explicit local workspace exists during setup; adds tests and displays workspace info. |
| src/agent/event_forwarder.rs | Posts a system warning if a run completes “naturally” without invoking send_message; adds tests. |
| docs/CLI.md | Documents setup creating a local workspace and the non-interactive default name. |
| VERSION | Bumps version to 0.0.2.0. |
| CHANGELOG.md | Adds release notes entry for empty-run warnings (fixes #97). |
Fullstop000
left a comment
There was a problem hiding this comment.
Review Summary
Solid foundation PR. The workspace data model is clean, migrations are safe (legacy indices for NULL workspace_id rows), and the resource-isolation tests give confidence. I noted a few concerns around async runtime ergonomics and request-handler I/O that are worth addressing before merge.
Approve with suggestions — nothing blocking, but I'd recommend the RwLock and local_human changes.
See inline comments for details.
# Conflicts: # src/agent/event_forwarder.rs
Summary
Notes
chorus workspace createcreates a workspace without switching to it; explicitchorus workspace switch <name>changes the active workspace.Test Plan