fix(desktop): preserve authoritative connectionId, fail-closed legacy fallbacks — #90048 - #90198
Conversation
914d35d to
32aa366
Compare
Implementation applied — exact-route-identity v2 (closes #90048 / #89719 class-closure)Packet: `PR90048_EXACT_ROUTE_IDENTITY_V2_BUNDLE.zip` applied to a real worktree at base `bdc5b1f74c` (branch `fix/89719-authoritative-connection-id`). All 8 MANIFEST.sha256 hashes verified ( What changed (source of truth: packet files/)
Receipts (real execution)
CI / push (honest)CI on the fork branch isn't auto-firing (same as #86432). Push to `axl-fork:fix/89719-authoritative-connection-id` needs Class-closureCloses the #89719/#90048 residual: alias-based route identity never sealed a canonical key pre-dial, allowing post-dial transport-metadata reconstruction to produce a stronger identity. v2 rebases identity on registry connection ID (frozen pre-dial) + canonical URL/SSH normalization, with duplicate-rejection. Addresses both #89461 findings (child-interposer bypass + transport-metadata reconstruction). |
|
Verification update (post-rebase to current main
|
Topology interlock with #90913: retain this matcher work, but align the explicit-ID authority rule before landingThis PR is the stronger implementation/provenance source for full-fidelity legacy route matching. The shared #90913, however, has the stronger current explicit-identity rule: if a descriptor already carries So these PRs should not be treated as clean duplicates and should not both land independently. The composition target is:
Downstream #90924 should consume that one canonical identity authority. It should not implement another compatibility matcher in the proof-carrying mutation layer. |
Interlock with #90913 — overlapping owner, one semantic conflictI compared the current patches and exact heads rather than treating these as independent follow-ups. #90198 is the broader #89719 residual owner: it carries the shared #88922-style route matcher, full URL/Cloud auth/header/org envelope matching, SSH port/key/path/profile discrimination, weak-legacy uniqueness gates, and the #90913 overlaps That is a real architecture decision, not a duplicate-test detail. Do not merge both independently. #90198 should remain the full-envelope/topology owner; #90913 is an interlocked explicit-ID/liveness-policy refinement whose chosen rule must be composed here (or explicitly rejected) before either path lands. Refs #90913. |
|
Canonical composition decision: #90198 is the intended surviving delivery surface, but it is not merge-authorized until it absorbs #90913's explicit-ID liveness rule. Exact evidence revalidated now:
The semantic union is precise:
I am deliberately not closing #90913 yet: its liveness invariant is still absent from #90198's production code. Retirement condition is the exact composed #90198 object + green hosted receipts, after which #90913 can self-close as superseded with its provenance preserved. |
|
Current consolidation decision after re-reading both exact heads: this PR remains the intended surviving delivery authority, but is not merge-authorized in its present state. Required current-main composition:
GitHub now reports both #90198 and #90913 nonmergeable. No third PR will be opened, neither old head’s green will be inherited, and #90913 must remain open until this branch actually contains its load-bearing semantics and tests. |
Keep explicit connection identity authoritative only while its registry entry is live, and route every legacy compatibility inference through the same complete pre-dial auth and transport envelope used by Desktop route selection. Absorbs the full matcher and collision matrix from NousResearch#90198 into the stricter current-registration contract in NousResearch#90913.
Make explicit registry qualification authoritative: only a current exact ID is accepted, while blank, malformed, unknown, or retired claims fail closed without endpoint inference. Restrict genuinely unqualified legacy descriptors to the shared full-envelope URL/Cloud/SSH matcher, reject zero or multiple matches, normalize SSH host/user identity, and prove remote-primary restoration keeps the exact (connectionId, profile) tuple. Closes NousResearch#90048. Prior work by @teknium1 in NousResearch#89719 and NousResearch#88922, @andrexibiza in NousResearch#90913, and @AndreasG78 in NousResearch#90048 (comment) shaped this implementation. @saralilyb's NousResearch#90006 remains downstream consumer context; the production stopgap is credited but excluded because registry primary does not prove route ownership.
95659ed to
9773a3d
Compare
|
Published the composed current-main repair at exact head What changed on the survivor:
Local exact-head gates:
The broader sweep's only failures are outside the changed paths: this sandbox cannot run one Prior work by @teknium1 in #89719/#88922, @andrexibiza in #90913, @AndreasG78 in #90048 (comment), and downstream context from @saralilyb in #90006 are explicitly preserved. Fresh hosted CI/Docker/Nix now own the retirement gate. |
|
Exact-head acceptance is complete for #90913's invariant/evidence has been absorbed and that PR is now closed unmerged as superseded. #90006 and #90924 remain downstream consumers to rebase after this identity owner; #89769 remains disjoint roster work with a whichever-lands-later rebase. The canonical boundary is unchanged by the production stopgap: exact current ID when qualified; full-envelope, ambiguity-safe matching only when Prior work by @teknium1 in #89719/#88922, @andrexibiza in #90913, @AndreasG78 in #90048 (comment), and downstream context from @saralilyb in #90006 remain credited. #90198 is ready for maintainer review/merge; #90048 should close through the existing |
andrexibiza
left a comment
There was a problem hiding this comment.
Reviewed exact head 9773a3dd37530024df2d915d2e1e2339ecc6153d. I found no code blocker in the connection-identity contract.
This is the surviving resolver authority:
- property presence makes an explicit
connectionIdcurrent-registry-or-fail-closed; malformed/retired claims never fall through to endpoint inference; - genuinely unqualified legacy descriptors reuse one canonical full-envelope matcher;
- URL/cloud identity includes kind, normalized URL, auth mode, token/header envelopes, and org;
- SSH identity includes host, user, port, key, Hermes path, and remote profile;
- zero or duplicate matches remain unresolved and registry order never becomes authority.
Topology decision: keep #90913 closed. #90006 and #90924 must consume connection-route-identity.ts / resolvedConnectionId() rather than introducing a second matcher, endpoint-derived fallback, or receipt-local reconstruction. Stable ID and generation fencing can be layered on the resolved identity; they must not replace the resolver that proves which current registry object the request names.
Preserve the exact NousResearch#90198 implementation tree for its five owned paths while composing upstream main b6bcb3e as the second parent. The intervening main delta does not touch any NousResearch#90198-owned file; this is topology/current-main composition only, not a regenerated identity repair.
|
Exact-head receipt refresh: the live PR head is now |
The fail-closed redesign is coherent and unusually well-tested: presence-of-property semantics for One trust-boundary question worth documenting:
|
Merged
This PR landed in
mainas38ce2d7553c42af591a59087cb62ea018f9e6917on 2026-08-23 and closed #90048.Final authored head:
032078e843e556584dc0ef7a2845a9a1bfe5a68e.Closed contract
Desktop connection identity remains registry-qualified from selection through activation:
connectionIdproperty is authoritative qualification.(connectionId, profile)tuple into gateway activation.Implementation
apps/desktop/electron/connection-route-identity.tsowns the shared full-envelope matcher derived from fix(desktop): remote-primary desktops no longer duplicate every bot row — boot descriptor carries the connection id (salvage #88697) #88922.apps/desktop/electron/desktop-remote-route.tsuses that matcher for pre-dial route selection.apps/desktop/electron/connection-registry.tsowns property-presence/current-registry authority and ambiguity-safe legacy inference.apps/desktop/electron/connection-registry.test.tscovers explicit-ID validity, local cardinality, URL/Cloud/SSH collisions, mixed-case SSH normalization, exact twins, and order invariance.apps/desktop/src/store/connections.test.tsproves remote-primary restoration activates the exact registry ID.No
main.tsorprofile-delete-routing.tsprimary-as-owner heuristic is included. The independent stopgap from@AndreasG78remains credited production evidence, not the canonical ownership rule.Exact verification
The final PR head passed:
At final reconciliation, the merged commit is an ancestor of current
mainbdf10471b5dff0d67d172065f7dbf9f4c47c4c1b. Current-main source still contains the explicit current-registry fail-closed rule and the shared unique full-envelope matcher.Provenance
@teknium1supplied registry-scoped routing in feat(desktop): Sessions workspace gains a registered-gateway switcher (#88307, salvage #88325) #89719 and the canonical full-envelope matcher in fix(desktop): remote-primary desktops no longer duplicate every bot row — boot descriptor carries the connection id (salvage #88697) #88922.@AndreasG78supplied the independent production macOS remote-primary reproduction in #90048 comment 5375227679.Disposition: merged and complete. No implementation, verification, review, merge, or tracker work remains on this PR.