Commit Graph

2 Commits

Author SHA1 Message Date
saravanakumardb1
4667f85e20 docs(cleanup): move historical roadmaps to docs/archive/ and update AGENTS.md
Sprint B — closes audit item B7 (doc consolidation).

- docs/AGENT_TASK_ROADMAP.md, docs/ARCHITECTURE_REVIEW_AND_REUSE_ROADMAP.md,
  docs/GAP_ANALYSIS.md were each self-marked as historical snapshots
  but kept polluting the top of docs/. Moved them under docs/archive/
  in the previous commit; this commit:
  - Adds docs/archive/README.md explaining what's archived vs active
  - Repoints cross-doc links in docs/IMPLEMENTATION_TRACKER.md,
    docs/WEB_AI_FAST_ROADMAP.md, and docs/roadmaps/*.md to the new
    archive paths
  - Fixes relative links inside the archived files themselves so
    historical readers can still navigate back to active docs
- AGENTS.md §1.1 refreshed: reflects the May 22 re-verified state
  (382/96/97 tests), links the two new runbooks, and points readers
  away from docs/archive/ as a work source.
2026-05-22 23:23:50 -07:00
saravanakumardb1
1258d49488 feat(backend): emit task.created + workspace.created events; add share revocation regression test
Sprint B — closes audit items B6 (event-bus completeness) and B3
(public-share revocation regression).

Event bus:
- note-tasks/repository.ts createNoteTask now emits task.created with
  taskId, noteId, workspaceId, userId, title
- workspaces/repository.ts createWorkspace now emits workspace.created
  with workspaceId, userId, name

The event-bus already declared these event types (event-bus.ts) and
webhook subscribers can target them, but they were never emitted —
making the contract dead. Emissions follow the same .catch(() => {})
pattern used by note.created/updated/deleted in notes/repository.ts so
a subscriber failure cannot break the create flow.

Regression tests:
- note-tasks/repository.test.ts and workspaces/repository.test.ts
  exercise the emission paths end-to-end through the in-memory
  datastore.
- note-shares/repository.integration.test.ts adds a 5-test integration
  suite for the public-share revocation path: token resolves before
  revocation; token returns null after deleteShare (hard delete);
  expired token returns null; cross-product token rejected;
  listSharesForNote does not include revoked shares.

Verified:
- pnpm --filter @notelett/backend run test: 380/380 (was 373, +7 new)
- pnpm run verify end-to-end green
2026-05-22 23:23:08 -07:00