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)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user