fix: restore owner-scoped gateway startup - #1625
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the application's startup process and gateway behavior by enhancing error reporting in end-to-end tests and standardizing authentication and workspace scoping. It ensures that server startup failures provide more actionable feedback and that single-user gateways consistently operate within the defined owner scope, improving overall reliability and predictability. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR restores “owner-scoped” behavior for gateway startup and E2E harnessing, ensuring that durable state (workspace/routines) aligns to IRONCLAW_OWNER_ID while keeping GATEWAY_USER_ID as the sender/routing identity, and improving boot failure diagnostics in E2E tests.
Changes:
- Improve E2E startup failure handling to surface server stderr without being masked by process lookup errors.
- Re-scope gateway single-user auth to the durable owner scope while preserving sender/routing identity.
- Resolve the startup workspace (and memory tooling workspace) against
owner_idinstead of the gateway sender id.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/conftest.py | Adjusts subprocess shutdown behavior on startup timeout to better capture stderr. |
| src/main.rs | Applies owner-scope rebinding for single-user gateway at startup. |
| src/config/mod.rs | Resolves the startup workspace config using owner_id instead of gateway user_id. |
| src/channels/web/server.rs | Sets IncomingMessage.sender_id explicitly to preserve routing identity. |
| src/channels/web/mod.rs | Adds GatewayChannel::with_owner_scope() to rebind single-user auth identity. |
| src/app.rs | Uses owner_id for workspace initialization used by memory tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request refactors workspace and authentication logic to consistently use the owner_id for the base runtime workspace, particularly when multi-user tokens are not configured. This involves introducing a with_owner_scope method for GatewayChannel and applying it during initialization, as well as explicitly assigning a sender_id to incoming messages. Additionally, the end-to-end test fixtures have been improved for more robust process termination and error reporting. A review comment points out that the use of the unstable Rust let-chain feature in src/channels/web/mod.rs violates the project's Minimum Supported Rust Version (MSRV) compatibility goals and suggests refactoring it to a stable nested if statement.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…891955-fix # Conflicts: # tests/e2e/conftest.py
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* fix: restore owner-scoped gateway startup * fix: split gateway owner and sender scope * fix: keep multi-user gateway sender identity * test: cover gateway sender scope regression * test: harden e2e startup teardown race * fix: align gateway owner scope across auth modes
* fix: restore owner-scoped gateway startup * fix: split gateway owner and sender scope * fix: keep multi-user gateway sender identity * test: cover gateway sender scope regression * test: harden e2e startup teardown race * fix: align gateway owner scope across auth modes
Summary
ProcessLookupErrorGATEWAY_USER_IDas the sender/routing identityValidation