Skip to content

Provider failover: remaining re-review P3s and test gaps (#68) #74

Open

Description

@chrisohearn

Follow-ups from the substitute re-review of #68 (automatic provider failover). Ledger key: r2/provider-fallback. None blocked the merge.

Behaviour

  • P3-d: explicit picks move too. A message queued with an explicit pick of the failed instance before the failover still follows the thread to the fallback (queuedBeforeFailoverFrom in Orchestrator.ts). Queued runs don't record whether their model was an explicit pick, so this needs that recorded first.
  • P3-e: queued slash commands switch back. A queued slash command for the failed instance is excluded from the move, so it switches the thread back to that instance and probably fails again.
  • P3-f: misleading reservation id. A queued fresh-context run that moves to the fallback keeps its old pending: reservation id. It works; the id is just misleading.
  • P3-g: repeated blocker at startup. The startup sweep (pending-failovers) can re-emit thread.blocker for an older stuck run, not only the latest.
  • P3-h: share the "resendable" check. resendable in ProviderFailover.ts, the standing-message check in ContextHandoffService.ts and the queued-move exclusion each check message kinds on their own. They should share one predicate.

Test gaps

  • The end-to-end incident test in ProviderSwitch.integration fails by timeout when no fallback is configured. It should assert that the claim is absent instead.
  • A retry that is rejected and then succeeds: attempt 1's command is rejected and attempt 2 creates the run.
  • Slash-command, queued-after-failover and standing-exclusion cases at the runtime-layer level. The standing check has a unit table now.
  • A test that a skipped claim re-emits thread.blocker through McpEvents end to end.

Also open from the first review:

🤖 Generated with Claude Code

Activity

  1. chrisohearn commented on Nov 13, 2026

    @chrisohearn
    OwnerAuthor

    Status: still valid. Follow-ups to PR #68 (merged). Nearest ledger row: r4/w1-failover (round four, provider failover and error handling); no row lists these items by name.

    Triage by the round-four GitHub hygiene pass (ledger key r4/w7-github), 2026-11-13. Left open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions