docs: comprehensive README rewrite#423
Conversation
dimakis
left a comment
There was a problem hiding this comment.
Centaur Review
Found 2 issue(s) (1 warning).
server/__tests__/workload-routes.test.ts
The promote fallback logic in app.ts is correct (proper sourceType/type distinction, guarded broadcasts, right response shapes). The main issue is an ineffective broadcast test that passes vacuously, and the README references several nonexistent design docs.
- 🟡 missing_tests (L548): The 'fallback does not broadcast workload update' test is a no-op. It intercepts
(app as any)._workloadBroadcast, but the actual broadcast callback is a module-scoped closure variable (onWorkloadBroadcast) set viasetWorkloadBroadcast(), which is never called in this test file's setup. The assertion passes trivially becauseonWorkloadBroadcastisnull(so no broadcast ever fires regardless of the guard logic), not because theif (updatedItem)guard works correctly. To test this properly, callsetWorkloadBroadcast(captureFn)before the request and verify the capture array stays empty.[fixable]
README.md
The promote fallback logic in app.ts is correct (proper sourceType/type distinction, guarded broadcasts, right response shapes). The main issue is an ineffective broadcast test that passes vacuously, and the README references several nonexistent design docs.
- 🔵 style: The Design docs table references 5 documents that don't exist in the repository:
task-board-phase3-plan.md,session-isolation-worktrees.md,session-isolation-enforcement.md,session-isolation-multi-repo.md,workflow-templates.md. The actual session isolation docs aresession-isolation-overhaul.md,session-isolation-counter-proposal.md, andsession-isolation-phase2-handoff.md. There is no phase 3 task board doc (only phase 1 and 2).[fixable]
| expect(res.body.item).toBeUndefined(); | ||
| }); | ||
|
|
||
| it('POST /api/workload/items/:id/promote — fallback does not broadcast workload update', async () => { |
There was a problem hiding this comment.
🟡 missing_tests: The 'fallback does not broadcast workload update' test is a no-op. It intercepts (app as any)._workloadBroadcast, but the actual broadcast callback is a module-scoped closure variable (onWorkloadBroadcast) set via setWorkloadBroadcast(), which is never called in this test file's setup. The assertion passes trivially because onWorkloadBroadcast is null (so no broadcast ever fires regardless of the guard logic), not because the if (updatedItem) guard works correctly. To test this properly, call setWorkloadBroadcast(captureFn) before the request and verify the capture array stays empty. [fixable]
Telos items from the Python script were never ingested into workloadStore, so the promote endpoint always returned 404. The frontend now sends item data (title, contextHints, sources) as fallback fields in the promote request body, and the endpoint uses them when workloadStore.get() misses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove misleading `as string` cast on taskHint, use nullish coalescing - Make sources author/snippet optional in schema for real-world data - Omit `item` from response when not in workloadStore (cleaner contract) - Remove comment coupling schema to specific caller - Add tests for fallback promote path and no-broadcast behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expand from ~270 to ~640 lines with full coverage of all major features. New sections: prerequisites, installation guide, skills system, session isolation, task board, voice integration, iOS app, push notifications, MCP integration, observability stack, security model, deployment, REST/WS API reference, design docs index, troubleshooting, and tech stack table. Existing architecture tables preserved and extended. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix workload broadcast test: use setWorkloadBroadcast() to wire the capture callback into the module-scoped closure instead of patching a nonexistent app property (test was passing vacuously) - Fix design docs table: replace 5 nonexistent doc references with actual filenames (session-isolation-overhaul, counter-proposal, phase2-handoff, task-board-phase1-plan; remove workflow-templates) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c8ce6f1 to
d505bbd
Compare
Summary
Test plan
🤖 Generated with Claude Code