Summary
Define the gRPC notification stream from gitstore-git-service to gitstore-api so the API can react to Git changes without WebSockets. The stream should carry commit/ref transition events and provide the control-plane trigger for sync and admission handling.
In Scope
- Define a
GitEvent gRPC payload contract for ref changes, old/new SHA values, and event type
- Implement a server-streaming notification path from git-service to API
- Route events through the stream so the API/controller can decide what to do with commerce objects. Some events to consider where it makes sense for the current/future architecture
- push / ref updated
- branch created
- branch updated
- branch force-pushed
- branch deleted
- tag created
- tag moved / tag updated
- tag deleted
- default branch changed
- protected branch rejected
- pre-receive rejected / push rejected
- release created
- mirror sync . bulk ref update
- notes updated
- replace ref updated
- custom ref updated
- etc
- Add contract tests for event delivery, reconnect behaviour, and event typing
- Document the event flow and operational expectations across the two services
Out of Scope
- The hydration and live-promotion logic itself (tracked separately)
- Replacing Git wire protocol handling
- UI notifications or browser-based realtime updates
- Authentication/authorisation policy design
Acceptance Criteria
Implementation Notes
This stream is the control-plane equivalent of a watch mechanism: the git-service tells the API that Git state changed, but the API remains responsible for interpreting and materialising that change. Keeping the notification channel on gRPC preserves a clean service boundary and aligns with the rest of the Git-service decoupling work. The stream should be minimal and event-oriented, not a transport for business logic.
Thoughts: Attach this to a phase similar to admission_control_phase=post-receive, schema_validation_phase=pre-receive, event_notification_phase=??
When multiple phases attach to the same hook, they are run in parallel.
The API can decide what to do with the events; such as publishing it as part of watch semantics for controllers. A Release Controller reacting to tag created events could verify the tag target is reachable from the admitted branch,
then marks matching resources as Published=True. See #314
Dependencies
Summary
Define the gRPC notification stream from
gitstore-git-servicetogitstore-apiso the API can react to Git changes without WebSockets. The stream should carry commit/ref transition events and provide the control-plane trigger for sync and admission handling.In Scope
GitEventgRPC payload contract for ref changes, old/new SHA values, and event typeOut of Scope
Acceptance Criteria
gitstore-git-serviceemits ref-change events togitstore-apiover gRPCImplementation Notes
This stream is the control-plane equivalent of a watch mechanism: the git-service tells the API that Git state changed, but the API remains responsible for interpreting and materialising that change. Keeping the notification channel on gRPC preserves a clean service boundary and aligns with the rest of the Git-service decoupling work. The stream should be minimal and event-oriented, not a transport for business logic.
Dependencies