Events¶
SISS uses Pub/Sub as the event backbone for cross-service integration. Events
live in a shared siss-events repository. Producers own their schemas.
Consumers accept additive changes; breaking changes are versioned
(e.g., submission.created.v2).
Event catalog¶
| Event | Producer | Consumers | Purpose |
|---|---|---|---|
submission.created |
submission-svc | workflow-svc, notification-svc, ai-svc | PSP moved submission out of DRAFT. Triggers workflow and first notifications. |
submission.files.attached |
submission-svc | ai-svc, bim-svc (if IFC) | New files confirmed in GCS. Dispatches document extraction. |
preconsult.checklist.passed |
submission-svc | workflow-svc, notification-svc | CMU officer accepted pre-consult. Workflow advances. |
ai.compliance.report.ready |
ai-svc | workflow-svc, submission-svc (cache) | AI produced a compliance report; ready for officer HITL review. |
bim.validation.completed |
bim-svc | workflow-svc, submission-svc | IFC passed / failed integrity + schema checks. |
bim.metadata.extracted |
bim-svc | ai-svc (zoning compare), submission-svc | Building height, storey count, GFA, georef extracted. |
comment.posted |
comment-svc | submission-svc, notification-svc | Officer or PSP posted a comment. |
workflow.step.assigned |
workflow-svc | notification-svc | Human task assigned to an officer; email them. |
workflow.sla.breaching |
workflow-svc | notification-svc | SLA timer approaching; send reminder. |
perakuan.signed |
signing-svc | submission-svc, notification-svc, auditor stream | Kertas Perakuan signed; notify all parties. |
sigl.certificate.issued |
signing-svc | submission-svc, notification-svc | SIGL issued; PSP can download. |
One submission's event trail¶
flowchart LR
C[submission.created] --> F[submission.files.attached]
F --> P[preconsult.checklist.passed]
P --> A[ai.compliance.report.ready]
F -->|if IFC| BV[bim.validation.completed]
BV --> BM[bim.metadata.extracted]
A --> WSA[workflow.step.assigned<br/>per ATD/ATL]
BM --> WSA
WSA -.SLA timer.-> WSB[workflow.sla.breaching]
WSA --> CP[comment.posted]
CP --> PS[perakuan.signed]
PS --> SI[sigl.certificate.issued]
Schema governance¶
- Event JSON Schemas live in
libs/events/alongside codegen for Python and TypeScript types. - Every producer is covered by Pact contract tests against its consumers; producer CI fails on breakage.
- Adding a field is additive; removing or renaming a field requires a new version (
*.v2) with both in flight until consumers migrate.
All events reach BigQuery
Every domain event (plus every auth event from core-svc) is subscribed
to a BigQuery sink for audit and analytics. Retention is 10 years; the
auditor-facing dataset is a restricted view. See
Observability.