Skip to content

fix(gateway): an expired lease on a disconnected worker no longer blocks its requester - #992

Merged
V3RON merged 6 commits into
mainfrom
bug/984
Oct 25, 2026
Merged

V3RON merged 6 commits into
mainfrom
bug/984

Conversation

@V3RON

@V3RON V3RON commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #984

Status

Implement: done (247/247 green) Review: round 1, 0 findings Hardware: n/a Gate: merged
Next: nothing

  • A lease past its last reported ttlDeadline on a disconnected worker no longer counts against the requester limit; the agent can lease another device. Checked by the A disconnected worker's expired lease locks its requester out of the fleet for up to 24 h #984 test in src/gateway/fleet-coordinator.test.ts (deadline boundary straddled; mutation probes red).
  • The entry stays in the lease index and routable. Checked by the same test (leaseIndex.resolve).
  • A lease on a connected worker, or one the disconnected worker's last view does not list, still counts. Checked by the same test's extra cases (probes red when either check is removed).

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 32.9M.
Runs: 7. Cost USD: 2.0094. Agent seconds: 1132.
Assessment: complete

Written by an agent.

@V3RON

V3RON commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 3d5f29f

Runs: 7. Cost USD: 2.0094. Agent seconds: 1132.
Tokens input 190, output 45480, cache read 3305844, cache write 292495.
- build implementer: claude-sonnet-5-5 119 s $0.2051
- audit implementer: claude-sonnet-5-5 361 s $0.2336
- fix implementer: claude-sonnet-5-5 80 s $0.1626
- review 1 reviewer: claude-sonnet-5-5 295 s $0.2209
- review 1 spec-reviewer spec: claude-sonnet-5-5 19 s $0.1063
- review 1 code-reviewer both: claude-opus-5-5 227 s $0.9849
- review 1 claims-reviewer claims: claude-sonnet-5-5 31 s $0.096
Finding outcomes: {}. Classes: {}.
{"findings": []}

Risks weighed (triage report): double lease on return is bounded by the TTL; clock skew uses the same comparison as pruneExpired; a worker that disconnected while starting keeps its lease counted (tested).

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 25, 2026 09:48
@V3RON
V3RON merged commit a0ee5d6 into main Oct 25, 2026
52 checks passed
@V3RON
V3RON deleted the bug/984 branch October 25, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A disconnected worker's expired lease locks its requester out of the fleet for up to 24 h

1 participant