Conversation
Phase 1 of the archon-symphony consolidation
(see Ddell12/symphoney-codex docs/superpowers/plans/2026-04-30-archon-symphony-consolidation.md).
Adds an empty-but-buildable @archon/symphony workspace package and the
DB schema needed for Phase 2's orchestrator port. No runtime behavior
yet — Phase 2 will land the tracker + orchestrator + dispatch loop.
What's in this commit:
* packages/symphony/{package.json,tsconfig.json,src/index.ts} — new
workspace package mirroring packages/git's shape. Deps: @archon/core,
@archon/paths.
* migrations/022_symphony_dispatches.sql — PostgreSQL migration adding
symphony_dispatches table. UUID FKs to remote_agent_codebases and
remote_agent_workflow_runs. Indexes on (tracker, issue_id), identifier,
workflow_run_id, codebase_id. dispatch_key UNIQUE so the same raw issue
id from two trackers (e.g. Linear + GitHub) cannot collide.
* migrations/000_combined.sql — append symphony_dispatches table to the
fresh-postgres bootstrap snapshot.
* packages/core/src/db/adapters/sqlite.ts — add SQLite-equivalent
symphony_dispatches table + indexes inside createSchema(). Uses TEXT
IDs / datetime('now') per existing SQLite convention.
* packages/symphony/src/db/dispatches.ts — typed CRUD: insertDispatch,
getDispatchByDispatchKey, getDispatchById, updateStatus,
attachWorkflowRun. Functions accept IDatabase explicitly so tests pass
a fresh SqliteAdapter against a temp file (Phase 2 will switch to the
pool singleton at call sites).
* packages/symphony/src/db/dispatches.test.ts — 8 round-trip tests
against real SQLite: insert/get, dispatch_key UNIQUE, multi-tracker
non-collision, updateStatus mutation, attachWorkflowRun idempotency,
conflict rejection, and missing-id error path.
Verification:
bun install && bun run validate
(= check:bundled && type-check && lint --max-warnings 0 && format:check && test)
All 11 packages green. New @archon/symphony package contributes 8
passing tests. No regressions in @archon/core's SQLite adapter tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
📝 WalkthroughWalkthroughA new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Phase 1 of the archon-symphony consolidation, per
docs/superpowers/plans/2026-04-30-archon-symphony-consolidation.mdinDdell12/symphoney-codex.Summary
Empty-but-buildable
@archon/symphonyworkspace package + the DB schema Phase 2's orchestrator will need. No runtime behavior yet.packages/symphony/{package.json,tsconfig.json,src/index.ts}— new workspace package (mirrorspackages/git). Deps:@archon/core,@archon/paths.migrations/022_symphony_dispatches.sql— PostgreSQL migration. UUID FKs toremote_agent_codebasesandremote_agent_workflow_runs. Indexes on(tracker, issue_id),identifier,workflow_run_id,codebase_id.dispatch_key UNIQUEso the same raw issue id from two trackers (Linear + GitHub) cannot collide.migrations/000_combined.sql— table appended to the fresh-Postgres bootstrap snapshot.packages/core/src/db/adapters/sqlite.ts— SQLite-equivalentsymphony_dispatches+ indexes added tocreateSchema(). TEXT IDs /datetime('now')per SQLite convention.packages/symphony/src/db/dispatches.ts— typed CRUD. Functions acceptIDatabaseexplicitly so tests pass a freshSqliteAdapteragainst a temp file (Phase 2 will switch call sites to the pool singleton).packages/symphony/src/db/dispatches.test.ts— 8 round-trip tests against real SQLite: insert/get,dispatch_keyUNIQUE, multi-tracker non-collision,updateStatusmutation,attachWorkflowRunidempotency / conflict rejection / missing-id error.Verification
```
bun install && bun run validate
check:bundled && type-check && lint --max-warnings 0 && format:check && test
```
All 11 packages green. `@archon/symphony` contributes 8 passing tests. No regressions in `@archon/core`'s SQLite adapter tests.
Out of scope (Phase 2+)
Draft
Marked draft until the Phase 2 work lands and we can validate the schema against real orchestrator code.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests