ml/serving JetStream consumer for signals.> + feedback.> #98
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context. PR #21 wired the API to JetStream as a producer: every in-process publish on
signals.>andfeedback.>is mirrored to durable streams. PR #22 added a 15-minute scheduler sosignals.task.syncedlands without a user request. Together these make a durable cross-process signal feed possible — but nothing reads it yet.ml/servingstill gets context only when the API hands it features over HTTP.Goal. A
ml/servingJetStream consumer that drives the feature pipeline and policy training without needing the API to be the originator of every read.Scope.
feature-pipeline-signals,feature-pipeline-feedback)./admin/health(already exists for the API): consumer lag + last-msg time per stream.NATS_URL(already in.env.local),NATS_DURABLE_PREFIX(defaultfeature-pipeline),NATS_MAX_DELIVER(default 5).Non-goals.
Acceptance.
fullprofile: bring up api + ml-serving + nats; emitsignals.task.syncedfrom the API; verify it surfaces inml-servinglogs and bumps the feature store row for that user.ml-servingsurvives a NATS restart with no message loss (durable consumer replays from the last ack)./admin/healthshows non-zero last-msg time once the consumer has caught up.References. ADR-0010 (bridge model), ADR-0005 (event schemas),
services/api/src/events/nats.ts,services/api/src/signals/scheduler.ts.