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(tools): bind schema-enrichment reads to executor delegations by waleedlatif1 · Pull Request #6593 · simstudioai/sim Conversation
Collaborator
Summary
Regression from #5273, which migrated the routes and the sibling call sites but missed these two. Type of Change
Testing
Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Two schema-enrichment callers still sent the deprecated legacy internal JWT to routes that moved onto delegation-only auth, so both 401'd and swallowed the failure: - tools/params.ts fetched a child workflow's input fields with an unsubjected buildAuthHeaders(), leaving the Agent block's workflow_executor inputMapping untyped so the model guessed the child's field names. - tools/schema-enrichers.ts fetched KB tag definitions the same way, which dropped the tags/tagFilters parameter from the knowledge tools entirely. Extract the executionId binding rule into executionScopeForTarget so the three enrichment call sites share one definition.
|
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
Extracts shared Reviewed by Cursor Bugbot for commit a939738. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Enrichment degrades silently by design, so the log line is the only signal a credential break leaves. Drain the body on the failure path too.
There was an error while loading. Please reload this page.
Greptile SummaryThe PR replaces legacy internal authentication on workflow and knowledge schema-enrichment reads with executor delegations bound to the acting subject. It also centralizes execution-scope selection and adds regression coverage for same-workflow, child-workflow, missing-context, and rejected-read behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/utils/delegation.ts | Introduces a focused helper that prevents a parent run ID from being asserted against a child-workflow delegation. |
| apps/sim/providers/utils.ts | Reuses the centralized execution-scope rule when fetching workflow metadata. |
| apps/sim/tools/params.ts | Uses the acting execution subject for delegated workflow reads and enriches workflow-executor input mappings with child input fields. |
| apps/sim/tools/schema-enrichers.ts | Migrates knowledge tag-definition enrichment to workflow-scoped executor delegation while retaining graceful fallback behavior. |
| apps/sim/executor/utils/delegation.test.ts | Covers same-workflow, child-workflow, inactive-run, and missing-workflow delegation scopes. |
| apps/sim/tools/params.test.ts | Verifies delegation claims and workflow input schema enrichment, including missing-subject and authorization-failure fallbacks. |
| apps/sim/tools/schema-enrichers.test.ts | Verifies knowledge tag enrichment uses the acting subject and appropriate workflow execution binding. |
sequenceDiagram
participant Exec as Workflow Executor
participant Tool as Tool Schema Enricher
participant Auth as Delegation Builder
participant API as Internal API
Exec->>Tool: Build schema with execution context
Tool->>Auth: subjectUserId + target workflow
alt Target is running workflow
Tool->>Auth: Include executionId
else Target is child workflow
Tool->>Auth: Omit parent executionId
end
Auth-->>Tool: Scoped delegation headers
Tool->>API: Read workflow or tag definitions
API-->>Tool: Authorized enrichment data
Tool-->>Exec: Enriched tool schema
Reviews (2): Last reviewed commit: "improvement(tools): surface tag-definiti..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
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.
✅ 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 a939738. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a939738c
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.