Skip to content

Add soft quota-warning notifications before #7647's hard block #7662

Description

@JSONbored

Problem

src/notifications/service.ts's notification event-kind union has no quota-related event, and evaluateTenantQuota's per-dimension "remaining" figures (packages/loopover-engine/src/tenant-quota.ts) are never checked against a soft warning threshold anywhere.

Area

src/notifications/service.ts, packages/loopover-engine/src/tenant-quota.ts.

Proposal

This issue is sequenced after #7647 — do not start until #7647 (the hard-block admission-check wiring) has actually landed in src/queue/job-dispatch.ts. Add a quota-warning event kind and check it at the exact same admission-check point #7647 adds (e.g. 80%/90% remaining), firing through the existing notification delivery path (src/queue/job-dispatch.ts's deliverNotification/evaluateNotificationEvent calls — the required pattern, same as #7647 itself uses).

⚠️ Do not invent a separate quota-checking call site — this must hook into the same admission-check point #7647 adds, not a new one.

Deliverables

Test Coverage Requirements

src/** — standard 99%+ Codecov patch target, both branches (under threshold / at-or-over threshold).

Resources

Boundaries

Blocked on #7647 — see the native blocked-by relationship on this issue.

Re-locked to maintainer-only on 2026-07-21 — see the issue comment for why (tenant billing/usage-exposure surface, not purely mechanical). This line is left from before that correction; do not treat it as current guidance.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

Status
In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions