[comp] Production Deploy
Merged
GI
4mo ago+2903+2903+0123456789012345678901234567890123456789-645-645-012345678901234567890123456789
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.
Summary by cubic
Adds ISMS document versioning and history (CS-701) and a read‑only GitHub App integration using an installation-based OAuth flow (CS-710). Ensures exports are audit-safe and approvals are serialized to prevent double‑publish.
-
New Features
- ISMS API:
GET /v1/isms/documents/:id/versionsfor history. Exports accept optionalversionIdand default to the current published artifact (draft only when never published). - Data model:
IsmsDocumentaddscurrentVersionId,draftNarrative, anddraftSnapshot. Approval freezes an immutable version with acontentSnapshot. Edits write to the draft and invalidate approval. - Export integrity: Per-version downloads serve the stored file or re-render from the immutable snapshot; never from live data. Default export serves the current published version when one exists.
- Concurrency safety: Approve/decline take a per-document advisory lock and atomically claim status to prevent double‑publish. All edits acquire the same lock via centralized approval invalidation. Control link add/remove now locks before writing so those mutations serialize with approve.
- UI: Version history with per-version PDF/DOCX download, accessible labels, and a clear “Published vN / editing creates a new draft” state. Fixes: legacy approvals respected without published versions; Scope form re-seeds when
draftNarrativechanges; minor banner formatting. - Integrations: New
github-appmanifest adds a fine‑grained, read‑only GitHub App connection. OAuth supportsappInstallFlow(start redirects to the App install URL withstateonly; GitHub ignoresredirect_uri). The legacygithubOAuth integration is unchanged. The install callback no longer persistsinstallation_id(unverified).
- ISMS API:
-
Migration
- Schema: updates
IsmsDocument/IsmsDocumentVersion; addsMember.publishedIsmsVersions. Legacy pre-version rows are dropped; existing approvals remain, and the next approval creates the first real published version. - No manual steps. Exports for never‑published docs render the current draft until the first approval. S3 uploads for retained artifacts are handled via
AttachmentsModule.
- Schema: updates