Repository navigation
feat(conformance): verify client invalid control handling - #45
Merged
austinchennn merged 3 commits intoOct 17, 2026
Merged
austinchennn merged 3 commits into
austinchennn merged 3 commits into
Conversation
This was referenced Oct 17, 2026
This was referenced Oct 17, 2026
This was referenced Oct 17, 2026
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
client-control-validation-v1: five black-box cases verify that a ready client reports malformed control input, does not execute it or pollute sequence/epoch/call state, and still executes a subsequent legal tool call exactly once. The suite uses real WebSockets and independent JSONL driver processes.Issue association
Refs #17. This is a partial client invalid-control substep, not completion of the issue or full compatibility certification. Updated onto upstream main
26aa7f3, including merged #42 heartbeat, #43 ACK/replay repair and #44 server input/audio boundaries. This independent PR still targets main. An additive merge preserves both server input validation and client control validation; #46/#47 and fork Draft #1 are not included.Behaviours Completed
client/control/framing,/version,/types,/fields,/state-call. Explicit client/driver-only profile; old ready/finish forms and profiles preserve their behavior.Files Changed
conformance/scenarios/client-control.json,src/node/client-control.ts: five cases, unmodified server-vector loading, raw invalid sends, legal state/call/retransmission, transcript fence and epoch probe.conformance/src/client-control-oracle.ts: independent normalized application observations and logical tool-result checks; no SDK decoder/Inbox/Outbox/gate dependency.conformance/src/node/drivers/client-control.ts,drivers/typescript-client.ts: opt-in public connect/events/tool instrumentation, bounded snapshots and explicit closed-event fence. Existing cancellation/default implementation stays on its original path.conformance/src/node/fixtures/control-client.ts,test/client-control.test.mjs: independent actual wire/control faults, allowed replay and lifecycle checks.conformance/src/node/{runner,cli}.ts,src/report.ts,build.mjs,test/consumer.mjs: profile/inventory selection, package fixture/scenarios, installed success and missing-case verification.README.md,conformance/{README.md,driver-protocol.md}: usage, additive language-neutral controls, normative distinctions and scope limits.Brief Explanation
Runner orchestrates deadlines and barriers; transport remains unchanged; the official driver observes only public SDK APIs; independent schema/state/effect checks judge target output and application observations. Deliberately invalid server injections are not incorrectly passed through an oracle demanding valid input. Expected classifications come from spec/shared vectors, never the tested decoder.
The transcript receipt fence follows the real legal tool result and repeated call, so final effects cover prior input. The post-completion interrupt is only an observed-epoch probe, not a new cancellation scenario. The driver has no asynchronous probe, model or external side effect; finite event-loop drain plus public closed notification and wire close fence establish this controlled scenario's end. No timed sleeps or private state inspection are introduced.
Testing
Local environment: macOS 26.6.2 arm64; Node 22.23.3. Commands used Node 22 first on PATH.
npm run test:conformance: 102 passed (86 latest-main tests + 16 client-control tests), including production/conformance builds and conformance typecheck. Official client passes all five cases.npm run test:conformance:consumer: actual tarball installed outside the repository with no SDK peer install; all merged profiles and this profile run. Removingclient/control/state-callyields incomplete at inventory and exit 1. Schemas and server vectors resolve from installed assets.npm test: 465 passed, 26 files, rerun for this integration refresh; fix(protocol): reject incomplete replay after ACK deletion #43 regressions are included. feat(conformance): verify server input and audio frame boundaries #44's conformance profile is included in the separate full conformance run.npm run typecheck,npm run check:spec: passed (23 schemas, 1 registered capability, 156 control vectors, 9 audio vectors).npm run build(via conformance pipeline),npm run check:budgets: passed, including dependency/import boundaries; production sizes unchanged (protocol 2.16 KB min+gzip / 5 KB; core 5.11/15; client 5.26/20).npm run test:e2e: 7 passed, rerun for this integration refresh.git diff --check: passed. No standalone lint/format script is configured.Validation environment for this refresh: because native esbuild file opens previously stalled in the Desktop checkout, the full build/conformance/SDK/e2e/type/spec/budget/installed-tarball checks ran in
/private/tmp/vrt45-merge-verify-w0e4swah. Every tracked source file was byte-compared identical to the target checkout; workspace dependencies resolve to the mirrored packages, external dependency versions are unchanged. Temporary esbuild copies match their hosts (0.25.10 repository build/budget, 0.28.2 Vite). No workaround, dependency change or local path was committed. Direct Desktop native-build completion is not claimed.Unsure About
Implementation Order and Acceptance — #17
The current issue checklist was re-read before delivery. Upstream repository access is read-only, so its author's issue body was not modified. Checked subitems below mean locally implemented and verified, pending merge, not upstream delivery. Maintainer-copyable progress:
#42/#43/#44 are merged on upstream main. This PR remains pending review/merge. No existing supervisor/contributor issue text or checkmark was rewritten, and no mixed parent was marked complete.
Integration refresh after #44: latest main merged without rewriting existing commits; all eight conflicting integration/docs files preserve both profiles. This is maintenance of the existing client-control substep, not an additional conformance feature or a completed recovery/security parent. Upstream issue checkmarks remain unchanged.