Commit Graph

4 Commits

Author SHA1 Message Date
KoNit-K
9e82766ad8 fix(api): adopt legacy declared session keys
(cherry picked from commit 7c9384097732d22e6fb539a940386c2d282ca277)
2026-10-16 19:21:02 -07:00
Teknium
1bb193c327 test: share re-imported fixtures through conftest instead of imports
Test files received fixtures by importing them from a sibling test module
(`from tests.x.test_y import daemon, owner  # noqa: F401`). Every test that
then takes the fixture as a parameter is a ruff F811 redefinition, which
main's code-health ratchet blocks (it ignores noqa), and it couples test
modules to each other.

Move each shared fixture to where pytest resolves it by name, scopes
unchanged (all function-scoped):
- model_peer -> tests/_fixtures/model_peer.py, registered in tests/conftest.py
  (used by gateway, acp_adapter and hermes_cli tests)
- daemon, server_spec -> tests/acp_adapter/conftest.py
- owner, api -> tests/gateway/conftest.py
- worker -> new tests/hermes_state/conftest.py
- test_session_hosted_rpc's `owner` (a different object: hosted-room
  authority on its own loop) -> tests/gateway/conftest.py as `hosted_owner`,
  so it does not collide with the API `owner`; its three user files rename
  the parameter.
Conftest fixtures import lazily so the gateway conftest still installs its
telegram/discord mocks before any gateway module loads. Plain helpers
(viewer, editor, control, policy) stay imported from their modules.

Also drop an unused HostedRoomAttachmentStore local in
test_hosted_attachment_bridge (F841) while that file is touched.

Same tests collected and passing in every touched file.

(cherry picked from commit 463102382f8cd9bbc9e0c605be7e1345165efda4)
2026-10-07 10:57:32 -07:00
teknium1
c6dc7ab120 Merge remote-tracking branch 'origin/main' into feat/unified-gateway-runtime
Merge #8: 2,771 commits from main (4b05f764fa). Ports main's moved code into the
unified runtime (run.py/run_turn.py splits, tui_gateway server, backup/restore
split), keeps the detached-daemon Desktop lifecycle, and adapts main's new tests
to the owner/authority contracts (canonical session deletes, retired-id
tombstones, zero-writer browsing, hermes_yaml, platforms() markers).
2026-09-27 02:30:04 -07:00
Teknium
76532ae133 feat: restore server-bound API session identities 2026-09-08 18:01:06 -07:00