Files
ngit-grasp/tests
DanConwayDev c169658096 test(private-repos): broaden private-mode integration coverage
The GRASP-08 boundary previously had end-to-end coverage only for the
HTTP repository-root credential. Exercise the remaining externally
observable contracts through the subprocess fixture:

- NIP-42 WebSocket lifecycle: challenge on connect, auth-required
  rejections for REQ/EVENT/garbage before authentication, member
  admission that bridges through to a served subscription, immediate
  restricted-close for valid non-member credentials, and the bounded
  three-attempt budget for invalid ones.
- NIP-98 credential scope: expiry outside the 60-second window and
  subpath-scoped credentials both fail with the indistinguishable empty
  401, while one repository-root credential is reusable across Smart
  HTTP endpoints.
- Discovery: the NIP-11 document stays unauthenticated and advertises
  NIP-42/98 so clients can learn the requirement without credentials.

Deliberately excluded: dynamic accepted-relay-owner admission still has
only unit coverage; an end-to-end scenario needs a second announced
relay fixture and is left as follow-up scope.

Validation: cargo test --test private_mode (51 passed) and
cargo clippy --all-targets -- -D warnings on the rebased branch.
2026-08-14 22:11:07 +00:00
..
2026-08-12 14:43:38 +00:00