Repository navigation
feat(conformance): verify resume authentication and principal isolation - #47
Merged
austinchennn merged 3 commits intoOct 17, 2026
Conversation
This was referenced Oct 17, 2026
2 of 7 tasks
2 of 6 tasks
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.
Description
Adds opt-in
server-resume-principal-v1black-box coverage for per-hello authentication, same-principal token rotation, parked/live session ownership and invalid/missing credentials on resume. Four cases use real WebSockets and an independent JSONL driver; a rejected takeover must leave Alice's original connection/session usable.Issue association
Refs #17. This is a partial server recovery-authentication substep, not full recovery, a security certification or completion of the issue.
Merged latest upstream main
c55e752, including #42/#43/#44/#45 and now-merged #46 normal recovery. This independent PR still targets main and preserves every merged profile. The recovery-rejection increment in fork Draft #1 remains separate and is not included.Behaviours Completed
server/resume-principal/same-owner,/foreign-parked,/foreign-live,/reauth. Explicit server+driver profile; defaults, old instrumentation and heartbeat-only CLI flags retain their behavior. Missing instrumentation/inventory is incomplete/nonzero; fullSuite remains incomplete.Files Changed
conformance/scenarios/server-principal.json,src/node/server-principal.ts: four cases, fresh credentials/redaction, owner/rejection ordering, public close confirmations, final model/context fences and explicit additional-peer cleanup.conformance/src/principal-oracle.ts: SDK-independent refusal/owner/effect expectations, schema/capability/sequence checks through the existing Oracle, unchanged identity/formats/cursors and logical marker cardinality.conformance/src/node/drivers/server-principal.ts,drivers/typescript-server.ts: explicitly selected public authenticated Hub edge; fresh principal objects, label-only auth observations, bounded model/context control, cached close.conformance/src/node/fixtures/principal-server.ts,test/server-principal.test.mjs: independent wire faults, accepted same-seq control, real SDK authenticate-throw control, multi-peer lifecycle and four-token leak checks.conformance/src/node/{runner,cli}.ts,src/report.ts,build.mjs,test/consumer.mjs: profile/instrumentation/inventory, final failure redaction after cleanup, distributed assets and real installed-package checks.README.md,conformance/{README.md,driver-protocol.md}: usage, language-neutral identities/observations/confirmations, bounds and exact scope.Brief Explanation
Runner owns deterministic orchestration/deadlines and independently knows the identity mapping. Transport records real traffic. Driver supplies only public application observations. Oracle checks normative refusal semantics and later owner traffic, rather than trusting the implementation's ownership lookup. Authentication observations include only label and new/resume fact, in actual invocation order. Missing observations never mean zero.
A refusal's whole close trace is checked before the next interaction; a later Alice marker and actual context receipt prove preservation. Final owner close and SDK detach precede bounded drain/effects. The model is inert with no tools/scripts/background producers. This finite trusted setup is not dishonest-driver detection, arbitrary-work supervision or process-tree isolation.
Foreign/unknown checks compare normative code/recoverability/seq/close/no-ready/no-business semantics, not exact descriptions, close reasons or timing. Close codes are checked together with authoritative error frames on a direct loopback path (§9.3). No constant-time/side-channel guarantee is claimed.
No production SDK, normative spec/schema/vector, dependency or lockfile changes. No production defect requiring a separate fix was found.
Testing
Environment: macOS 26.6.2 arm64, Node 22.23.3.
npm run test:conformance: 144 passed = 121 tests already on latest main + 23 principal tests. Includes builds/conformance typecheck and all merged profiles. Merged feat(conformance): verify server input and audio frame boundaries #44/feat(conformance): verify client invalid control handling #45/feat(conformance): verify normal server resume and replay #46 profiles are included; fork Draft rejection features remain absent.sdk-throwuses the actual public SDK authenticate hook throwing for invalid/missing credentials; all four cases still pass.npm run test:conformance:consumer: passed; exact tarball installed outside the checkout without SDK peers, all merged/new profiles run. Removingserver/resume-principal/reauthproduces incomplete at inventory/exit 1. Schemas/scenarios/driver assets resolve from the installed package.npm test: 465 passed, 26 SDK files.npm run test:e2e: 7 passed.npm run typecheck,npm run check:spec: passed; 23 schemas, 1 capability, 156 control vectors, 9 audio vectors.npm run check:budgets: passed, including zero-dependency/import boundaries. Production sizes unchanged: protocol 2.16 KB min+gzip / 5 KB; core 5.11/15; client 5.26/20./private/tmp/vrt-open-47after46-ur20viyz, with every tracked source byte-compared identical to the requested checkout. Workspace links resolve to the mirrored packages and external dependency versions are unchanged. Temporary binaries match their hosts (0.25.10 repository build/budget; 0.28.2 Vite). No workaround/config/dependency change is committed. Direct Desktop native-build completion is not claimed.git diff --check: passed. No separate lint/format script is configured. Python, standalone Workers and production SDK pack/consumer/release dry-run were not rerun for this conformance-only diff. Actual conformance tarball verification was run. Hosted CI is separate evidence. No package published.Unsure About
Implementation Order and Acceptance — #17
The upstream issue checklist was re-read before delivery. Permissions are read-only, so upstream issue text/checkmarks were not modified. Checked subitems mean locally implemented/verified, PR pending merge, not already on upstream main. Maintainer-copyable fragment preserving the mixed parent:
Latest status checked at integration refresh: #42/#43/#44/#45/#46 merged; this PR remains pending; fork Draft #1 remains separate/open/draft on its recovery branch. The separate contributions remain separately scoped. Existing supervisor/contributor text and checkmarks were preserved; no broad parent was marked complete.
Integration refresh: latest main was merged without rewriting existing commits; nine common integration/docs conflicts were resolved additively. Full build/conformance/SDK/e2e/type/spec/budget/tarball checks were rerun in
/private/tmp/vrt-open-47after46-ur20viyz, with every tracked source byte-compared to the target checkout, same-version temporary esbuild binaries and correctly scoped workspace dependencies. No workaround is committed. This maintains the existing substep, not additional #17 feature acceptance; upstream issue checkmarks remain unchanged.Post-#46 integration refresh: resolved all nine listed common-file conflicts after normal recovery entered main. Existing recovery, input/client-control validation, heartbeat and principal isolation remain independently selected and tested. No production SDK/spec/dependency changes or new acceptance scope.