Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r release, dispatch by registered major) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed at dispatch) Sol round 2: 0 blocking, 0 major, 1 minor. m-1: the Review Focus claimed the revocation test covered requests held during a server grab, but that test only dispatches sequentially. Task 2 gains a run_core test that parks an XFIXES request behind another client's grab, revokes, ungrabs and expects BadRequest; its mutation is a decision cached at intake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Policies gain extension_access and extension_dispatch hooks (default allow). QueryExtension answers a denied extension like an unknown name and ListExtensions leaves denied names out, asked only for available extensions and only when a policy is installed. check_server, check_extension_access and check_extension_dispatch share one first-denial loop; misc::extension_available replaces the duplicated availability match. Implemented-By: codex (model gpt-6-luna, reasoning effort xhigh) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every request to a registered extension major is checked with check_extension_dispatch when a policy is installed, whether or not the extension is advertised. It runs after the transport gate and the maximum-length BadLength. A denial answers BadRequest with value 0, the request's minor and major, as Xorg. A denied BIG-REQUESTS Enable releases the parked client reader through release_big_requests_reader, shared with the malformed-minor path. The spec records the dispatch row and the position. Includes review fix round 1: the test policies share one recording and decision path per hook, a nonzero-minor denial case, the core length check stays in place, and the stale dead_code allow is gone. Implemented-By: codex (model gpt-6-luna, reasoning effort xhigh; fix round max) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2 of the access control series designed in #320, after #328. It implements the plan in
docs/superpowers/plans/2026-11-04-access-control-pr2.md. The plan commits are at the bottom of this branch.With no policy installed, nothing a client can observe changes. Both new checks are behind
policies_installed(), so the empty list costs one branch and builds no context.What it adds
AccessPolicy, both default allow:extension_access(ctx, client, extension)for discovery;extension_dispatch(ctx, client, extension)for requests. The request's major and minor come fromctx.request().check_server,check_extension_accessandcheck_extension_dispatchshare one first-denial loop. It keeps installation order and stops at the firstDeny.QueryExtensionexactly like an unknown name.ListExtensionsleaves it out and keeps the order of the rest; if every name is denied, it answers an empty list. Policies are asked only about extensions that are available. The availabilitymatchthat was duplicated inmisc.rsis now one function,extension_available.BadLength, as Xorg (dix/dispatch.c:546-549).BadRequest: value 0, the request's minor and major. It does so whatever error the policy returns, as Xorg'sXaceHookDispatch(Xext/xace.c).Enable, the client reader waits for the core's answer. A deniedEnablesendsIgnoreBigRequestsso the connection keeps working. This uses the same helper as the existing malformed-minor path.Testing
cargo +nightly fmt -- --check.cargo clippy --all-targets -- -D warnings, plus with--features tcp-transportand with--features xdmcp.cargo check -p yserver-core --target x86_64-pc-windows-gnu.cargo test --workspace: 4470 passed. With--features xdmcp: 4583 passed.crates/*/testsfile.--features xdmcp -- --ignored(lavapipe): 753 passed.run_coretests below, 5 runs undernprocbusy loops: 0 failures.just man.process_request/tests/extensions.rshas 13 tests, all throughprocess_request.run/tests.rshas two with the real reader andrun_core:Enable, thenGetInputFocusanswers;Each test names the mutation that makes it fail. One case uses a nonzero minor, so a minor forced to 0 in the check or in the error is caught.
Hardware, on AMD (Raphael) and NVIDIA (5060 Ti): the same harness as #328 (host access probe, glxgears, shutdown), run with the #328 binary and with this branch. On each GPU the
xdpyinfo -queryExtensionslists are identical (23 extensions), 12/12 checks passed, and yserver exited cleanly with the same log lines.🤖 Generated with Claude Code