Merged
Make CLI transport timeout tests deterministic #171
urandonAdd on 27 days ago
Make CLI transport timeout tests deterministic #171
Merged
Merged fromcodex/issue-187-deterministic-cli-timeoutintomain
Pull Request has been successfully merged by urandon.
(Thank you for urandon's contribution.)27 days ago Associated issue: [Epic] Deliver bounded daemon observability across Admin, CLI and MCP,[Observability O5] Qualify integrated diagnosis, recovery and feature rollout,[CI] Make CLI transport-timeout scenario deterministic at the HTTP boundary,[Feedback/diagnostics][cli] CLI reports HTTP attempted for cancellation before the HTTP transport is entered
27 days ago Associated issue: [Epic] Deliver bounded daemon observability across Admin, CLI and MCP,[Observability O5] Qualify integrated diagnosis, recovery and feature rollout,[CI] Make CLI transport-timeout scenario deterministic at the HTTP boundary,[Feedback/diagnostics][cli] CLI reports HTTP attempted for cancellation before the HTTP transport is entered
27 days ago Merged pull request, merge node SHA: d648350b861d2b3274dad218d834ae4f8d7a7f12
Scope and design
Closes #187. Prerequisite for observability epic #173 / integrated qualification #178.
Replace the scheduling-sensitive 1ms whole-command timeout fixture with a deterministic, serial and restored test-only RoundTripper at the actual Client.Do boundary. Preserve live_transport_failure; require a live request context, exact synthetic GET target, exactly one attempt and http_attempted true. Cover transport-returned cancellation separately. Configuration-read cancellation/deadline during CLI startup requires configuration_error, http_attempted false and zero attempts.
No production, API, cache, MCP, Admin, configuration or observability behavior changes. The different actual pre-dispatch context cancellation false-positive diagnostic is #189; it remains an explicit O5 prerequisite and is not certified or fixed here.
Risk and recovery
Test-only process-global seams require serial ownership and cleanup; existing entrypoint tests are serial and already own cliRoute similarly. Normal real-loopback live-sync and offline/provider-selection controls remain. Revert this commit to restore prior test behavior; no migration, data repair or service restart is involved. Synthetic .invalid coordinates and fake credentials only; no external network or raw sensitive diagnostic output.
UX assessment
No new user-visible resource, lifecycle, action or remediation; existing CLI diagnostics are under test. MCP/Admin changes are not required. Whole-feature cross-surface qualification remains #178, including #188/#189 disposition.
Verification
Head: 8f6a387062944410b9c1acda4a96dfd8c6a7908c.
Base: f38d6c7ba52b058a4d2e243e50e4ca4f732a6829.
Author passed:
Required exact-head CI: https://github.com/urandon/gitcode-mcp/actions/runs/38140667475 — success (attempt1, push ci.yml, all steps). Independent review evidence is linked in #187 comments. Live E2E, release and installed-service changes were not attempted. Merge requires no blocking discussion, matching canonical refs/SHA, clear independent review and green required CI; closure additionally requires resulting-main CI success.