GRI-1856: independent acceptance test for pending-device list surface (AC-2-11) #107

Merged
vivy merged 1 commit from test/GRI-1856-devices-pending-acceptance into dev 2026-11-10 05:38:02 +00:00
Member

Step 2: devices acceptance test — AC-2-11

Independent acceptance test for the pending-device list surface (signage #13, GRI-1873, merged into dev at 6ff9c3f), not derived from the implementer's own devices_integration.rs — only its scaffolding pattern is reused (minimal app() with pool/PasswordHasher/DeviceConnections extensions), not its test bodies.

Criterion mapping

  • ac_2_11_a_long_pending_device_is_still_listed_and_still_fetchable — AC-2-11 ("a pending registration does not expire on its own", plan/tests/mvp-acceptance.md section 2). Inserts a pending device with created_at backdated 30 days, asserts it still appears in GET /api/v1/devices?status=pending and still resolves via GET /api/v1/devices/{id} with status pending.

Fail-first

Temporarily added an age filter to devices::list (AND created_at > now() - interval '1 day') to simulate a hypothetical expiry regression:

cargo test -p server --test devices_acceptance_integration -- --ignored --test-threads=1
thread '...' panicked: a 30-day-old pending device must still appear in the pending list, got []
test result: FAILED. 0 passed; 1 failed

Reverted (confirmed clean against dev), reran: test result: ok. 1 passed; 0 failed.

AC-2-12 — finding, not a test

The per-IP pending cap (AC-2-12) stays an unwritten finding: EnrolmentConfig has no cap field, nothing in devices.rs/ws.rs enforces one, and plan/server/enrolment.md calls the value "configurable" but nothing configures it. Needs a design decision (where the cap lives, where it's enforced) before a test can be written. Not fixing it here — reporting it.

Also updated the doc comment on the already-merged enrolment_acceptance_integration.rs to point at this file for AC-2-11 instead of listing it as untested.

Gates

./scripts/local-gates.sh — all green.

## Step 2: devices acceptance test — AC-2-11 Independent acceptance test for the pending-device list surface (signage #13, `GRI-1873`, merged into `dev` at `6ff9c3f`), **not derived from the implementer's own `devices_integration.rs`** — only its scaffolding pattern is reused (minimal `app()` with pool/PasswordHasher/DeviceConnections extensions), not its test bodies. ### Criterion mapping - `ac_2_11_a_long_pending_device_is_still_listed_and_still_fetchable` — AC-2-11 ("a pending registration does not expire on its own", `plan/tests/mvp-acceptance.md` section 2). Inserts a pending device with `created_at` backdated 30 days, asserts it still appears in `GET /api/v1/devices?status=pending` and still resolves via `GET /api/v1/devices/{id}` with status `pending`. ### Fail-first Temporarily added an age filter to `devices::list` (`AND created_at > now() - interval '1 day'`) to simulate a hypothetical expiry regression: ``` cargo test -p server --test devices_acceptance_integration -- --ignored --test-threads=1 thread '...' panicked: a 30-day-old pending device must still appear in the pending list, got [] test result: FAILED. 0 passed; 1 failed ``` Reverted (confirmed clean against `dev`), reran: `test result: ok. 1 passed; 0 failed`. ### AC-2-12 — finding, not a test The per-IP pending cap (AC-2-12) stays an unwritten finding: `EnrolmentConfig` has no cap field, nothing in `devices.rs`/`ws.rs` enforces one, and `plan/server/enrolment.md` calls the value "configurable" but nothing configures it. Needs a design decision (where the cap lives, where it's enforced) before a test can be written. Not fixing it here — reporting it. Also updated the doc comment on the already-merged `enrolment_acceptance_integration.rs` to point at this file for AC-2-11 instead of listing it as untested. ### Gates `./scripts/local-gates.sh` — all green.
GRI-1856: independent acceptance test for pending-device list surface (AC-2-11)
Some checks failed
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo deny (pull_request) Successful in 42s
CI / cargo deny advisories (pull_request) Failing after 55s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 9m56s
CI / cargo test (pull_request) Successful in 11m23s
CI / frontend-web (pull_request) Successful in 10m2s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 4s
dc545e688a
vivy merged commit 5daa329cb8 into dev 2026-11-10 05:38:02 +00:00
vivy deleted branch test/GRI-1856-devices-pending-acceptance 2026-11-10 05:38:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!107
No description provided.