Skip to content

Extend existing notification-subscription infra to AMS-relevant events (attempt start/fail, governor pause, PR outcome) #7657

Description

@JSONbored

Problem

No notification-preference concept exists anywhere in AMS code — confirmed by grep, zero occurrences of "notification" across packages/loopover-miner and packages/loopover-engine. ORB has a real, working notification_subscriptions/notificationDeliveries pair (src/db/schema.ts, src/db/repositories.ts) scoped by login+channel, but it's used exclusively for ORB's own PR-review-related channels — nothing wires an AMS-relevant event (attempt started/failed, a portfolio-queue item claimed, the governor pausing, a miner's own PR outcome changing) into it.

Area

packages/loopover-miner/lib/, src/notifications/service.ts, src/db/schema.ts.

Proposal

Extend the existing notification-subscription infrastructure to cover AMS-relevant event kinds.

⚠️ Required pattern — read src/queue/job-dispatch.ts's use of deliverNotification/evaluateNotificationEvent before starting. New AMS event kinds must fire through that exact existing delivery path. A PR that builds a second/parallel notification mechanism instead of extending src/notifications/service.ts's existing event-kind union does not satisfy this issue.

Deliverables

  • AMS-relevant event kinds added to the existing DetectedNotificationEvent-style union in src/notifications/service.ts.
  • Wiring at the points those events actually occur (attempt start/fail, governor pause, PR-outcome change) to call the existing delivery path, mirroring job-dispatch.ts's exact call shape.

Test Coverage Requirements

src/** — standard 99%+ Codecov patch target, both branches of each new event kind's evaluation logic. packages/loopover-miner/** call sites: match that package's existing test conventions.

Resources

  • src/notifications/service.ts, src/db/schema.ts (existing infrastructure to extend)
  • src/queue/job-dispatch.ts (the required pattern)
  • packages/loopover-miner/lib/ (where AMS events actually originate)

Boundaries

Extends existing infrastructure only.

Contributor-eligible. Reuse the exact pattern named above — a PR that invents a new notification mechanism instead of extending the cited one does not satisfy this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is neededroadmapOn the Wave-2 agent-layer roadmap board (project 9)

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions