Skip to content

fix(server): back off crashing tunnel connectors - #290

Merged
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-tunnel-backoff
Sep 6, 2026
Merged

fix(server): back off crashing tunnel connectors#290
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-tunnel-backoff

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

A relay connector that exits immediately can restart in a tight loop and exhaust the Pylon server’s memory, disrupting every connected agent. Back off repeated rapid exits while keeping the first restart immediate; reset the delay after stable uptime or an explicit configuration change. Configuration changes can preempt a delayed restart.

Adopts approved B1, upstream #8788, b90898077e60290a1eb7bea4224f325fd3bb1595. Pylon’s process ownership, runtime home, branding and configuration routing are preserved. This affects the managed tunnel connector for every client/provider; direct local connections are unchanged.

Validation: 11 focused ManagedEndpointRuntime tests pass, including crash-loop delay, stable-uptime reset, configuration replacement and existing serialization/cleanup cases. Server typecheck, targeted lint and diff checks pass. Tests use fake child handles and Effect TestClock; no real tunnel or provider was launched.

Model: GPT-6 Astra. Harness: Codex.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

(cherry picked from commit b90898077e60290a1eb7bea4224f325fd3bb1595)
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB −6 B (−0.0%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB −1 B (−0.0%) 7.8 KiB
Codex Live turn WebSocket decoded 56.5 KiB 56.5 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB +1 B (+0.0%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +4 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.6 KiB −3 B (−0.0%) 7.8 KiB
Claude Live turn WebSocket decoded 57.3 KiB 57.3 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 8 8 0 (0.0%) 21

Baseline: c3fbc15 · PR result: ba62757 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 111.2 KiB
  • Claude decoded thread snapshot: 111.9 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar merged commit 10733dc into pylon Sep 6, 2026
17 checks passed
@rynfar
rynfar deleted the upstream/2026-09-06-tunnel-backoff branch September 6, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants