GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Revert "improvement(db): add session statement/lock timeouts; simplif… by TheodoreSpeaks · Pull Request #4599 · simstudioai/sim Conversation
Contributor
SummaryForgot pg lock didn't work with pscale. Reverting. Type of Change
Testing
Checklist
Screenshots/Videos
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR SummaryMedium Risk Overview Reworks knowledge-base document creation ( Removes the per-transaction Reviewed by Cursor Bugbot for commit 32d5dc4. Bugbot is set up for automated code reviews on this repo. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Greptile SummaryThis PR reverts the previous "improvement(db)" commit that added PostgreSQL-specific session-level
Confidence Score: 4/5Safe to merge once the missing The revert is clean and consistent across all four files. The only uncertainty is whether the apps/sim/lib/knowledge/documents/service.ts — verify Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant service.ts
participant DB as DB (transaction)
Note over service.ts, DB: createDocumentRecords / createSingleDocument (reverted)
Caller->>service.ts: createDocumentRecords(docs, kbId)
service.ts->>DB: BEGIN TRANSACTION
service.ts->>DB: "SELECT 1 FROM knowledge_base WHERE id=kbId FOR UPDATE"
service.ts->>DB: "SELECT id FROM knowledge_base WHERE id=kbId AND deleted_at IS NULL"
alt KB not found / soft-deleted
DB-->>service.ts: []
service.ts-->>Caller: throw Error("Knowledge base not found")
else KB alive
service.ts->>DB: INSERT INTO document VALUES (...)
service.ts->>DB: "UPDATE knowledge_base SET updated_at=now"
DB-->>service.ts: COMMIT
service.ts-->>Caller: DocumentData[]
end
Reviews (1): Last reviewed commit: "Revert "improvement(db): add session sta..." | Re-trigger Greptile |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1430,21 +1307,31 @@ export async function createSingleDocument( | |||
| chunkCount: 0, | |||
| tokenCount: 0, | |||
| characterCount: 0, | |||
| processingStatus: 'pending', | |||
| enabled: true, | |||
| uploadedAt: now, | |||
| ...processedTags, | |||
| } | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Missing
processingStatus in createSingleDocument
createDocumentRecords explicitly sets processingStatus: 'pending' as const, but createSingleDocument no longer does after this revert — ...processedTags only carries tag/number/date/boolean fields. If the document table column lacks a DEFAULT 'pending' at the DB level, every single-document insert will fail with a NOT NULL violation. Worth verifying the schema default exists, or restoring the explicit field here for symmetry.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 32d5dc4. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| const newDocument: NewDocumentRow = { | ||
| const newDocument = { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
processingStatus in single document creation pathLow Severity
The createSingleDocument function no longer sets processingStatus: 'pending' in its newDocument object (lines 1300–1313), while the bulk createDocumentRecords path still explicitly includes processingStatus: 'pending' as const (line 816). The database column has a DEFAULT 'pending' so the insert succeeds, but the two code paths are now inconsistent — and the object returned to API callers from the single-document path will be missing the processingStatus property in the JSON response.
Reviewed by Cursor Bugbot for commit 32d5dc4. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Lets do a full revert ill follow up after.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
32d5dc46
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.