claire/tests
Natalie 2d978b5fe3 fix(dispatch): discover sessions by canonical host label, not raw "local"
discover_session polled `rclaude list sessions` for the freshly spawned
session but filtered rows with `r.host == host` where host is the
canonical name (e.g. "plum"), while rclaude labels the calling machine's
own sessions "local". "local" == "plum" is always False, so discovery
matched nothing and timed out even though the session's JSONL was already
on disk (observed: 18s after spawn, inside the 30s window). dispatch then
falsely returned "spawned but not discovered", orphaning the live session
until a manual pull.

Root cause is a missing host-label normalization the pull loop already
does. Fix discover_session to canonicalize both sides via
resolve_host_label, and key local-path symlink resolution on the ROW's
raw label. Apply the same normalization to dispatch_task's pre_uuids
filter (identical mismatch left it empty, risking a stale-sibling match
at a shared cwd). 2 regression tests reproduce rclaude's "local" labeling
(the old fake echoed the dispatch host, masking the bug). 310 tests pass.

Committed manually with ALLOW_COMMIT=1 per user authorization: the
auto-commit service's message LLM was timing out on this repo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 22:46:28 -06:00
..
conftest.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_api.py feat(web): Implement API endpoints and service logic for fetching "Considered Work" data 2026-05-21 14:39:22 -07:00
test_chat_api.py refactor(domain): rename ChatRole persisted value clare → claire (migration 0010) 2026-05-27 14:29:30 -06:00
test_chat_commands.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_chat_nl.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_chat_projection.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_chat_service.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_chat_stream.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_cli_smoke.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_config.py feat(config): Introduce 'this_host' serialization logic and enforce consistent config formatting 2026-05-22 15:10:46 -07:00
test_db.py refactor(domain): rename ChatRole persisted value clare → claire (migration 0010) 2026-05-27 14:29:30 -06:00
test_decisions.py feat(decisions): add decisions tracking system 2026-05-22 16:58:45 -07:00
test_dispatch.py fix(dispatch): discover sessions by canonical host label, not raw "local" 2026-05-29 22:46:28 -06:00
test_events.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_fleet.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_hlc.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_move_task.py feat(@projects): add session orchestration & web UI components 2026-05-21 19:54:42 -07:00
test_orchestrator_bootstrap.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_orchestrator_mcp.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_orchestrator_supervisor.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_orchestrator_tools.py feat(@projects/@claire): add tmux_name validation in session dispatch tests 2026-05-22 00:38:16 -07:00
test_orchestrator_turn.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_pm_commands.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_pm_events.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_pm_service.py refactor(domain): rename ChatRole persisted value clare → claire (migration 0010) 2026-05-27 14:29:30 -06:00
test_pull_idempotency.py refactor(domain): rename ChatRole persisted value clare → claire (migration 0010) 2026-05-27 14:29:30 -06:00
test_pull_liveness.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_rclaude_wrapper.py feat(@projects/@claire): improve session targeting for direct sends 2026-05-22 00:30:39 -07:00
test_rename.py feat(@projects): add session orchestration & web UI components 2026-05-21 19:54:42 -07:00
test_scheduler.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_scheduler_nudges.py refactor(domain): rename ChatRole persisted value clare → claire (migration 0010) 2026-05-27 14:29:30 -06:00
test_sync_auth.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_sync_convergence.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00
test_task_deps.py feat(@projects/@claire): add blocker status checks in scheduler 2026-05-21 23:32:16 -07:00
test_usage.py refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references 2026-05-20 19:54:05 -07:00