Skip to content

fix(server): keep malformed usage sources from disconnecting clients - #11368

Open
shivamhwp wants to merge 1 commit into
fix/client-device-ticket-http-groupfrom
fix/server-usage-source-empty-label
Open

fix(server): keep malformed usage sources from disconnecting clients#11368
shivamhwp wants to merge 1 commit into
fix/client-device-ticket-http-groupfrom
fix/server-usage-source-empty-label

Conversation

@shivamhwp

Copy link
Copy Markdown
Collaborator

A usage source URL such as localhost:8317 parses with an empty host. Its empty display label fails config-event encoding, disconnecting configuration subscribers and causing the client to reconnect.

Fall back to the source ID when the parsed host is empty, with a readable fallback for a blank ID. Keep the source error visible. This does not repair the configured URL or change management-key handling.

The regression exercises the real usage source service and encodes its config event. All 13 focused usage tests pass; the regression fails on the parent. Targeted lint, format and diff checks pass. Server typecheck passes.

Refs #10193. Stacked on #11298. Internal Fable refinement pending.

GPT-6 via Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 12, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c76ed92

Macroscope's review found this PR approvable — The change is a small, isolated server bug fix that supplies valid fallback labels for malformed or hostless usage-source URLs, preventing configuration events from disconnecting clients. Existing labels and normal URL handling remain unchanged, and the added regression test covers the affected cases.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 66.4 KiB
Claude Live turn messages 10 21

Baseline: unavailable · PR result: c76ed92 · 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: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

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

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

Labels

size:XS 0-9 changed lines (additions + deletions). 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.

1 participant