docs: align spec + dependency-flow with ADR-015
Three follow-up corrections from the docs audit: - vertical-feature-spec § 13 dropped the events/jobs bullet from the "Out of scope (deferred)" list — they shipped, the bullet didn't belong there. The spec already mentions ADR-015 elsewhere (§ 4 optional folders). - vertical-feature-spec § 14 success criterion replaced "Any cross-feature import fails pnpm lint" with the post-ADR-015 reality: cross-feature imports are restricted to event contracts (the feature boundary tag now accepts feature-tagged deps), but rule E1 (no-handler-reexport) keeps consumer handlers / use cases / repositories private. - dependency-flow now shows the resolveEventsAndJobs* step in bindAll and the (config, tracer, logger, bus, queue) binder signature, plus the // <gen:event-handlers> / // <gen:jobs> anchor lines where the generators inject subscribe / register calls.
This commit is contained in:
@@ -107,14 +107,20 @@ apps/web-next/src/server/bind-production.ts (bindAll)
|
||||
│ ↓
|
||||
│ tracer + logger instances
|
||||
│ ↓
|
||||
├─ bindProductionBlog(config, tracer, logger)
|
||||
├─ resolveEventsAndJobs* → IEventBus + IJobQueue (ADR-015)
|
||||
│ production → PayloadJobsEventBus + PayloadJobQueue
|
||||
│ dev-seed → InMemoryEventBus + InMemoryJobQueue
|
||||
│ ↓
|
||||
├─ bindProductionBlog(config, tracer, logger, bus, queue)
|
||||
│ │
|
||||
│ ├─ blogContainer.bind(TRACER).toConstantValue(tracer)
|
||||
│ ├─ blogContainer.bind(LOGGER).toConstantValue(logger)
|
||||
│ ├─ ArticlesRepository(config, tracer, logger) → bound to IArticlesRepository
|
||||
│ │ (real repo: inline this.tracer.startSpan + this.logger.captureException per method)
|
||||
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., useCase(deps))) → UseCase symbol
|
||||
│ └─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol
|
||||
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol
|
||||
│ ├─ // <gen:event-handlers> bus.subscribe(...) (ADR-015, gen event consume)
|
||||
│ └─ // <gen:jobs> queue.register(...) in dev-seed; Payload task in prod
|
||||
│
|
||||
└─ (same for auth, marketing-pages, navigation, media)
|
||||
```
|
||||
|
||||
@@ -659,7 +659,6 @@ Big-bang refactor executed as 11 internal phases; each phase ends with a verific
|
||||
- Real Payload integration tests with a test database (stub with mock repos; write real integration tests later)
|
||||
- Coverage reporting aggregation across packages (initial vitest setup per-package; aggregation is a follow-up)
|
||||
- Multi-browser Playwright matrix (chromium only initially; add firefox/webkit later)
|
||||
- Cross-feature events: shipped via `@repo/core-events` (ADR-015, 2026-05-08). Jobs: shipped via `@repo/core-shared/jobs` + Payload's job queue (same ADR).
|
||||
- Payload subscriptions / realtime (spec addendum v4); no feature requires it yet
|
||||
- CMS app Next.js 15.5 + Payload 3.81 stabilization concerns (recently patched; monitor; no specific action in this refactor)
|
||||
|
||||
@@ -673,7 +672,7 @@ Big-bang refactor executed as 11 internal phases; each phase ends with a verific
|
||||
- `pnpm dev --filter @repo/web-tanstack` renders the same blog post using the same feature packages
|
||||
- Storybook builds showing `core-ui` primitives
|
||||
- Any deep import (e.g., `import x from '@repo/blog/src/...'`) fails `pnpm lint`
|
||||
- Any cross-feature import fails `pnpm lint`
|
||||
- Cross-feature imports are restricted to event contracts (ADR-015): the `feature` boundary tag accepts other `feature` tags, but rule E1 (`no-handler-reexport`) keeps consumer handlers, use cases, and repositories private. Importing a publisher's contract is allowed; importing anything else still fails `pnpm lint`.
|
||||
- Root `AGENTS.md` and one-per-package AGENTS.md reflect the new architecture
|
||||
- 9 new ADRs (5 existing maintained/appended/superseded + 4 new)
|
||||
- Zero references to deleted packages anywhere in the codebase
|
||||
|
||||
Reference in New Issue
Block a user