fix(files): uniquify materialized upload names - #6273
Open
j15z wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryCursor Bugbot is generating a summary for commit 26e6206. Configure here. |
Contributor
Greptile SummaryThis PR makes upload materialization allocate an unused root-level workspace filename and preserves the selected name across persisted metadata and replay responses.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/tools/handlers/materialize-file.ts | Adds unique root-name allocation, targeted collision retries, synchronized persisted names, and replay lookup without an eligible follow-up defect. |
| apps/sim/lib/copilot/tools/handlers/materialize-file.test.ts | Expands coverage for allocation, collision handling, bounded retries, storage accounting, and replay outcomes. |
Sequence Diagram
sequenceDiagram
participant C as Materialize caller
participant A as Name allocator
participant DB as PostgreSQL
C->>A: Allocate root-level filename
A->>DB: Check available names
A-->>C: Candidate filename
C->>DB: Transition upload in transaction
alt Filename collision
DB-->>C: Targeted unique violation
C->>A: Allocate again
else Transition succeeds
DB-->>C: Materialized workspace file
else Transition already completed
C->>DB: Read current workspace file
DB-->>C: Replayed file metadata
end
Reviews (2): Last reviewed commit: "fix(files): sync materialized display na..." | Re-trigger Greptile
Collaborator
Author
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 902de3f. Configure here.
j15z
force-pushed
the
fix/mship-materialize-name-collision
branch
from
August 5, 2026 01:54
902de3f to
bbf7a55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Checklist