Skip to content

e2e: create the harness's test users as Roles only, so the rbac and group tests pass again - #786

Merged
schmitch merged 1 commit into
mainfrom
claude/785-e2e-roleless-test-users
Nov 2, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/785-e2e-roleless-test-users

Conversation

@schmitch

@schmitch schmitch commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fixes #785

What

With #780 merged, the e2e job on main gets past credforward and fails in group. cargo test stops after the first failing test binary, so these tests had not run on main since #734. A local run of every e2e test file on 8ced3fe found eight failures:

  • group: prefer_hosted_shields_internal_id_from_selector_scoped_tokens.
  • rbac, seven tests:
    • matrix_read_write_any_and_fail_closed
    • content_selector_filters_reads_and_package_mutations
    • fresh_install_defaults_closed_over_http
    • signed_in_user_gets_no_public_reach_when_anonymous_access_is_off
    • signed_in_user_reads_anonymous_readable_repos
    • nested_group_visibility_honors_privileges
    • cross_instance_cache_invalidation_on_grant_change

All eight have the cause of #748. TestServer::create_user invited its accounts with POST /admin/users and no role, which since #734 (#733) makes them readers: the built-in reader role, an unscoped read of every repository. The tests use these accounts as roleless. A reader's unscoped read lifts every selector-scoped or missing grant, because grants combine as a union (EffectiveSet::package_filter_for). The product behaves as #733 intends; the tests predate it.

create_user now invites Roles-only accounts ("role": "roles_only"), which hold the roles a test assigns and nothing else. A test-only change, so there is no changelog fragment.

Why it blocks 2.2.0

release.yml needs a CI run of the tagged commit that passed every job in REQUIRED_JOBS, e2e included.

Tests

Locally, with this change, every e2e file that calls create_user passes:

File Result
rbac 12 passed (5 before)
group 4 passed (3 before)
auth 4 passed
client_logins 1 passed
credforward 17 passed
token_exchange 14 passed

The other 15 e2e files passed on 8ced3fe already and don't call create_user. cargo clippy -p forge-e2e --features forge-e2e --all-targets -- -D warnings and cargo fmt --check are clean.


Generated by Claude Code

`TestServer::create_user` invited its accounts with `POST /admin/users`
and no `role`, which since the built-in reader role (#733) makes them
readers: an unscoped read of every repository, which lifts any
selector-scoped or missing grant the tests give them. Seven rbac tests
and a group test expected such a user to be refused and failed on
main once credforward no longer stopped the e2e run before them. The
harness's users are now Roles only, holding the roles a test assigns
and nothing else.

Fixes #785

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJb6V3DHD5wQrsYhKda
@schmitch
schmitch enabled auto-merge November 2, 2026 20:21
@schmitch
schmitch added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 76d7542 Nov 2, 2026
19 checks passed
@schmitch
schmitch deleted the claude/785-e2e-roleless-test-users branch November 2, 2026 20:36
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.

CI: e2e rbac and group tests expect a user created without a role to hold none; since #734 it is a reader

2 participants