Repository navigation
feat(ui-bridge): retire the UI-owned stdio bridge - #2834
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
There is no separate Genie UI any more — the Orca integration is the only UI surface — so the bridge built for it is retired on exactly the terms `genie mcp` was (#2820): `genie ui-bridge` is a stub that writes a stable diagnostic to stderr and exits 1, and everything that existed only behind it is deleted. Removed (4,088 LOC): - src/lib/v5/mcp-server.ts + test (shared newline-JSON-RPC transport loop) - src/lib/v5/mcp-tools.ts + test (tool registry + readonly/degraded/write opens) - src/lib/v5/bridge-watcher.ts + test (change watcher + ppid backstop) - src/lib/v5/UI-BRIDGE.md (the bridge protocol contract) - task-state.ts `listWishSlugs` / `WishGroupRow` — consumed only by the retired board tool; the hook bundle keeps its own `listKnownSlugs` Kept: sqlite-open.ts's `openWithWalIndexRecovery` and the hire-roster accessors. Both now have no shipped caller, but the recovery helper is the opt-in seam for any future single-owner writer (and is tested directly), and hire rows remain part of exported/imported board state. Their comments now say so instead of pointing at deleted modules. `ui-bridge` stays in the interactivity workspace-gate bypass set for the same reason `mcp` does: the legacy gate must not exit 2 and mask the retirement diagnostic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3
b2661cd to
7178bfe
Compare
…bridge retirement Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2661cd184
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // writes the header. That component was the retired MCP/ui-bridge server pair, | ||
| // so today NO shipped path creates the poison and NO shipped path calls the | ||
| // recovery below (see {@link openWithWalIndexRecovery}). The scoping contract is |
There was a problem hiding this comment.
Remove the newly dead WAL recovery machinery
Because this commit deletes mcp-tools.ts and its tryWriteOpen caller, these lines confirm that no shipped path calls this recovery code or creates the condition it handles; only its tests now exercise the cross-process lock and recovery implementation. Retaining substantial stateful machinery solely as a seam for a hypothetical future writer violates the repository's KISS release gate, so delete the recovery implementation/export and its tests along with the last caller, or identify a present contractual consumer.
AGENTS.md reference: AGENTS.md:L27-L30
Useful? React with 👍 / 👎.
Summary
The user confirmed there is no Genie UI any more — the only "UI" is the Orca integration. So
genie ui-bridge, the stdio bridge built for the separate-repo dash fork, is retired on exactly the termsgenie mcpwas in #2820: the command becomes a stub that writes a stable diagnostic to stderr and exits 1, and everything that existed only behind it is deleted.22 files changed, 86 insertions(+), 4388 deletions(-).
Removed
src/lib/v5/mcp-server.ts+.test.tssrc/lib/v5/mcp-tools.ts+.test.tssrc/lib/v5/bridge-watcher.ts+.test.tssrc/lib/v5/UI-BRIDGE.mdsrc/term-commands/ui-bridge.ts295 → 14,.test.ts486 → 47Nothing outside that set imported them.
src/lib/v5/authority-barriers.test.tswas the one external consumer (openReadonlyDbfrommcp-tools.ts); its two assertions are dropped because the surviving readonly open,openReadonlyHandle, is asserted on the same line of the same tests — the barrier keeps identical coverage.Two exports went dead with the tool registry and were removed too:
listWishSlugsandWishGroupRowintask-state.ts. The SessionStart hook bundle keeps its ownlistKnownSlugs, so branch resolution is unaffected.knip.jsonalso dropsssfromignoreBinaries— it was there only for the old "the bridge never opens a socket" test.Kept, and why
openWithWalIndexRecoveryand its lock machinery insqlite-open.ts. Its only caller wastryWriteOpeninmcp-tools.ts, and with that gone the component that creates the poisoned WAL index is gone too — so no shipped path calls it and no shipped path needs it. It stays because it is a ~250-line hardened cross-process-locked recovery seam with its own direct test suite, and it is the documented opt-in for any future single-owner writer that reintroduces a degraded read-only session. Its comments now say exactly that instead of pointing at deleted files. Removing it is a clean follow-up if reviewers prefer.hireAgent/unhireAgent/getHire/listHiresintask-state.ts. The bridge was their only shipped writer, buthire_rosterrows are still part ofgenie task export/importstate (roadmap sync excludes them as machine-local) andv5-task.test.tsseeds through them. Section comment updated to record that the writer is gone.Reference cleanup
src/lib/interactivity.ts—ui-bridgestays in the workspace-gate bypass set for the same reasonmcpdoes: the legacy gate must not exit 2 and mask the retirement diagnostic. Comment rewritten.CLAUDE.md— CLI table row now reads "Retired"; the "product MCP server … is retired" gotcha now says the UI bridge is retired too rather than "is a separate private stdio bridge and is NOT the retired product integration".README.md— command table row and the MCP-retirement section.src/__tests__/claude-md-drift.test.ts—ui-bridgedropped fromREQUIRED_V5_COMMANDS, matchingmcp's absence: a retirement stub is not the shipping surface.identity.ts,resolve-wish-branch.ts,genie-db.test.ts,sqlite-open.test.tsthat pointed at the deleted modules..genie/INDEX.mdand.genie/roadmap.jsonmentiongenie-ui-bridgeonly as SHIPPED historical ledger entries, so they are untouched.grepoverskills/,plugins/,scripts/anddocs/found noui-bridgereferences at all — nothing to report in the docs submodule.Conflict note
The open PR fix/orca-mode-guards edits
src/term-commands/ui-bridge.ts's Orca-mode error path. That work is superseded by this deletion — the stub opens no database, so there is no Orca-mode barrier left to guard on this path. Whichever lands second will need a trivial conflict resolution in favour of the stub.Evidence
Run in a clean worktree off
origin/dev(a13384ea0),umask 022:bun run typecheck— cleanbun run lint— exit 0, 3 pre-existing complexity warnings (doctorCommand37,parseJsonRejectingDuplicateKeys29,codexPluginSurfaceChecks27), unchanged from baselinebun run dead-code— clean (baseline was clean; the two new knip findings this change surfaced were fixed by deleting the dead exports, not by ignoring them)bun run lint:complexity-budget—OK: budget intactbun run lint:hook-content—hook-content-binding: OKbun run build— bundles 305 modulesTargeted tests (the full suite OOMs on this box):
src/term-commands/ui-bridge.test.ts,mcp.test.ts,src/__tests__/claude-md-drift.test.ts,src/lib/v5/resolve-wish-branch.test.tssrc/lib/v5/authority-barriers.test.ts,src/lib/v5/task-state.test.tssrc/lib/v5/sqlite-open.test.ts,src/lib/v5/genie-db.test.tssrc/term-commands/v5-task.test.tsscripts/release-docs.test.tsThe new
ui-bridge.test.tsmirrorsmcp.test.tsand adds one assertion the MCP stub does not have: run in an empty tmpdir with a freshGENIE_HOME, the command must leave the directory completely empty — no.genie/, no database.🤖 Generated with Claude Code
https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3