Skip to content

fix(workspace-fork): scope and batch preview revisions - #7901

Merged
icecrasher321 merged 1 commit into
stagingfrom
codex/fix-fork-preview-scaling
Sep 17, 2026
Merged

icecrasher321 merged 1 commit into
stagingfrom
codex/fix-fork-preview-scaling

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Fork previews counted execution outputs and deleted uploads toward their resource limits, so execution history could block promotion even when few workspace files were selected. Reuse the active workspace file scope across fingerprints, copy planning, and reference resolution, and exclude runtime storage accounting from revisions.
  • Compute all revision aggregates in one database snapshot, reducing a sync revision from 40 SQL requests to one. Preserve resource limits, choice binding, and stale-preview rejection.
  • Add unit and PostgreSQL regressions, including more than 100,000 execution files, and run the database suite in CI. Existing background copy and sync execution stays shared.

Type of Change

  • Bug fix

Testing

  • 632 tests passed across 46 fork, reference, and API contract test files, including five real PostgreSQL regressions.
  • App type-check, repository lint, all 46 repository audits, block registry audit, and docs manifest check passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 17, 2026 12:25am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the revised file scope matches copyable resources, limits remain enforced, and no actionable regressions were identified.

Summary

This PR aligns fork revision fingerprints with the durable files that fork operations can actually copy and consolidates revision aggregation into one PostgreSQL statement.

  • Excludes execution files, deleted uploads, and runtime storage accounting from preview revisions.
  • Reuses one active-workspace-file predicate across revision, copy-planning, and reference-resolution paths.
  • Preserves per-category row and byte ceilings while reducing revision database round trips.
  • Adds unit and isolated PostgreSQL regressions, including execution-heavy workspaces, and runs the database regression in CI.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Preview[Fork preview] --> Scope[Active workspace-file scope]
    References[Reference resolution] --> Scope
    CopyPlan[Copy planning] --> Scope
    Scope --> Filter["workspace context<br/>not deleted<br/>source/target scoped"]
    Filter --> Revision[Single-statement revision aggregates]
    Revision --> Limits[Row and byte ceilings]
    Limits --> Fingerprint[Preview fingerprint]
    Fingerprint --> Freshness[Stale-preview validation]
    CopyPlan --> Apply[Apply fork]
    Apply --> Quota[Current storage quota checks]
    Apply --> Copy[Background file copy]
Loading

Reviews (1) · Last reviewed commit: "fix(workspace-fork): scope and batch pre..."

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit a730e59 into staging Sep 17, 2026
36 checks passed
@icecrasher321
icecrasher321 deleted the codex/fix-fork-preview-scaling branch September 17, 2026 00:32
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.

1 participant