Document internal component contracts

This commit is contained in:
2026-05-31 04:06:48 +00:00
parent eac73a79a1
commit 93c22884b0
8 changed files with 225 additions and 5 deletions

View File

@@ -4,10 +4,32 @@
`internal/notify` defines the internal notification interface used by the application runner.
## Inputs and outputs
Input is a notification event containing pipeline id, destination id, bundle id, bundle path, action, and output metadata. The interface returns an error so app orchestration can treat notification failures as destination failures.
## Current behavior
The implemented notifier is a no-op. It is invoked only after a successful publish or replacement. Dry-run, skipped destinations, and failed destinations do not invoke it.
## Failure behavior
`notify.Noop` always succeeds unless the context is already canceled. If a configured notifier returns an error, `internal/app` records that destination as failed and continues with remaining destinations.
## Boundaries
No external notification adapters are implemented. Notification configuration is not part of the current user-facing config schema.
External notification adapters and user-facing notification configuration are outside current behavior.
## Tests
Before changing notification behavior, inspect:
- `internal/notify`
- `internal/app/run_test.go`
## Invariants
- Notifications are emitted only after successful publish or replacement execution.
- Dry-run never notifies.
- Skipped and failed destinations never notify.
- The default app notifier is `notify.Noop`.