koala73 / koala73/worldmonitor

feat(company-monitoring): deliver account-bound alerts through a fenced outbox

Open
#6,016 0 comments 0 reactions 0 assignees View on GitHub
agent-readiness area: infrastructure feature High Value P1 security
Dominant language
TypeScript
Stars
86.6k
Forks
13.1k
Avg merge
8h 4m
Merged PRs (30d)
825

Description

## Parent

#6002

## What to build

Add configurable Company Monitoring alerts through a dedicated account-bound publisher and durable fenced outbox. Company events must never enter the existing userless broadcast fan-out.

## Acceptance criteria

- [ ] Extend alert rules with a required legacy or company-monitoring discriminator; existing rules remain legacy and contradictory kind/account state fails closed.
- [ ] Company rules require an owner account and use account-leading queries; legacy functions exclude them before matching.
- [ ] Insert original or correction outbox intent atomically with impact publication and store only an allowlisted WorldMonitor-authored delivery snapshot plus canonical link.
- [ ] Claim, ack, and nack use fencing tokens and leases; stale workers cannot acknowledge or mutate a newer claim.
- [ ] Before every send, revalidate outbox state, rule kind and filter, active company, admissible current impact revision, feature and entitlement, immutable owner, and current verified destination.
- [ ] Disabling a rule, removing a company, retracting an impact, losing entitlement, changing destination, or substituting another account cancels delivery.
- [ ] Corrections require a delivered original to the same current destination; crash after send before ack follows the documented at-least-once retry contract.
- [ ] Generic relay logic rejects company events before any legacy rule lookup.
- [ ] Evidence text, HTML, prompt-like content, provider URLs, X handles, and customer claims never enter outbox, logs, metrics, or transport payloads.
- [ ] End-to-end tests use the actual publisher payload and registered relay branch and prove zero generic-broadcast evaluation.

## Blocked by

- #6012
- #6014

## Promotion gate

The outbox is the ninth table and may not land or activate until both Stage 1 historical-usefulness and live-operability arms pass.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the blocked parent work in #6012 and #6014, then trace the existing alert publisher, relay, rule, impact, and delivery paths. No source files or tests are named; completion requires the listed fenced-outbox, validation, cancellation, privacy, and end-to-end criteria, including the promotion gate.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, databases, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.