Skip to content

feat(swarm): bridge Workspace Swarm to native Hermes Kanban - #426

Closed
Danservfinn wants to merge 1 commit into
outsourc-e:mainfrom
Danservfinn:native-kanban-prototype-t_b289f629
Closed

feat(swarm): bridge Workspace Swarm to native Hermes Kanban#426
Danservfinn wants to merge 1 commit into
outsourc-e:mainfrom
Danservfinn:native-kanban-prototype-t_b289f629

Conversation

@Danservfinn

Copy link
Copy Markdown

Summary

  • Bridges Workspace Swarm kanban cards to native Hermes Kanban storage when available.
  • Preserves native task statuses plus parent/child dependency metadata and latest run metadata in Swarm projections.
  • Adds native create support with parent links and idempotency details while retaining local Workspace fallback.
  • Normalizes /api/swarm-kanban acceptanceCriteria from legacy textarea strings into the store's string[] contract.
  • Updates Swarm2 surface contract test to match the actual orchestrator hub label.

Verification

  • PASS: npm test -- --run src/server/kanban-backend.test.ts src/screens/swarm2/swarm2-screen.test.ts src/routes/api/-swarm-dispatch.test.ts src/server/swarm-foundation.test.ts src/server/swarm-missions.test.ts src/server/swarm-notifications.test.ts src/server/swarm-memory.test.ts src/server/swarm-profile-config.test.ts src/server/swarm-mode.test.ts src/server/swarm-model-resolver.test.ts src/server/swarm-checkpoints.test.ts src/server/swarm-chat-reader.test.ts src/screens/swarm2/swarm2-kanban-board.test.ts src/screens/swarm2/swarm2-reports-view.test.ts
    • 14 files passed, 74 tests passed.
  • PASS: npm run build
    • client and SSR builds completed.
  • PASS: git diff --check.
  • CHECKED: npx tsc --noEmit --pretty false remains red from existing workspace debt, but no errors reference the touched native-Kanban/API files after this patch.

Rollout note

This is packaged as a draft PR for review before live rollout. Full-repo Vitest/TypeScript/lint debt remains separate from this native-Kanban prototype.

@Danservfinn
Danservfinn force-pushed the native-kanban-prototype-t_b289f629 branch from f995230 to 289dc2a Compare May 12, 2026 22:31
@Danservfinn
Danservfinn marked this pull request as ready for review May 12, 2026 22:31
@Danservfinn

Copy link
Copy Markdown
Author

Kublai review update

I reviewed PR #426 in detail and found direct-SQL native Kanban blockers in the first pass:

  • The projection referenced a non-existent runs table; canonical Hermes uses task_runs.
  • The create path wrote to a non-existent idempotency table; canonical Hermes stores tasks.idempotency_key.
  • Idempotency did not return an existing task before insert.
  • Multi-statement native creates were not transactional.
  • Parent links were inserted without parent existence validation / dependency-aware status derivation.
  • The HTTP API accepted neither parents nor idempotencyKey despite the backend contract.

I fixed those before proceeding:

  • Switched latest-run projection to task_runs.
  • Switched idempotency to tasks.idempotency_key and return-existing behavior.
  • Wrapped native create writes in begin immediate ... commit.
  • Added native parent validation and dependency-aware initial status derivation.
  • Exposed/forwarded parents and idempotencyKey from /api/swarm-kanban.
  • Preserved native todo status through the Workspace contract.

Verification after fixes:

  • PASS: focused Swarm/native-Kanban suite — 14 files, 74 tests.
  • PASS: production build — client and SSR.
  • PASS: live schema projection smoke against /Users/kublai/.hermes/kanban.db.
  • PASS: git diff --check.
  • CHECKED: full npx tsc --noEmit --pretty false remains red from existing workspace debt, but no errors reference touched PR files.

Verdict: ready for upstream maintainer review. I converted this from draft to ready.

@Danservfinn

Copy link
Copy Markdown
Author

Proceed update from Kublai: operator approved moving this from review-ready into merge/rollout path. I attempted to enable/execute squash merge, but the current GitHub token only has READ permission on outsourc-e/hermes-workspace, so GitHub rejected MergePullRequest.\n\nCurrent technical status remains:\n- PR is non-draft and mergeable.\n- Focused Swarm/native-Kanban tests: 74/74 passing.\n- Production build passing.\n- Live Hermes schema smoke passed.\n- No TypeScript errors reference touched PR files; repo-wide tsc debt is pre-existing.\n\nMaintainer action needed: review and squash-merge PR #426, then delete the fork branch if desired.

@outsourc-e

Copy link
Copy Markdown
Owner

Closing as superseded by #432. The validated fix was folded into the consolidated batch branch fix/issue-sweep-batch-20260514 for one review/merge path.

@outsourc-e outsourc-e closed this May 14, 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