GeezerVison is showing github.com — fix(clients): reject server configuration from another environment by rynfar · Pull Request #950 · pylon-code/pylon
Conversation
rynfar
commented
Sep 30, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
A WebSocket could pass readiness and publish server configuration whose environment ID differed from the prepared connection. This can attach configuration to the wrong environment after a host or endpoint changes. Validate the first configuration before readiness, config reads and probes; gate both shared and custom config subscriptions on that validation. A mismatch keeps the existing configuration-blocked error and durable-consumer RPC error shapes, and the owning connection scope closes the socket.
Related to #865 and the historical #736 partial audit. Selectively adopts the independent client identity guard from T3 source 3b75e607eb909522a8f5562fb40e44efc72bb66c (#8606), using the equivalent filterOrFail form from 568c9bc4d0ef0dddf74d813619c9877bd35624d7. Found while reviewing the Effect source's paths that #944 did not change. The reusable dev-token feature and all other auth/session changes from #8606 remain deferred under their existing product decision; this is a partial adoption, not whole-source closure.
The shared runtime serves web/Electron and mobile. The guard applies after connection preparation for primary, bearer, relay and SSH targets, including tunnels. No wire schema, persistence migration, provider or pairing-token change. Existing config replay, capability negotiation, probe fallback, reconnect and failure mapping stay intact. Validation concerns the first configuration of each socket attempt; it does not continuously re-authorize a host.
Validation:
- Four regression cases fail on fresh Pylon before the fix: readiness incorrectly succeeds for the wrong environment. With the fix, all 24 RPC session tests pass. Negative cases also verify shared/custom config streams fail, initial config/probes reject, no extra request reaches the wrong host, and scoped socket disposal completes for all four target kinds.
- All 66 focused supervisor, session-state and server-state tests pass, including existing matching-host and recovery behavior.
- Client-runtime typecheck and scoped lint/format/diff checks pass. Rebased onto fresh Pylon after documentation-only docs(upstream): close cycle #865 and advance the review cursor #949; the tested client code is unchanged by that rebase.
- No rendered client, live host, device, release or install claim. Final-head CI and developer merge approval remain required.
Model: GPT-6. Harness: Codex in Pylon. Workflow: review-t3-upstream skill.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2Fef26d88456de9cc93cf03b8611c53675c8af4fc8361b0049e62a133b46e853b6%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2e737667)
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Validate the first WebSocket configuration against the prepared environment
before exposing readiness or configuration streams. Preserve the RPC failure
shape used by durable consumers and scope-owned socket cleanup.
Port the independent identity guard from historical source
3b75e607eb909522a8f5562fb40e44efc72bb66c (#8606), using the equivalent
Effect.filterOrFail rewrite from
568c9bc4d0ef0dddf74d813619c9877bd35624d7. Reusable development tokens and
other authentication changes remain deferred.
Verify mismatched configurations, config streams, probes and socket disposal
for primary, bearer, relay and SSH targets; preserve matching and recovery tests.
Related: #736, #865
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 |
— |
14.0 KiB |
— |
15.1 KiB |
✅ |
| Codex |
Thread snapshot wire |
— |
7.3 KiB |
— |
7.3 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
— |
6.7 KiB |
— |
7.8 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
— |
58.0 KiB |
— |
66.4 KiB |
✅ |
| Codex |
Live turn messages |
— |
9 |
— |
21 |
✅ |
| Claude |
Total thread wire |
— |
14.0 KiB |
— |
15.1 KiB |
✅ |
| Claude |
Thread snapshot wire |
— |
7.3 KiB |
— |
7.3 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
— |
6.8 KiB |
— |
7.8 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
— |
58.9 KiB |
— |
66.4 KiB |
✅ |
| Claude |
Live turn messages |
— |
9 |
— |
21 |
✅ |
Baseline: unavailable · PR result: 14b13ae · 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: 115.7 KiB
- Claude decoded thread snapshot: 116.5 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|