Skip to content

feat: sync stable SDK contracts through CLI 1.0.90-5 - #210

Merged
krukow merged 5 commits into
mainfrom
krukow-upstream-sdk-sync-f24
Oct 1, 2026
Merged

krukow merged 5 commits into
mainfrom
krukow-upstream-sdk-sync-f24

Conversation

@krukow

@krukow krukow commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Generated via Copilot on behalf of @krukow

Summary

Recertifies the complete Node SDK surface from d106d29 through a2b2c18: nine upstream snapshots, 338 changed paths, 800 package-root exports, and 105 public types.ts interfaces. Updates the checksummed CLI/schema pin to 1.0.90-5.

  • Adds :allowed-models consistently across create, resume, join, and async builders. Preserves exact IDs, empty vectors, ordering, and omission; rejects explicit nil. No experimental live policy setter.
  • Adds optional, extensible MCP :config-source / :error-classification strings with live/history coverage. Preserves passive read-only permission-result events without adding permission-granting authority.
  • Fixes owned stdio EOF/telemetry finalization, including blocked writes, bounded termination, and process-handle cleanup. Preserves captured async completion across remote EOF, fences reader termination to its originating connection, and restores the configured URI port on restart.
  • Adds a contract matrix, ADR, real subprocess/TCP regressions, generated documentation, and immutable local artifact seals. Historical certification files keep their original pins. Installation snippets point to the validated implementation.

Intentional exclusions

New AHP hosting, installation confirmation/management, sandbox provenance/path grants, read-only permission decisions, and Fusion additions remain experimental and excluded. Existing Workflow scope and other experimental exclusions are unchanged. Generated-only and language-specific changes are classified rather than promoted into the public API.

Validation and review

  • COPILOT_UPSTREAM_VALIDATION=true bb test: 1,032 tests / 14,272 assertions, no failures or errors.
  • Authenticated bb ci:full against checksummed CLI 1.0.90-5: 1,032 tests / 10,629 assertions, all 23 portable example invocations, documentation validation, and JAR build passed. Child runtimes used an isolated Copilot home with MCP loading disabled.
  • Final sealed-certification/API/optional-contract gate: 22 tests / 1,984 assertions passed.
  • Schemas, generated code, API snapshot, and generated docs were regenerated and checked for determinism. Documentation has three pre-existing historical-namespace warnings.
  • Independent surface/lifecycle review and a focused follow-up review completed. Reproduced and fixed blocked stdin closure, lost completed async results at EOF, NIO closure cleanup, stale-reader connection ownership, and dead-process handle retention; targeted regression suites passed.

Release policy

No release, tag, deployment, or library version bump. The library remains 1.0.14.0. Merge with a merge commit so the exact-pin artifact-seal ancestry remains intact.

krukow and others added 3 commits September 30, 2026 08:33
Port exact model restrictions and MCP failure metadata, preserve completed async results across EOF, and bound owned stdio shutdown. Keep experimental host and installation authority excluded.

Upstream: github/copilot-sdk@a2b2c18

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Anchor the complete public-surface inventory and contract proofs to the reviewed implementation while preserving all historical evidence pins.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Remote EOF still cancels captured async completion belonging to a displaced session snapshot.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Recertifies stable SDK contracts through CLI 1.0.90-5, adding model-policy and MCP metadata support while strengthening transport teardown and EOF handling.

Changes:

  • Adds :allowed-models and MCP failure metadata contracts.
  • Improves stdio shutdown, EOF draining, async completion retention, and TCP reconnects.
  • Updates certification evidence, tests, schemas, examples, changelog, and generated documentation.
