Skip to content

fix: signal only proven cgroup members and isolate GTK accessibility bus discovery - #283

Merged
ElbertePlinio merged 10 commits into
mainfrom
fix/258-269-containment-isolation
Oct 7, 2026
Merged

ElbertePlinio merged 10 commits into
mainfrom
fix/258-269-containment-isolation

Conversation

@ElbertePlinio

@ElbertePlinio ElbertePlinio commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Fixes two containment and isolation bugs.

#258: cgroup cleanup no longer writes cgroup.kill, which reached any process that joined the scope between the membership proof and the kill. Cleanup now freezes the cgroup where the kernel supports it, proves each member's identity (token, or an in-scope token-bearing parent, pinned by start time), and sends SIGKILL only to those proven identities. A process that joins after the proof is not signalled. If it is still a member afterwards, the scope does not empty and the result is unconfirmed instead of confirmed: true. Own-chain evacuation, prune-window handling and the marker sweep are unchanged. On a host without cgroup.freeze, the same PID guards apply without the freeze.

#269: a real zenity in a desktop session reached an inherited AT-SPI endpoint. The session environment now sets NO_AT_BRIDGE=1 and GTK_A11Y=none, unsets an inherited AT_SPI_BUS_ADDRESS, and points it at a session-local path when a managed runtime exists.

Requirement Verified by Scenario Result Evidence
#258: decide freeze or post-kill recheck Code and tests Freezing still accepts migrations into the cgroup, so neither option alone proves who cgroup.kill reached; cleanup signals proven identities instead Done Diff, packages/core/src/containment.ts
#258: test a member that joins between check and kill Automated containment-cgroup-sim.test.ts "does not kill a foreign member joining after proof" with freeze supported and unsupported; real cgroups: "preserves a foreign supervisor migrated into a frozen scope after proof" Pass Local runs
#258: existing guarantees kept Automated Full containment suites (own-chain evacuation, ancestor reuse, sibling scope refusal, prune window, marker sweep) Pass Local runs
#269: check what a session gives GTK apps Real run Real zenity launched into a desktop session Before: reached an inherited AT-SPI endpoint Worker report
#269: isolate the accessibility bus Automated and QA pass Environment tests; integration test "keeps a GTK exec client on Xvfb despite inherited Wayland variables" checks an external listener and the X11 property; QA: session create, desktop env, desktop launch zenity on :101 zenity env has NO_AT_BRIDGE=1, GTK_A11Y=none, session-local XDG_RUNTIME_DIR, D-Bus and AT-SPI paths; no socket to /run/user/1000; window renders QA evidence in ~/Artifacts/pickforge-batch-2026-10-07/qa-269/ (local)
Destroy still cleans a real session QA pass session destroy after the zenity launch (cgroup containment) zenity and its supervisor gone, Xvfb :101 gone, scope cgroup removed QA evidence
Review fixes (Astra, Fable) Automated, QA pass Zombie member skipped and remaining members signalled; pending freeze proceeds like unsupported; same-token late joiners re-proven and signalled, foreign or unreadable joiners refused promptly; mid-exec members retried until their environment settles; env recipe no longer unsets exported names; thaw failure appended to the original reason Pass; both reviewers report resolved, no new findings Sim and real-cgroup tests; QA rerun at 97a979b
No regressions Automated bun run lint, bun run typecheck, bun run build; GSK_RENDERER=cairo bun run test:coverage on bb0b395: 2917 passed, 6 skipped at 97a979b, thresholds held (87.92 / 82.85 / 88.36 / 88.88); final head rerun after update with main; PickCheck no new or worsened violations Pass Local runs

Closes #258
Closes #269

@ElbertePlinio
ElbertePlinio merged commit d9e0edf into main Oct 7, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/258-269-containment-isolation branch October 7, 2026 22:16
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.

desktop: GTK apps in a desktop session reach the host at-spi bus core: a process joining between the cgroup member check and cgroup.kill is killed

1 participant