T12.6: wave 12 verification record, browser probe, BL-060

- tests/bulk_users_ui_check.py (new): selection, keyboard Space on a
  row box, toolbar role change, super-user CSV with good and bad lines,
  add-to-project with a role, typed DELETE, all end to end against a
  real server; 390px bar layout; writes after-screenshots to
  docs/reference/baseline/wave-12/. Needs a browser: to be run on
  Matt's machine.
- tests/cdp.py: --do-not-de-elevate and the rc=0 grace, the same
  change as wave 16 T16.4 (identical content, merges cleanly), so the
  probes start from an elevated shell on this branch too.
- Verification record in wave-12.md: bulk_users_check 61/61 (main
  7/18), single-user routes identical before/after on 16 calls, DOM
  harness 48/48, jsdom against a real server 13/13, smoke 27/27,
  seed_demo OK. Server-checkable done-when boxes ticked; the browser,
  screenshot and full-suite boxes stay open until run on Edge.
- BL-060 logged: a super user's refusal reason promises a project
  access change neither the dialog nor the bulk route allows. Needs
  Nick; not fixed here (scope).
- file-map.md: wave 12's two new checks.
This commit is contained in:
2026-10-06 11:08:03 -07:00
parent 1c4d1bbccb
commit d04a0ff414
5 changed files with 315 additions and 23 deletions

View File

