docs(policy): batch Vercel preview retention until release

Merged
QN
7d ago
+240-10

User description

Summary

Records a bounded, fail-closed exception so destructive Vercel Preview housekeeping can wait until the next sanctioned v* release reconciliation, performed by Codex CLI in the local VS Code/Ubuntu environment.

Until this record is on main, normal mode still applies. This pull request does not delete deployments, aliases, or rollback history, and it does not authorize Gate 7, the production storage-authority switch, a tag, or a publish.

Current head

3dd95dd982ccabb9e0d296c337928dca503893a5

Reviews of 4fd4d179 and 6e8784b6 are not an exact-head pass of this SHA. Sourcery is rate-limited (NO_SIGNAL, not a pass). Codex review of this head is requested and not yet a pass.

Bounds

  • MAX_BATCH_AGE = 14d
  • A non-protected Preview count of 24 or more starts the exceptional local Codex handoff
  • Gate 8 requires that read-only count before the next dependent repository mutation
  • An unavailable count stops the mutation and is not zero
  • The handoff does not restore per-merge destructive cleanup
  • The cycle ends only when the sanctioned release pass records BATCH_COMPLETE = YES

Exact-head disposition

FindingOpened onDisposition on 3dd95dd9
Placeholder FIRST_BATCH_PR4fd4d179#1020 recorded. Thread resolved.
Resource pressure4fd4d179Exceptional Codex handoff. Thread resolved.
Cycle completion4fd4d179BATCH_COMPLETE after the release pass. Thread resolved.
Source-only barrier4fd4d179Dependent repository mutation. Thread resolved.
Missing pre-mutation count6e8784b6Gate 8 read-only count; unavailable is not zero. Thread resolved.
Cap started only above 246e8784b6Inclusive: 24 or more. Thread resolved.

Test plan

  • pnpm exec vitest run tests/unit/vercelRetentionTrainPolicy.test.ts (6 passed)
  • Do not merge until exact-head CI, CodeRabbit, and Codex on 3dd95dd9 are dispositioned
Open in Web Open in Cursor 

Summary by Sourcery

Document a bounded release-batched exception for Vercel Preview retention while preserving per-merge production validation and maintainer-controlled release gates.

Enhancements:

  • Document a bounded, fail-closed release-batched Vercel Preview retention mode that defers destructive housekeeping until a sanctioned release reconciliation, with mandatory production safeguards and exceptional handoff limits.

Documentation:

  • Synchronize the release-batched retention policy across operational, deployment, CI/merge, agent, changelog, and README documentation.

Tests:

  • Add policy assertions covering release-batched retention bounds, ownership, safeguards, and completion requirements.

Summary by cubic

Records a bounded release-batched exception in the Vercel Preview retention policy so destructive preview housekeeping can wait until the next sanctioned v* release reconciliation by Codex CLI on the local VS Code/Ubuntu environment.

  • Deferral is capped at 14 days or 24 non-protected Preview deployments; either cap, or provider resource pressure, stops dependent repository mutation until a single local Codex CLI pass is recorded. A read-only Preview count is now mandatory before the next mutation, and an unavailable or contradictory count stops mutation rather than implying zero. The pass does not restore per-merge cleanup, and the cycle ends only after the release pass.
  • Adds the complete mode record (RETENTION_MODE, BASELINE_MAIN, GATE_7, FIRST_BATCH_PR = #1020, etc.) with mandatory per-merge gates to docs/VERCEL-PREVIEW-RETENTION-POLICY.md; AGENTS.md, CHANGELOG.md, and the other docs mirror the same statement.
  • The mode is inert until on main; it authorizes no deletions, Gate 7, the production storage-authority switch, tag, or publish.
  • Adds one Vitest case asserting the new policy record, including the mandatory preview count gate, and syncs the README test counts.

CodeAnt-AI Description

Defer destructive Vercel Preview cleanup until the next sanctioned release

What Changed

  • Allows destructive Preview housekeeping to wait until the next sanctioned v* release reconciliation.
  • Reserves cleanup and release publishing for Codex CLI in a local environment; Cursor Cloud cannot delete deployments or aliases.
  • Keeps per-merge production checks mandatory and protects Production deployments, rollback history, active-PR previews, and unknown metadata.
  • The exception applies only after its policy is on main; otherwise, the full reconciliation remains required.

Impact

✅ Fewer between-release Preview cleanup runs
✅ Production and rollback deployments stay protected
✅ Per-merge production checks remain required

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Documentation
    • Updated deployment and merge guidance to document an optional mode that batches Preview deployment cleanup with a sanctioned release reconciliation.
    • Clarified that required production and CI checks continue after each merge, while exceptional cleanup is required if retention limits or provider conditions demand it.
    • Updated repository test-count references.