Repository navigation
feat(mothership): expose owner entitlements to the workbench as SIM_ENTITLEMENTS - #10218
Merged
Merged
Conversation
…NTITLEMENTS The worker's workbench bootstrap reads SIM_ENTITLEMENTS so entitlement-gated CLI commands (workflows/workspaces source on workflow-code) appear in the workbench terminal. buildMothershipSandboxSession now takes the execution's principal and computes the turn owner's entitlements fresh per execution, in parallel with the scoped endpoint. Visibility only: gated use cases still re-check their flags, and a failed read omits the variable.
…s flagged by biome
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The change affects entitlement-based command visibility in Mothership workbench sessions. Fix the principal passed to the entitlement checks before merging. Findings
SummaryAdds fresh owner entitlements to the workbench environment as
Workspace chats still lose all entitlements because the execution principal is not accepted by the availability checks. Reviews (1) · Last reviewed commit: "chore(workspace-source): drop unused imp..." · Reviewed by Greptile |
… delegation The Function execution's Copilot delegation is scoped to sim:function-executions, which the availability use cases refuse, so workspace chats never got SIM_ENTITLEMENTS. Re-scope the execution's own delegation (same actor, chat and delegation id, no longer lifetime) to sim:workspaces through the existing trusted Copilot principal helpers before computing entitlements; non-Copilot principals get none. Adds real-Postgres coverage through the real availability use cases.
This branch was previously deployed
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
SIM_ENTITLEMENTS(comma-separated) from the turn owner's entitlements, computed fresh on every execution. The worker's workbench bootstrap reads it (simstudioai/mothership#986), so a turn grantedworkflow-codecan runsim workflows source */sim workspaces source *in the workbench terminal. With no grant, or if the lookup fails, the variable is omitted and the execution continues; enforcement is unchanged (the source use cases re-check the flag).Type of Change
Testing
sandbox-session.test.ts: per-execution values, the org-chat owner, and omission when nothing is granted or the lookup throws. The value tests fail with the source change reverted; the throw test fails with the guard removed. Withexecute-request.test.ts: 142/142.check:audits, biome.Checklist