Skip to content

Session proxy: fail fast (≤2s, not 16-26s), single-flight recovery, timestamped broker log, pool stays 50 #5758

Closed

Description

@dezren39

Session-proxy: fail fast, size the pool from the ramp, timestamp the broker log (WS-C)

Part of epic #5412. Evidence: WS-C comment on #5701 (2026-11-04) + the #5701 stage-2 ramp.

Facts

Proposal

  1. Fail fast on dead target: cap total per-call failure latency at ≤2 s when the tunnel target is unreachable (bounded CONNECT attempt + one stream-level retry, no second full CONNECT inside one call). Healthy-path latency unchanged; the 660 s cap stays ONLY for the daemon-side exec duration, not for transport setup.
  2. Single-flight tunnel recovery: when the pool/tunnel is down, exactly one reconnect attempt in flight; concurrent callers wait on it or fail fast — never N parallel CONNECTs.
  3. Timestamped, identity-stamped broker log: every broker start writes one line {ts, implementation, version, pool_size, pid}; every ownership handoff is therefore reconstructable after an incident.
  4. Deterministic single owner: one implementation owns broker.sock (fleet proxy serve); the Python broker starts only when the fleet binary is absent (the init-ensure gate already expresses this intent — enforce it in the clients' auto-start paths too, which still spawn the Python broker directly: laptop-agent.py _broker_roundtrip, repo-queue spawn_broker).
  5. Keepalive policy: keep 180 s application keepalive per tunnel while pooled HTTP remains; re-evaluate under the multiplexed design (PING on the single tunnel). Idle-exit stays 3,600 s.

Acceptance

  • Kill the runtime proxy mid-test: p50 failed-trip latency in trips.jsonl ≤2 s (from 16.3 s), and recovery shows exactly 1 CONNECT stampede in the watcher log.
  • broker.log first line after any start is timestamped with implementation + pool size.
  • No client auto-start path can spawn the Python broker while a fleet binary exists.

Activity

  1. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  3. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  5. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor

    🤖 Agent note · handed off

  6. 105 remaining items

  7. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  8. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 6, 2026
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    Done: task 10968 completed by lane code-i. PR #6490 merged (merge commit c4db78f) implementing the #5758 slice: 2s transport deadline for fleet-proxy tunnel setup (DNS + connect + CONNECT handshake, incl. per-address budget split), recovery-only single-flight gate with per-generation verdicts and a model-based property test, timestamped identity-stamped broker startup line (pool default 50 unchanged), and pinned sibling-fleet broker selection in fleet-queue. Codex review rounds 1–5: every finding fixed in-PR, replied, and resolved; final round clean. Laptop: cargo test -p fleet-proxy 56 passed, fleet-queue client tests passed.

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

Metadata

Metadata

Assignees

Labels

status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions