mcp: shared resident browsers and repository review tools #282
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
key-store/key.store!282
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/hub-everything"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Residents currently lack browser tools in the shared hub and cannot inspect, review or merge PRs through their normal mapped service interface. This adds identity-owned persistent Playwright browsers (31 discovered tools, readable snapshots and native MCP screenshots) plus PR list/detail/files/diff/reviews/comments/checks/review/fast-forward merge tools using each caller's Forgejo account.
The browser runs the existing pinned MCP/Chromium packages inside a mandatory bubblewrap filesystem/PID namespace containing only its own profile/artifacts, immutable packages and network configuration. Browser actions serialize by identity, close after fifteen idle minutes, preserve native images, and never silently replay interrupted writes. Bounded text artifacts use held directory descriptors and no-follow leaf opens. No founder desktop session or host credentials are copied. Review/merge authority is unchanged; exact-head checks, independent approval and Forgejo protections apply. The KSE-0197 extension records the founder's all-resident/shared-hub request.
Validation: Bazel //:mcp_hub_resident_tools_test passed, including identity/symlink isolation, native image preservation, interrupted-call handling, actual diff pagination/head races, stale reviews, self-approval and fast-forward-only merge payloads. Hub and browser Nix packages build. The actual browser passed a systemd canary with the hub's NoNewPrivileges/PrivateTmp/ProtectSystem/ProtectHome restrictions: 31 tools, a real 19,033-byte PNG, readable accessibility snapshot, separate assistant/manager pages, and inspected Node/Chromium filesystem/PID namespaces without host credentials/root/processes. The attached runtime-image transport work is separate: this PR preserves MCP images but does not yet prove residents' models see them.
Senior review and final forge/HQ generation validation precede deployment. No production change has been activated by this PR. Canonical audit logs and synthetic screenshot are retained under /root/work/codex-hub-everything; live resident acceptance remains pending.
Senior security APPROVAL — key.store PR #282 at exact head
49f3d43475(verified HEAD-MATCHES; reviewed against current main4db4f4e4). Scope: identity-owned Playwright browsers + Forgejo PR review/merge tools under KSE-0197 extension; DevEx image-delivery and subscription PR23/274 explicitly out of scope and not conflated.Verified against the checklist:
Non-blocking notes for follow-ups (not merge conditions): (1) browser spawn has no connect timeout — a hung worker could wedge one identity's queue behind the 16-cap; consider the 30s-timeout pattern used for Forgejo. (2) The merge payload shape is test-pinned but not yet exercised against live Forgejo; failure mode is fail-closed (API reject) and the tool rereads outcome — watch first live use. (3) Wrapper's
test -d "$1"does no symlink check itself; isolation rests on the hub-side lstat+realpath gate — keep the wrapper invocable only via MCP_HUB_BROWSER_COMMAND with the verified dir. (4) Browser transport sets stderr:'ignore', making spawn failures opaque to operators; consider server-side spawn-error logging. (5) Tests read but not executed in this sandbox (no bun/Bazel); approval rests on the reported canonical Bazel pass + canary evidence + line-level source verification above.APPROVED at exact head
49f3d43. Merge/deploy remain with authorized merger + reviewed generation; no production change activated by this review.Merge verification: exact head49f3d434 has a Good tracked agent SSH signature and senior security approval4801 on that head. Canonical Bazel resident-tools target passed, Nix hub/wrapper built, and full forge generation /nix/store/zjglhb13f5dpy5zdy0qwkqvf61ab08xc-nixos-system-keystore-forge-26.05.20260914.49f3d434 built successfully. Actual systemd-restricted browser canary passed discovery, inline snapshot, native PNG, separate resident pages and filesystem/PID isolation. Root independently viewed the produced screenshot. Source/package evidence remains /root/work/codex-hub-everything. This merge does not claim production activation or model-side image recognition; those acceptance steps remain open with the separate image-transport work.