refactor(companion): remove app-specific server bridge - #5810
Open
RaresKeY wants to merge 4 commits into
Open
Conversation
RaresKeY
marked this pull request as ready for review
July 28, 2026 16:57
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
This replaces #5681, which GitHub closed during the repository transfer and fork-network separation. The branch has been rebuilt on the current dev history; the implementation scope is unchanged.
Remove the app-specific companion router, pairing flow, runtime package, and companion-only tests from core while preserving generic API tokens, chat/model APIs, webhooks, the responsive browser UI, PWA behavior, and unrelated 2FA QR support. Existing credentials are left to the normal operator token list/revocation path because stored API-token rows do not carry reliable companion provenance.
This is the final removal slice in #5674 and should merge only after the default-deny token capability boundary in #3149.
Depends on #5680, the focused implementation for #3149.
After that prerequisite merges, this branch must be rebased and its overlapping authentication and threat-model wording reconciled before merge, including removal of the now-retired Cookbook-scope reference.
Target branch
dev, notmain.Linked Issue
Fixes #5675
Part of #5674
Type of Change
Checklist
dev.How to Test
python -m pytest -q tests/test_app_route_registration.py tests/test_api_token_user_route_gate.py tests/test_session_owner_attribution.py tests/test_api_chat_security.py tests/test_null_owner_gates.py. The final isolated focused run passes all 57 tests.python -m pytest -q tests/test_task_scheduler_session_delivery.py. Both isolated scheduler regressions pass./api/companion/*route is registered and the pairing endpoint is unavailable./api/v1/chat,/api/models, Codex/Claude, webhook, responsive web/PWA, API-token CRUD, and 2FA QR behavior remain registered and covered.python -m pytest -q. The runtime-removal head completed with 4,633 passing and 5 skipped tests, versus 4,664 passing and 5 skipped on clean currentdev; the 31-test difference was exactly the removed companion-only suite. The final review follow-up adds five passing generic regression tests without changing runtime code. Both full runs have the same 12 runner/baseline failures: the omitted.env.example, one offline URL-join check, two backup-recovery checks, and eight offline web-fetch checks.Visual / UI changes — REQUIRED if you touched anything that renders
Not applicable. This removes an app-specific backend surface and tests; it does not change the responsive web UI.