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 — fix(logs, workflows): snapshot fetch optionality, restore consistent draft read snapshots by icecrasher321 · Pull Request #6594 · simstudioai/sim Conversation
Contributor
Summary
Type of Change
TestingTested manually Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
PR SummaryMedium Risk Overview
Draft Reviewed by Cursor Bugbot for commit 3125237. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Greptile SummaryThis PR avoids fetching unused execution snapshots for internal log details and restores consistent workflow-row and draft-state reads within one repeatable-read transaction.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified. The replacement log query preserves all fields used by log-detail responses, and every workflow snapshot caller supplies the canonical workspace while retaining authorization and active-workflow checks.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/logs/fetch-log-detail.ts | Replaces a broad shared query with a workspace-scoped query that retains consumed fields while avoiding unused snapshot and user joins. |
| apps/sim/lib/workflows/queries.ts | Extends repeatable-read snapshots with canonical workspace and active-workflow filtering. |
| apps/sim/lib/workflows/application/read-workflow-definition.ts | Returns draft metadata and normalized state from the same snapshot while leaving deployed reads on the deployment-state path. |
| apps/sim/lib/workflows/application/read-workflow.ts | Passes the canonical context workspace into the newly scoped snapshot query. |
| apps/sim/lib/logs/fetch-log-detail.test.ts | Verifies internal log details no longer fetch execution snapshots or workflow-owner data. |
| apps/sim/lib/workflows/application/read-workflow-definition.test.ts | Covers consistent draft snapshots, invalid snapshot records, and preservation of deployed-state behavior. |
sequenceDiagram
participant Caller
participant UseCase as Authorized workflow use case
participant Context as Context resolver
participant DB as PostgreSQL
Caller->>UseCase: Read draft workflow
UseCase->>Context: Resolve active workflow and workspace
Context->>DB: Load canonical active workflow
DB-->>Context: Workflow context
UseCase->>DB: Begin REPEATABLE READ snapshot
par Consistent draft state
DB->>DB: Load normalized workflow tables
and Consistent workflow metadata
DB->>DB: Load active workflow scoped by workspace
end
DB-->>UseCase: Workflow record and normalized state
UseCase-->>Caller: Consistent draft definition
Reviews (1): Last reviewed commit: "fix(workflows): restore consistent draft..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
3125237f
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.