Repository navigation
test(mcp_registry_e2e): drop the second workspace from the 401 hint test - #8455
Conversation
Un-tenanted workspaces in one process share TinyMCP's installs: the host binds module storage per tenant profile, and TinyMCP's bus provider answers the same ports for every data directory. The second workspace's service therefore boot-connected the first workspace's server and could record its own 401 hint before the status call, which failed the cross-workspace assertion intermittently in CI. The second fresh_workspace_config call also replaced the process storage backend before the first workspace wrote to it. Test one workspace; per-tenant isolation is covered by the storage host's module-scope tests.
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test(mcp_registry_e2e): drop the second workspace from the 401 hint test. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedThe test still enables the remote server, asserts connect is an error on 401, asserts auth_hint_for_config returns Some("credential_required"), and asserts last_error_for_config is None so the response text stays hidden. FeaturesNone identified with supported citations. Tests
FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Single-workspace 401 test tests/mcp_registry_e2e.rs |
The test name and comment describe its single-workspace scope. It retains the connection-failure, typed-hint, and hidden-error assertions, and removes the second workspace and its assertions. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- tinyhumansai/openhuman#7503: Adds the 401-detail coverage that this test narrows.
- tinyhumansai/openhuman#7646: Adds tenant-isolation tests referenced by the updated test comment.
- tinyhumansai/openhuman#8368: Changes workspace setup in the same end-to-end test.
Suggested labels: rust-core, priority: p3
Merge Risk: 
Minimal · up to bffd8
-
The narrowed test continues to validate the intended 401 behavior, with no merge-blocking risk identified.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit checks the 401 reply,
One workspace hops beneath the sky.
A typed hint lands, the error stays,
No second workspace joins the maze.
The test hops on its single way.
Comment @coderabbitai help to get the list of available commands.
Summary
mcp_registry_e2e's 401 test now uses one workspace. The second-workspace assertions that failed CI Fast intermittently (tests/mcp_registry_e2e.rs:154, e.g. run 40492517510 on fix(credentials): restore the API key when a sign-out fails after reload #8430) are dropped.auth_failure_surfaces_401_reason_as_a_typed_hint, since it no longer claims cross-workspace isolation.Problem
storage_host::current_module_scope→module_scope(profile, "tinymcp")).BusProvider::ports_foranswers the same ports for every data directory.connect_installed) connected A's enabled server, got the 401 and recordedcredential_requiredin B's own failures. The status call raced that connect, so the assertion failed intermittently, even with the test alone in its own nextest process.fresh_workspace_configcall replaced the process-wide storage backend (storage::install) before A wrote its server, so A's data landed in B's backend.Solution
fresh_workspace_configcall, so the backend the server is written to is the one the test reads.modules::storage_hostmodule_scopes_are_distinct_per_module_and_per_tenantanda_module_scope_is_the_explicit_contexts_profile_across_tasks. The test's doc comment points there.:65).Submission Checklist
Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check. No frontend change.pnpm typecheck. No frontend change.nextest --locked -p openhuman-cli --features "$CLI_FEATURES" --test mcp_registry_e2e --retries 0, the full target, run 20 times. Every run "2 tests run: 2 passed":auth_failure_surfaces_401_reason_as_a_typed_hint20/20,disabled_server_accepts_environment_update_without_reconnecting20/20.cargo fmt --all --checkclean.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit