2.1 KiB
2.1 KiB
Backend Handoff Checklist: Governance Install and Activation
This checklist maps launcher-governance install behavior to backend requirements.
Required Endpoints
POST /governance/install/tokenPOST /governance/install/confirmGET /governance/install/statusPOST /governance/lease/heartbeatPOST /governance/lease/offline-renew
Contract Source
docs/api/governance-installer.openapi.yamldocs/api/examples/governance-installer.examples.md- Runtime implementation target:
web/backend/secretapi
Required Gate Behavior
- Install token issuance requires active membership.
- Install token issuance requires active governance entitlement.
- Confirm path must validate package hash and runtime version against issued token.
- Status must fail closed when entitlement state is unknown.
- Install token issuance must fail closed on org boundary mismatch.
availability_state=parkedmust block token issuance and activation.- Install/update control actions require principal role
org_root_owner.
Persistence Requirements
- Install token issuance record with expiry.
- Package metadata snapshot bound to install token.
- Confirm event record with wallet, device_id, entitlement_id, package hash.
- Activation state record and immutable evidence receipt hash.
Security Requirements
- Install token TTL enforcement.
- Wallet/session matching on all requests.
- Idempotent confirm by install token + device + package hash.
- Reject stale or replayed install confirmations.
Observability Requirements
- Metrics for token issuance success/fail.
- Metrics for confirm success/fail.
- Metrics for activation blocked by membership/entitlement.
- Metrics for activation blocked by boundary mismatch or parked availability.
- Correlation IDs for all state transitions.
Done Criteria
- Launcher can install governance only when entitlement is active.
- Runtime cannot activate if package signature/hash checks fail.
governance_activestatus is deterministic and auditable.- API implementation matches OpenAPI contract.
- Non-owner (
workspace_member) install-token requests are rejected deterministically.