Repository navigation
Description
Context
packages/ui-sdk/tests/worker-var-sockets.test.ts proves that no worker profile can see an unapproved socket. The fixture's walk (walkSockets, packages/ui-sdk/tests/fixtures/worker-var-sockets.ts) takes each entry's type from readdir and calls lstat only on entries the filesystem left untyped. That optimization arrived in #2675.
getdents reports the type of the directory entry in the parent filesystem. A bind mount on that entry does not change it. bwrap creates an empty regular file as the mount point for a file bind. So a socket bind-mounted onto a file path (--ro-bind /path/x.sock /dest/x.sock) shows up in the walk as a regular file, and the walk does not report it. lstat on the same path returns the socket.
The fixture's planted sockets are bound through directories (/run/brain-egress) or are reached by connect() checks (VAR_HOST_SOCKET_CONNECTIONS_REFUSED, VAR_CUPS_SOCKET_UNREACHABLE), so no current assertion depends on this. A future mask regression that file-binds a socket would pass the walk's SOCKET_WALK_ONLY_APPROVED_RELAY_AND_PROXY assertion unnoticed.
Found while working #2674.
Scope
Make the walk report sockets mounted on file mount points: lstat every mount point listed in the walking process's /proc/self/mountinfo (outside /proc and /sys), in the fixture's baseline walk and in each worker.
Out of scope
- The walk's mount-diff and parallel structure from ui-sdk: the /var socket test walks the whole filesystem three times in series and times out on loaded CI shards #2674.
- Launcher masks.
Acceptance criteria
- A positive control: a socket file-bind-mounted into a path that every profile can see is reported by every profile. The test fails without the mount-point
lstatand passes with it. bun run test packages/ui-sdk/tests/worker-var-sockets.test.tspasses.
Verification
bun run test packages/ui-sdk/tests/worker-var-sockets.test.ts, with the failing-first receipt in the PR.
Contract impact
None. Test fixture only.
2026-10-29 dependency-priority reconciliation: this fixture correction directly verifies #1645’s required controlled-egress/socket-isolation output, also required by #1636. Both remain priority p0. Set this prerequisite to priority p0 under the blocker-priority rule; this does not claim an observed production socket leak or change its test-only scope, readiness, assignment or release attribution.
Blocked by #3461
Activity
schlessera commentedon Oct 23, 2026
2026-10-24 restructuring: attached to #1645. Detecting an unapproved socket bind-mounted into a worker verifies that epic's controlled-egress boundary.
schlessera commentedon Nov 2, 2026
Claiming (claim token
wi-2745-da387ca5). Branch:fix/2745-socket-walk-mount-points. Collision report for the cited fixture/test paths: closure-only overlaps with open drafts #3054, #3056, #3059, #3069, #3116, #3277, #3278, #3279; no path collisions.schlessera commentedon Nov 2, 2026
Outcome (claim
wi-2745-da387ca5): implemented in draft PR #3282 (fix/2745-socket-walk-mount-points, headbeecb74c8). The walk nowlstats mount points from/proc/self/mountinfo. A socket file-bound to/opt/odysseus-file-bound/walk-control.sockis the positive control. Hosted run 41446241074 shows every profile reporting it, andworker-var-socketspasses inunit (4). The failing-first receipt is in the PR: the old walk misses the file-bound socket and the new one reports it. It was taken with single-level bwrap, because this host's AppArmor denies the test's nested bwrap.Not merged. The confirmation's
browser (3)failed on the unrelated Storybook flake #3267 (second occurrence, now escalated and raised to p0), soproofis red. HenceBlocked by #3267. To resume after #3267 lands: refresh #3282 onto main, runbun scripts/integrate.ts confirm 3282 --issues schlessera/brain-kit#2745, and merge on a fully passingproof. The PR and this issue carry milestone 0.45.0. Releasing my assignment.schlessera commentedon Nov 2, 2026
Unblocked: #3267 is closed by #3286 (squash
efea2be3edb69c8eb2e95549fb19852afa07b089on main, milestone 0.45.0).The
browser (3)failure on #3282 was the "Layout Phone" artifact story charging a cold lazyFileViewerchunk load to a 1000 ms wait. It was not caused by #3282. The stories now wait for the real lazy imports before those waits. In #3286's candidate run 41454363060, every selected job passed, including all three browser shards, and bothArtifactThemeprojects ran 4/4.#3282 can be resumed: refresh it onto current main and request candidate confirmation again. Its earlier failed confirmation runs do not count as proof.
schlessera commentedon Nov 2, 2026
Resuming (claim token
wi-2745-r2-2e72ad82). Dependency reconciled: #3267 is closed by #3286, so theBlocked by #3267line is removed. Under the 0.45.0 epic-integration process, #3282 (fix/2745-socket-walk-mount-points) is rebased onto and retargeted toepic/1645-egress-controls. Collision report for #3282 atbeecb74c8: closure-only overlaps with open PRs #3054, #3056, #3059, #3069, #3116, #3277, #3279, #3287, #3288, #3290; no path collisions.fix(ui-sdk): stat mount points in the worker socket walk
fix(ui-sdk): stat mount points in the worker socket walk (#3282)
schlessera commentedon Nov 2, 2026
Delivered to the epic integration branch
epic/1645-egress-controlsat3c9f48b92c38a49f60466b257ad33ab9c0c729c3(squash of #3282, headeea1f8fe8rebased onto epic heada62db8f27). Candidate confirmation run 41467070753 passed every selected job andproofon the first attempt (packwas intentionally skipped as a tests-only change). Its metadataBASE_SHA/HEAD_SHAand the synthetic merge parents matched the live epic head and the PR head. The epic head was unchanged at merge. This issue stays open and closes when the epic batch lands on main. Milestone 0.45.0 is kept. Releasing my assignment (claimwi-2745-r2-2e72ad82).schlessera commentedon Nov 3, 2026
Delivered on
epic/1645-egress-controls. Its landing on main (#3443) is blocked by #3461: the ready-candidate run 41625377355 failedruntime_hoston that issue's maintenance-admission race, which is not rerun into green under the strict-flake rule. The landing resumes once #3461 merges.