59 lines
5.2 KiB
Markdown
59 lines
5.2 KiB
Markdown
# ADR-0005: Prospective Notification Delivery
|
|
|
|
Status: Accepted
|
|
|
|
Date: 2026-08-16
|
|
|
|
Decision authority: Creator continuation after the explicit `ARCH-000005` acceptance request
|
|
|
|
## Context
|
|
|
|
Domovoy has a durable Commit/Executor safety path, but no accepted operation that crosses the Assistant canonical-state boundary. `ARCH-000005` compared alternatives and proposed a typed notification about one Creator-owned `ProspectiveItem`. The Creator accepted that recommendation and selected local Windows notification display as the first channel.
|
|
|
|
## Decision
|
|
|
|
1. The first external operation is `deliver-prospective-notification-v1` under capability `prospective-notification-delivery`.
|
|
2. The subject is one Creator-owned `ProspectiveItem` at an expected revision in `DELIVERED`; delivery does not change Continuity state and does not prove reading, satisfaction, or commitment fulfilment.
|
|
3. The Creator client supplies only the item, expected revision, live Work target, and explicit confirmation. The server derives authority, operation, binding, destination, template, body, and action identities.
|
|
4. Capability owns a versioned, owner-local `CapabilityBinding`. Commit records its ID and revision; secrets remain external references and bytes are available only to the relevant adapters.
|
|
5. Commit/Executor is the only Assistant component permitted to issue the mutating delivery request. It uses the fixed HTTPS destination and receipt paths from the active binding, disables redirects, and accepts only bounded typed responses.
|
|
6. Delivery uses `PUT <delivery-path>/<ActionIntentID>`. Same intent and digest returns the original receipt; a different digest is an integrity conflict. Read-only reconciliation uses `GET <receipt-path>/<ActionIntentID>`.
|
|
7. Ambiguous send outcomes become `UNKNOWN_OUTCOME`; they are never blindly retried. Reconciliation compares the durable request digest with the external receipt.
|
|
8. The initial destination is a dedicated receipt receiver deployed on `docker-prod`, exposed through the existing `https://assistent.cin.su` origin. It has no access to Assistant canonical databases and persists immutable external receipts in its own durable volume.
|
|
9. The destination uses separate credentials for Commit write/reconciliation and Windows read access. Credentials are generated and stored outside Git, database rows, images, logs, browser storage, and cognitive context.
|
|
10. A current-user Windows agent reads accepted receipts, shows local operating-system notifications, and keeps only local projection state needed to avoid redisplay. Receiver acceptance is the Commit outcome; operating-system display and human reading are explicitly outside that outcome.
|
|
11. Binding retirement blocks new sends while preserving bounded reconciliation for historical actions. Secret rotation creates a new secret version and binding revision without rewriting history.
|
|
12. `docker-test` is prohibited for implementation, verification, and deployment of this capability.
|
|
|
|
## Rationale
|
|
|
|
The operation adds useful external behavior without introducing arbitrary webhooks, provider payloads, SSRF-controlled destinations, or provider-specific semantics. A compatible receiver makes duplicate prevention and read-only reconciliation testable. Separating the receipt outcome from Windows display keeps Commit evidence honest while permitting eventual local delivery when the workstation is available.
|
|
|
|
## Consequences
|
|
|
|
- Capability binding lifecycle and persistence must be implemented before authorization can succeed.
|
|
- Commit requires a typed notification envelope and durable digest evidence in addition to the existing Continuity transition envelope.
|
|
- The receiver and Windows reader are adapters, not owners of Continuity or Commit canonical state.
|
|
- A receiver outage or ambiguous response cannot trigger an automatic duplicate send.
|
|
- The receiver requires durable backup/retention and operational health checks; local Windows projection loss may cause redisplay but cannot cause a second external receipt.
|
|
- No new cross-module dependency or canonical owner is introduced; existing registry permissions are sufficient.
|
|
|
|
## Validity conditions
|
|
|
|
- Owner, Work justification, Authority grant, expected Prospective revision, and exact binding revision are validated before Commit execution.
|
|
- Receiver receipt identity and digest are stable and queryable by `ActionIntentID`.
|
|
- Only the isolated Executor can read the write credential.
|
|
- Windows read access cannot create or alter receipts.
|
|
- Tests cover hostile input, duplicate intents, digest conflicts, lost acknowledgement, restart recovery, retirement, and rotation.
|
|
|
|
## Revisit triggers
|
|
|
|
- A provider cannot implement authoritative idempotency and read-only receipt lookup.
|
|
- Notification content requires Artifact payload ownership rather than the bounded V1 template.
|
|
- A requirement appears to prove operating-system display or human reading.
|
|
- Multi-recipient routing, arbitrary templates, or another provider/channel is requested.
|
|
|
|
## Migration and rollback
|
|
|
|
Implementation is additive. Rollback retires the binding, revokes both external credentials, stops the Windows agent and receiver, and preserves Commit attempts plus receiver receipts for audit and reconciliation. Existing internal Continuity actions remain unchanged.
|