Repository navigation
feat(tunnel): simlock tunnel reverses a leased device's port to the caller (#1114) - #1126
Merged
Merged
Conversation
…the helper that orientation (callstackincubator#1107)
…els and gets READY, and a device connection arrives as OPEN with its bytes as DATA (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ctions as OPEN and DATA (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ED and close 4003 (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…de and close 4003 (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…tation, and is refused (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ckincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r and gets ROTATION_UNSUPPORTED naming it (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…blet simulator (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s and gets INPUT_UNAVAILABLE with the reason (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… when the helper or the write fails (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…esh helper; a socket open during a rotate keeps its helper (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…credit pausing only its connection (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…credit (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… a closed connection is ignored (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s sockets and device.rotate (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…when the socket closes, the lease ends or the daemon stops (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…gets the op's output (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…a tunnel's rules and close its connections (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rotate (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ugh a gateway (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… may (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… worker (callstackincubator#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eway (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…wn message (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…he unknown message (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ller's lease id (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rove rotate's cases (callstackincubator#1107) The coordinator rewrote the worker's lease id only for two codes and with a substring replace; it now maps every coded error's details.leaseId and replaces the id only as a whole token. The rotate e2e test sends all four orientation names, covers a rejected open and a failed shared input, and no longer waits on the daemon's real host-load probe on Linux; the registry's lease-end close and failure drop get a unit test. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ls, and reword the orientation claims (callstackincubator#1107) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ut bound (callstackincubator#1108) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… rules at start, name the call in refusals (callstackincubator#1112) A removal that fails keeps the loopback listener reserved and the device's reclaim frees it; the start sweep only reads a leased device's rules and reserves their ports; refusal texts follow the spec's shared values; a cancelled TcpStream no longer closes its readable twice. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r#1112) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…tackincubator#1108) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lementation with input (callstackincubator#1113) Merge origin/task/1112. One src/modules/relay-channel.ts now holds the channel framing, channelSocket, the close mapping and the refusal bodies that input and tunnel each copied; the tunnel's coded relay failure answers 503 like input's. Tests: the gateway aborts the relay when the holder closes, when a worker frame is over the limit and when an upgrade is abandoned. The tunnel config row says a gateway serves it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ay channel names it (callstackincubator#1113) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…-json timing bound (callstackincubator#1114) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
leonardoxr
marked this pull request as ready for review
October 31, 2026 05:26
Contributor
Author
Review ledgerRound 1: 35d8bbf {"findings":[{"id":"R1","role":"code","class":"exit not within 2 s of Ctrl-C","outcome":"fixed","path":"src/ports/websocket-client.ts","round":"1","fix":"137b7dd88c9ae6f702b222ce46de041740470424"},{"id":"R2","role":"code","class":"spec line delivered differently","outcome":"fixed","path":"src/cli/commands/tunnel.ts","round":"1","fix":"137b7dd88c9ae6f702b222ce46de041740470424"},{"id":"R3","role":"spec","class":"behaviour not asked for","outcome":"nonblocking","path":"src/cli/commands/tunnel.ts","round":"1"},{"id":"R4","role":"code","class":"testing 3","outcome":"fixed","path":"src/cli/tunnel.test.ts","round":"fix-check","fix":"50c1f696c"}]}Written by an agent. |
…t a connection whose write failed, refuse a --url with a path, query or fragment (callstackincubator#1114) Also corrects the comments on which ports files import ws. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…into helpers under the CRAP threshold (callstackincubator#1114) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 31, 2026
# Conflicts: # src/contract/AGENTS.md # src/contract/protocol.ts # src/daemon-protocol/index.test.ts # src/daemon/AGENTS.md # src/daemon/main.ts # src/drivers/android/index.test.ts # src/drivers/android/index.ts # src/modules/AGENTS.md # src/modules/testing.ts # website/src/content/docs/docs/reference/errors.mdx
# Conflicts: # src/input/AGENTS.md # src/modules/AGENTS.md
# Conflicts: # src/cli/AGENTS.md # src/cli/index.test.ts # src/cli/index.ts # src/cli/remote-lease.ts # src/cli/tree.ts # src/daemon/lease-inputs.test.ts # src/gateway/fleet-coordinator.ts # website/src/content/docs/docs/reference/cli.mdx
…e connected URL when the connection is lost (callstackincubator#1114)
V3RON
marked this pull request as draft
November 1, 2026 17:20
V3RON
marked this pull request as ready for review
November 1, 2026 17:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1114
Status
Implement: done Review: cap reached; R4 fix accepted by the maintainer Hardware: pass (slow-android-tunnel, 137b7dd) Gate: running
Done when
src/cli/tunnel.test.ts,src/ports/websocket-client.test.tsand the tunnel CLI e2e files run in the fix runs; CI on the heade2e/slow-android-tunnel.test.tspasses in the slow lane on a machine with the Android SDK: an emulator lease on a lone worker with tunnels on;simlock tunnel reverse <p>with a loopback HTTP server on the caller; on the device,(printf 'GET / HTTP/1.0\r\n\r\n'; sleep 2) | nc 127.0.0.1 <p>prints the server's body (thencform the Facts' check used). — slow lane on 137b7dd, 2026-11-01 18:12, 1 passedlazy-loading.test.tsshowswsloaded bysimlock tunneland by no other command or the MCP entry. —lazy-loading.test.ts, checked by the spec reviewsimlock tunnel, listsSIMLOCK_URLandSIMLOCK_TOKEN, and words the global--tokenas the credential a command sends. —cli.mdx, checked by the claims reviewAssumptions
UNAUTHENTICATED) — printed with that code and exit 1 by the command itself, since the table has no row for it.Lease <id>:prefix on an upgrade refusal's body message — the body's own message is printed unchanged; only aREFUSEDframe gets the prefix, as the issue words it.Review
Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 3 blocking, 3 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 36.5M.
Runs: 12. Cost USD: 4.3995. Agent seconds: 2017.
Rejected:
src/cli/commands/tunnel.ts:293--urlrefuses a path, query or fragment — origin-only is documented atcli.mdx:218and the API is served at the root [nonblocking]Assessment: complete — R4's fix (50c1f69, two test assertions, both probed) came after the final fix-check; the maintainer accepted it on 2026-11-01
Written by an agent.