Skip to content

feat(ui-bridge): retire the UI-owned stdio bridge - #2834

Merged
namastex888 merged 2 commits into
devfrom
chore/retire-ui-bridge
Aug 30, 2026
Merged

namastex888 merged 2 commits into
devfrom
chore/retire-ui-bridge

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

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 terms genie mcp was 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.

$ genie ui-bridge
Error: genie ui-bridge has been retired; the Orca integration is the supported UI surface, or roll back to a pre-retirement signed release.
$ echo $?
1

22 files changed, 86 insertions(+), 4388 deletions(-).

Removed

File LOC
src/lib/v5/mcp-server.ts + .test.ts 390 + 269
src/lib/v5/mcp-tools.ts + .test.ts 1126 + 1313
src/lib/v5/bridge-watcher.ts + .test.ts 139 + 173
src/lib/v5/UI-BRIDGE.md 152
src/term-commands/ui-bridge.ts 295 → 14, .test.ts 486 → 47 −720

Nothing outside that set imported them. src/lib/v5/authority-barriers.test.ts was the one external consumer (openReadonlyDb from mcp-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: listWishSlugs and WishGroupRow in task-state.ts. The SessionStart hook bundle keeps its own listKnownSlugs, so branch resolution is unaffected. knip.json also drops ss from ignoreBinaries — it was there only for the old "the bridge never opens a socket" test.

Kept, and why

  • openWithWalIndexRecovery and its lock machinery in sqlite-open.ts. Its only caller was tryWriteOpen in mcp-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 / listHires in task-state.ts. The bridge was their only shipped writer, but hire_roster rows are still part of genie task export/import state (roadmap sync excludes them as machine-local) and v5-task.test.ts seeds through them. Section comment updated to record that the writer is gone.

Reference cleanup

  • src/lib/interactivity.ts — ui-bridge stays in the workspace-gate bypass set for the same reason mcp does: 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-bridge dropped from REQUIRED_V5_COMMANDS, matching mcp's absence: a retirement stub is not the shipping surface.
  • Stale prose in identity.ts, resolve-wish-branch.ts, genie-db.test.ts, sqlite-open.test.ts that pointed at the deleted modules.
  • .genie/INDEX.md and .genie/roadmap.json mention genie-ui-bridge only as SHIPPED historical ledger entries, so they are untouched. grep over skills/, plugins/, scripts/ and docs/ found no ui-bridge references 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 — clean
  • bun run lint — exit 0, 3 pre-existing complexity warnings (doctorCommand 37, parseJsonRejectingDuplicateKeys 29, codexPluginSurfaceChecks 27), unchanged from baseline
  • bun 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 intact
  • bun run lint:hook-content — hook-content-binding: OK
  • bun run build — bundles 305 modules

Targeted tests (the full suite OOMs on this box):

File Result
src/term-commands/ui-bridge.test.ts, mcp.test.ts, src/__tests__/claude-md-drift.test.ts, src/lib/v5/resolve-wish-branch.test.ts 40 pass / 0 fail
src/lib/v5/authority-barriers.test.ts, src/lib/v5/task-state.test.ts 125 pass / 0 fail
src/lib/v5/sqlite-open.test.ts, src/lib/v5/genie-db.test.ts 39 pass / 0 fail
src/term-commands/v5-task.test.ts 76 pass / 0 fail
scripts/release-docs.test.ts 44 pass / 0 fail

The new ui-bridge.test.ts mirrors mcp.test.ts and adds one assertion the MCP stub does not have: run in an empty tmpdir with a fresh GENIE_HOME, the command must leave the directory completely empty — no .genie/, no database.

🤖 Generated with Claude Code

https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3

@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 24b0f63a-a5b0-4a88-b6cb-2fbfce17698b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T01:29:46.359755Z b2661cd PR opened
ℹ️ 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" or "@codex security review".

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
@namastex888
namastex888 force-pushed the chore/retire-ui-bridge branch from b2661cd to 7178bfe Compare August 30, 2026 01:28
…bridge retirement

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/lib/v5/sqlite-open.ts
Comment on lines +229 to +231
// 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@namastex888
namastex888 merged commit f45d634 into dev Aug 30, 2026
18 checks passed
@namastex888
namastex888 deleted the chore/retire-ui-bridge branch August 30, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant