[P1-03] Extract HTTP, RabbitMQ, CouchDB, Valkey, and scheduler adapters from domain services #41

Open
opened 2026-07-22 00:16:54 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-22 00:16:54 +00:00 (Migrated from github.com)

Problem

Current files mix HTTP parsing, JSOWN, authentication-less policy, Rabbit publication, CouchDB queries, actor messages, scheduling, and global configuration. This prevents reuse as a library and makes failure/retry behavior inconsistent.

Required changes

  • Domain/application services operate only on typed requests, ports, principals, deadlines, and result types.
  • HTTP adapter owns request/response translation only.
  • Rabbit adapter owns connection/channel/reactor, topology, envelope serialization, settlement, retry, and DLQ.
  • CouchDB adapter owns pooling, request building, view installation/querying, revision behavior, and persistence errors.
  • Valkey adapter owns atomic scripts and lease serialization.
  • Scheduler adapter owns timers and recovery scheduling.
  • No adapter imports another adapter to perform application orchestration.
  • Composition root wires adapters into services/runtime.

Acceptance tests

  • Core/targets/auth systems load and run with no Dexador, Ningle, cl-rabbit, cl-couch, or Valkey dependency in their package dependencies.
  • Fake adapters run unit tests deterministically.
  • Adapter contract suites run against real services.
  • HTTP and Rabbit ingress invoke the same application service methods.
## Problem Current files mix HTTP parsing, JSOWN, authentication-less policy, Rabbit publication, CouchDB queries, actor messages, scheduling, and global configuration. This prevents reuse as a library and makes failure/retry behavior inconsistent. ## Required changes - Domain/application services operate only on typed requests, ports, principals, deadlines, and result types. - HTTP adapter owns request/response translation only. - Rabbit adapter owns connection/channel/reactor, topology, envelope serialization, settlement, retry, and DLQ. - CouchDB adapter owns pooling, request building, view installation/querying, revision behavior, and persistence errors. - Valkey adapter owns atomic scripts and lease serialization. - Scheduler adapter owns timers and recovery scheduling. - No adapter imports another adapter to perform application orchestration. - Composition root wires adapters into services/runtime. ## Acceptance tests - Core/targets/auth systems load and run with no Dexador, Ningle, cl-rabbit, cl-couch, or Valkey dependency in their package dependencies. - Fake adapters run unit tests deterministically. - Adapter contract suites run against real services. - HTTP and Rabbit ingress invoke the same application service methods.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/starintel-server#41
No description provided.