Files
hermes-agent/tests
teknium1 0ddeaf9334 test: pin REST profile scoping with real multi-profile activation
The destructive-route file covered 3 of the 12 gated routes and faked the
gate itself (`monkeypatch` on `is_multiplex_active`), which left the boot
wiring the whole 400 branch rests on untested.

* All 12 destructive/privileged routes are parametrized through the refusal
  case, and the refusal now asserts the ABSENCE of the effect (no spawn, no
  session store opened, no file touched) instead of the detail wording.
* Multi-profile hosting is armed for real: `activate_multi_profile_hosting_eagerly()`
  (the boot probe) for the refusal cases, plus a test that a cross-profile
  request is itself the lazy activation. An autouse fixture enters each test
  single-profile and restores the process-global flag and frozen launch-env
  snapshot, so the one-way flip cannot leak into the single-profile-host test.
* New coverage for the scoping that had none: PUT /api/dashboard/plugin-providers,
  POST /api/local-models/quickstart, memory-provider readiness judged inside the
  write scope, and one invariant each for status/actions/config_env/memory_providers.
* web: ?profile= on /api/credentials, the serving-profile fallback for
  getManagementProfile/fetchJSON, authedFetch going through withManagementProfile,
  and initialProfileScope's URL > bootstrap > serving precedence.

Every new assertion was proven red against the PR's own previous head
(ac3d794) or, for the scoping introduced there, against the pre-PR base.
2026-09-21 09:59:11 -07:00
..
…
…