File Description
test/​github/​copilot_sdk/​teardown_test.clj Updates teardown fixture state.
test/​github/​copilot_sdk/​stdio_runtime_fixture.clj Adds subprocess shutdown fixture.
test/​github/​copilot_sdk/​protocol_test.clj Tests EOF draining and NIO closure.
test/​github/​copilot_sdk/​optional_wire_contract_test.clj Enrolls allowed-models contract.
test/​github/​copilot_sdk/​integration/​upstream_1_0_90_5_test.clj Tests new upstream contracts.
test/​github/​copilot_sdk/​client_transport_lifecycle_test.clj Covers process and reconnect lifecycles.
src/​github/​copilot_sdk/​specs.clj Adds public option and event specs.
src/​github/​copilot_sdk/​session.clj Preserves captured async completion.
src/​github/​copilot_sdk/​protocol.clj Drains notifications and fences readers.
src/​github/​copilot_sdk/​process.clj Adds bounded stdio finalization.
src/​github/​copilot_sdk/​client.clj Integrates lifecycle and builder changes.
src/​github/​copilot_sdk.clj Documents the facade option.
schemas/​README.md Advances the schema pin.
resources/​github/​copilot_sdk/​api_surface.edn Updates the API snapshot.
README.md Refreshes the installation SHA.
examples/​basic_chat.clj Demonstrates an allowed model policy.
doc/​upstream-doc-gap-matrix.md Records experimental exclusions.
doc/​reference/​API.md Documents new contracts and lifecycle behavior.
doc/​mcp/​debugging.md Documents MCP failure metadata.
doc/​index.md Links the new ADR.
doc/​getting-started.md Refreshes the installation SHA.
doc/​api/​topic-manifest.edn Enrolls the new generated topic.
doc/​api/​style.html Regenerates topic navigation.
doc/​api/​overview.html Regenerates topic navigation.
doc/​api/​github.copilot-sdk.generated.event-metadata.html Regenerates API navigation.
doc/​api/​dynamic-workflows.html Regenerates topic navigation.
doc/​api/​doc-auth-index.html Regenerates topic navigation.
doc/​api/​custom-agents.html Regenerates topic navigation.
doc/​api/​codegen.html Regenerates topic navigation.
doc/​api/​byok.html Regenerates topic navigation.
doc/​api/​azure-managed-identity.html Regenerates topic navigation.
doc/​api/​2026-09-30-model-policy-and-lifecycle-sync.html Adds generated ADR output.
doc/​api/​2026-09-27-dynamic-workflow-migration.html Regenerates topic navigation.
doc/​api/​2026-08-10-host-owned-inference-boundary.html Regenerates topic navigation.
doc/​api/​2026-08-08-query-seq-scoped-lifecycle.html Regenerates topic navigation.
doc/​adr/​2026-09-30-model-policy-and-lifecycle-sync.md Records design and scope decisions.
CHANGELOG.md Records unreleased contract changes.
.github/​workflows/​ci.yml Advances the upstream validation pin.
.github/​skills/​update-upstream/​references/​PROJECT.md Expands upstream authority mapping.
.copilot-schema-version Sets CLI schema version 1.0.90-5.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/github/copilot_sdk/client.clj Resolved
Carry the remote-close reason through displaced snapshot cleanup and failed-resume rollback. Cover both snapshot ownership paths with saturated async output and original idle/error outcomes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 07:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The blocked-writer regression never exercises the new successful-shutdown finish-stdio! path.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Blocked-writer fixture does not verify bounded successful shutdown

test/​github/​copilot_sdk/​stdio_runtime_fixture.clj:53

The :blocked-writer fixture waits for stdin EOF before sending the runtime.shutdown response. Consequently stop! times out the RPC and takes the ordinary destroy fallback; it never sets runtime-shutdown-completed? or calls the new finish-stdio! path. This case therefore does not verify the claimed successful-shutdown behavior where stdin close itself is blocked and must be bounded independently. Add a fixture mode that acknowledges shutdown first, then synchronizes a blocked write/close, and assert that stop! still reaches termination within the bound.

Watch file contents and modification events before interrupting graceful shutdown. File creation alone can precede telemetry flush and let force-stop kill the fixture before it writes the expected record.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The extensive parity sync includes concurrency-sensitive transport teardown that warrants final human review despite strong regression evidence.

Review effort: Balanced
Findings: None

@krukow
krukow merged commit fe4666e into main Oct 1, 2026
3 checks passed
@krukow
krukow deleted the krukow-upstream-sdk-sync-f24 branch October 1, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants