registrystack / registrystack/registry-stack
bregctl dev delivers change-request events only to its own receiver
- Lingua principale
- Rust
- Stelle
- 2
- Fork
- 0
- Merge medio
- 2h 55m
- PR unite (30g)
- 130
Descrizione
Found while writing the public tutorial `Review BReg changes in Casework` (0.30.0 plus the `caseworkctl dev --source-project` work that ships with it).
## Use Case
A reader runs `bregctl dev` and `caseworkctl dev --source-project` side by side. The Casework dev session should learn about a submitted change request the moment the registry emits its event, the same way a deployed Casework runtime does through the registry's webhook destination.
## What we hit
`bregctl dev` writes `eventDestinations` for exactly one receiver: its own retained webhook port, computed by `event_destinations(&compiled, port)` in `crates/registry-bregctl/src/dev/config.rs`. A second local subscriber cannot be registered, so the Casework dev session only learns about new work through reconciliation (the `caseworkctl dev` binding uses a short interval for that reason, see the `reconciliationIntervalMilliseconds` binding setting).
## Proposed Behavior
Let a `bregctl dev` session deliver events to an additional local subscriber: either a documented `--event-subscriber ` style option on `bregctl dev`, or a local registration that `caseworkctl dev --source-project` performs through the public `bregctl` CLI (never a crate dependency, the same rule `caseworkctl source add` follows). The registry's own receiver keeps working.
## Boundaries
Loopback only, HMAC key handled as a file secret the way the existing receiver does, and the dev session must still refuse non-loopback destinations. Related: #936 proposes webhook and PostGIS modes for `bregctl dev`.
Triage: later, not needed for the tutorial (reconciliation covers it).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in crates/registry-bregctl/src/dev/config.rs, in event_destinations(&compiled, port), poi leggi il binding reconciliationIntervalMilliseconds utilizzato da caseworkctl dev. Traccia come il receiver mantenuto esistente gestisce il proprio controllo di loopback e il secret del file HMAC. Il lavoro è completo quando una sessione bregctl dev può consegnare eventi a un subscriber di loopback aggiuntivo, mantenendo il proprio receiver e rifiutando le destinazioni non di loopback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- cli, devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100