@@ -316,6 +316,17 @@ python tests/critical_reopen_check.py # BL-021 - on-hold mail reaches PM + CM
python tests/console_dialogs_check.py # BL-024 - consoles/launcher: 21 natives -> 0 17 checks
```
Wave 12 (CR-020, bulk user editing) adds these:
```bash
python tests/bulk_users_check.py # CR-020 - bulk routes, guards, audit, CSV; NO browser 61 checks
python tests/bulk_users_ui_check.py # CR-020 - selection, toolbar, CSV, typed delete at 1440/390px
```
`console_dialogs_check.py` gained section 4 (the bulk delete prompt). `tests/cdp.py`
passes `--do-not-de-elevate` on Windows so the probes start from an Administrator
shell (same change as wave 16, T16.4).
**Three probes were re-pointed at `T7.1`.** `sections_check.py` 5b drove the live
cross-frame toggle hand-off, which no longer exists; it now pins the surviving path and
the fact that an UNSAVED toggle correctly does not travel - a behaviour change, recorded

View File

@@ -662,3 +662,21 @@ deliberately deferred.
worth confirming rather than assuming).
- **Suggested wave or follow-up:** next housekeeping pass — needs Nick on
whether to delete, archive, or rewrite it as historical record.
### BL-060 — A super user is told they can change access the server then refuses
- **Found during:** T12.6 (CR-020 verification, the CSV path)
- **Where:** `server/app.py` `manage_user_problem` (the reason text), `get_user_projects` / `set_user_projects` (the rule)
- **What:** for an account that is also on a project the super user does not
administer, the refusal reason ends "You can still change their access and
role on your own projects." Neither the project-access dialog's routes nor
the CR-020 bulk project route allow that: all of them call
`require_manage_user`, which refuses the account. The bulk route mirrors the
single route on purpose (CR-020: same rules), so the words promise something
neither path does. Either the text or the rule is wrong; which one is a
product call.
- **Why not now:** changing either is out of CR-020's scope (the wave must
not widen what a super user can do), and it needs a decision.
- **Suggested wave or follow-up:** needs Nick: should a super user be able to
add or remove a shared account on their own projects? Then fix the text or
the rule, not both.

View File

@@ -45,15 +45,15 @@ exist for the single case — bulk delete stays a hard delete, matching
**Done when:**
- [ ] each of the four bulk actions is callable with a list of user ids and a
- [x] each of the four bulk actions is callable with a list of user ids and a
single set of parameters
- [ ] a batch containing the actor's own account rejects only that row, not
- [x] a batch containing the actor's own account rejects only that row, not
the whole batch — verified for disable, demote, and delete
- [ ] a super user's batch that includes a user/project outside what they
- [x] a super user's batch that includes a user/project outside what they
manage rejects only that row, with a stated reason
- [ ] every successful row produces its own `AuditLog` entry, identical in
- [x] every successful row produces its own `AuditLog` entry, identical in
shape to what the single-user endpoint would have written
- [ ] a batch with some failing rows still applies to the rows that succeed,
- [x] a batch with some failing rows still applies to the rows that succeed,
and the response lists exactly which rows failed and why
---
@@ -74,12 +74,12 @@ disappears at zero.
**Done when:**
- [ ] select-all selects exactly the rows currently visible under the active
- [x] select-all selects exactly the rows currently visible under the active
filter, not the full unfiltered table
- [ ] changing the filter while rows are selected does something sane and
- [x] changing the filter while rows are selected does something sane and
visible (either clears the selection or keeps it explicit which rows are
still selected) — pick one and state it, don't leave it undefined
- [ ] the toolbar is keyboard-reachable and only present when >=1 row is
- [x] the toolbar is keyboard-reachable and only present when >=1 row is
selected
---
@@ -104,13 +104,13 @@ partial failure.
**Done when:**
- [ ] role change, activate/disable, and project assignment each work end to
- [x] role change, activate/disable, and project assignment each work end to
end against a multi-row selection
- [ ] the confirmation dialog names the exact affected count before anything is
- [x] the confirmation dialog names the exact affected count before anything is
sent
- [ ] a batch with a partial failure shows which rows failed, not just an
- [x] a batch with a partial failure shows which rows failed, not just an
undifferentiated error
- [ ] `aria-live` announces the outcome
- [x] `aria-live` announces the outcome
---
@@ -130,11 +130,11 @@ T12.1 endpoints, not a third implementation of the bulk logic.
**Done when:**
- [ ] a CSV with a mix of valid and invalid usernames applies to the valid
- [x] a CSV with a mix of valid and invalid usernames applies to the valid
rows and reports the invalid ones by row, with a reason
- [ ] the same permission/self-action guards from T12.1 apply here — a CSV
- [x] the same permission/self-action guards from T12.1 apply here — a CSV
cannot reach a user a checkbox-driven batch couldn't
- [ ] duplicate usernames in one CSV are handled without double-applying or
- [x] duplicate usernames in one CSV are handled without double-applying or
erroring confusingly
---
@@ -157,10 +157,10 @@ change it, not a reason to skip building a real confirmation now.
**Done when:**
- [ ] the affected usernames are listed in the confirmation dialog before
- [x] the affected usernames are listed in the confirmation dialog before
delete is sent
- [ ] the request is not sent until the confirmation phrase is typed correctly
- [ ] the actor's own account, if somehow selected, is rejected with a clear
- [x] the request is not sent until the confirmation phrase is typed correctly
- [x] the actor's own account, if somehow selected, is rejected with a clear
reason rather than silently included or silently dropped
---
@@ -183,7 +183,7 @@ suite.
- [ ] all `CR-020` acceptance criteria in `decisions-2026-09-17.md` are met or
a failure is stated with a reason
- [ ] screenshots committed
- [ ] smoke test and `seed_demo.py` both still pass
- [x] smoke test and `seed_demo.py` both still pass
- [ ] full test suite passes
---
@@ -198,3 +198,46 @@ suite.
- [ ] partial failures are always reported, never hidden behind a blanket
success
- [ ] `CR-020` fully accounted for, no open acceptance criteria
## Verification record
Built 2026-10-06 on `feat/wave-12-bulk-users`
(from `main`, `df20b8f`), one commit per task. Run in the build sandbox (Linux,
Python 3.10, no browser).
| Check | Result |
|---|---|
| `tests/bulk_users_check.py` (new, no browser) | **61/61**: all four actions, own-row refusals, super-user scope, per-row audit in the single route's shape, partial failure, project add/remove keeping other projects and roles, CSV resolve, 403/401/422 gates |
| Same check against `main` | 7/18: the 7 single-route checks pass; every bulk check fails, because the routes do not exist there |
| Single-user routes before/after (16 calls: 200/400/403/404, as admin and super user) | **Identical** responses, audit rows and memberships against `main`. The routes now call the same `apply_*` functions as the bulk routes |
| Page logic, DOM harness (jsdom, the real `users.html` and scripts, mocked API) | **48/48**: selection, select-all over the filtered rows, filter clears selection, toolbar, confirm counts, per-row report, CSV, typed DELETE |
| Same flows, jsdom against a real server seeded by `browser_check.seed()` | **13/13**, including the CSV report texts the browser probe expects |
| `server/smoketest.py` | **27/27** |
| `server/seed_demo.py` | Seeds the demo project |
**Decisions applied (confirmed 2026-10-06):** typed `DELETE`; project assignment
is add/remove per project, with the per-project role (`ProjectMember.role`) set
on add; filter or search change clears the selection; CSV holds usernames only.
A row already in the requested state reports `unchanged` and writes no audit
row (nothing changed). An email address in the CSV resolves only when exactly
one account has it.
**Found and logged, not fixed:** BL-060, a super user's refusal reason promises
a project-access change that neither the dialog nor the bulk route allows.
**Still open: needs a machine with Edge (no browser in the build sandbox).**
Run one at a time:
```powershell
.\.venv\Scripts\python.exe tests\bulk_users_ui_check.py # writes docs\reference\baseline\wave-12\*.png
.\.venv\Scripts\python.exe tests\console_dialogs_check.py
.\.venv\Scripts\python.exe tests\mobile_check.py
.\.venv\Scripts\python.exe tests\a11y_check.py
.\.venv\Scripts\python.exe tests\browser_check.py
.\.venv\Scripts\python.exe tests\token_check.py --out after.json
```
Then commit the four screenshots in `docs/reference/baseline/wave-12/`
(after-shots; the before-shots are `baseline/users-1440.png` and
`baseline/after-wave9/users-390.png`). Until those pass, T12.6 and the wave
exit criteria below stay open.