Skip to content

docs(ops): formalize production promotion protocol with lockdown test#338

Open
ctol3r wants to merge 1 commit into
mainfrom
wave/production-promotion-protocol
Open

docs(ops): formalize production promotion protocol with lockdown test#338
ctol3r wants to merge 1 commit into
mainfrom
wave/production-promotion-protocol

Conversation

@ctol3r
Copy link
Copy Markdown
Owner

@ctol3r ctol3r commented May 12, 2026

Summary

Adds docs/ops/production-promotion-protocol.md — the operational answer to the recurring "verify production" brief pattern. With 33 PRs (#305#337) open against main, there has been no single authoritative reference for how to promote them safely. This doc closes that gap.

Documents:

  • 7-gate verification flow: env vars present → runtime channel matches target → Clerk auth operational → trust endpoints reachable → replay attribution wired → audit durability operational → Codex SAFE verdicts
  • 4-phase merge order for the open queue, with Phase 4 explicitly flagged as DB-dependent (prisma migrate dev gated by feat(backend): DURABILITY-1 PR345A durable schema additions #319)
  • Required env vars table per runtime channel (local_dev / operator_preview / staging / production)
  • Concrete verification commands (curl /api/health, curl /.well-known/jwks.json, curl /api/receipts/verify, pg_dump, generate-signing-keypair.mjs, check-onboarding-readiness.sh)
  • Rollback path + closing-the-rephrasing-pattern section

A lockdown test (apps/web/__tests__/production-promotion-protocol.test.ts, 78 cases) pins every artifact reference against actual source so the doc can't drift:

Truth rules

  • Doc does NOT claim automation of verification, instant credentialing, compliance certification, or risk transfer.
  • 7th gate explicitly warns against bypassing Codex SAFE with --admin.
  • Status of unmerged PRs framed as "open / awaiting gate", never "shipped".

Validation

  • Targeted vitest: 78/78 passing
  • Truth-contract scan: CLEAN
  • Build: docs/test-only PR, no product code touched

Scope

  • docs/ops/production-promotion-protocol.md (new)
  • apps/web/__tests__/production-promotion-protocol.test.ts (new)

No apps/web/{app,lib,components} source changes.

Adds docs/ops/production-promotion-protocol.md — the operational answer
to the recurring "verify production" brief pattern. Documents:

- 7-gate verification flow (env vars / runtime channel / Clerk /
  trust endpoints / replay attribution / audit durability / Codex SAFE)
- 4-phase merge order for the open PR queue (#305-#337), with Phase 4
  flagged as DB-dependent (prisma migrate dev gated by #319)
- Required env vars table per runtime channel
  (local_dev / operator_preview / staging / production)
- Concrete verification commands (curl, pg_dump, generate-signing-keypair,
  check-onboarding-readiness)
- Rollback path + closing-the-rephrasing-pattern section

Lockdown test (apps/web/__tests__/production-promotion-protocol.test.ts,
78 cases) pins every artifact reference against actual source so the
doc can't drift: referenced files exist, every PR number appears, all
7 gate headings present, all 4 phases documented, env var table
complete, banned-strings clean.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vcv-web Ready Ready Preview, Comment May 12, 2026 3:18am
vitalcv Ready Ready Preview, Comment May 12, 2026 3:18am

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3929009cf1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +23 to +30
const REFERENCED_FILES = [
'apps/web/lib/env.ts',
'apps/web/lib/auth/clerkConfig.ts',
'apps/web/middleware.ts',
'apps/web/app/api/.well-known/jwks.json/route.ts',
'apps/web/app/api/receipts/verify/route.ts',
'apps/api/backend/prisma/schema.prisma',
] as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expand artifact-existence lockdown to all referenced sources

REFERENCED_FILES only validates 6 paths, but the protocol doc’s “Authoritative-source” and command sections reference many additional concrete artifacts (for example backup/onboarding scripts and status-route docs). Because those paths are not included here, the claimed “pins every artifact reference” guarantee is false and the doc can silently drift to broken file references without any test failure.

Useful? React with 👍 / 👎.

Comment on lines +43 to +46
305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
332, 333, 334, 335, 336, 337,
];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include PR #331 in the enforced PR coverage list

This suite states that every PR from #305 to #337 must be referenced, but the enforced PR_NUMBERS array skips 331. That gap means the protocol can omit one PR in the declared range and still pass the lockdown test, weakening the completeness check this test is meant to provide.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants