Repository navigation
Maintain the Jam patch set on current upstream with a weekly replay - #2
Merged
Merged
Conversation
Cargo unifies features across the dependency graph, so the hard-coded reqwest/native-tls feature flipped reqwest's TlsBackend::default() to native-tls for every reqwest client in a consumer's whole binary, not just the SDK's request-handler transport. Introduce rustls (default, aws-lc-rs via reqwest's rustls feature) and native-tls (opt-in) features instead. Fixes github#1805 Backport of github#2811 (58a4cae) for Jam until it merges upstream.
Upstream github#1964 moved the build-script CLI download from ureq's rustls stack to native-tls. Build dependencies are part of every consumer's resolved graph, so that change put native-tls (and OpenSSL on Linux) back into consumers that ban it, even with `default-features = false` and no bundled CLI. Use ureq's rustls provider with the platform verifier for the same OS trust store, and drop the native-tls probe. rust/Cargo.lock is intentionally left to the next resolve so the weekly replay does not conflict on upstream lockfile churn.
Copilot's native child can exit while its Node launcher remains alive. Expose the SDK-owned transport lifecycle so embedders can observe it and tear down cleanly: - Client::is_disconnected() reports observed EOF, read failure, write failure, or explicit transport closure. - Client::wait_for_disconnect() serves current and late waiters without polling. - A failed write closes the connection and cancels pending requests; requests issued after closure fail instead of waiting forever. - Client::stop() skips impossible remote cleanup after confirmed transport loss, clears local session routing, and still reaps the owned child. Healthy RPC failures remain reported. Port of #1 (01e7071) onto current upstream main, reusing upstream's connection-closed token as the closure signal.
Weekly replay of the fork-only commits onto github/copilot-sdk main into jam-rustls-transport-latest, validated before push. thenvoi/tjam's fork-freshness watcher turns a red run or a new staged revision into a tjam issue.
Documents each fork-only change, what was dropped since the v1.0.6-preview.1 fork, the weekly replay, manual conflict recovery, and the tjam upgrade procedure.
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.
What this sets up
The Jam patch set as an org-owned maintenance branch with a weekly upstream replay. This is the same arrangement
thenvoi/codex-sdk-rsuses, and it replaces the pin ondarvell-thenvoi/copilot-sdk.mainstays an upstream mirror (it is atcf245cdf, the same asgithub/copilot-sdkmain).jam-rustls-transport(new, created atcf245cdf) becomes the maintenance branch: upstreammainplus the commits in this PR, kept linear.jam-rustls-transport-latestis created by the workflow on its first run. tjam'sfork-freshnesswatcher compares it with tjam'sCargo.lock.Commits
native-tls. Build dependencies are part of every consumer's resolved graph, sonative-tlscame back for Jam even withdefault-features = false. This commit uses ureq's rustls provider with the platform verifier and makes the matching dev-dependency change.Client::is_disconnected()andwait_for_disconnect().stop()skips impossible remote cleanup after confirmed loss and still clears routing and reaps the child..github/workflows/jam-rebase-rustls-transport.yml. It runs Mondays at 07:13 UTC and on demand. It replays the fork-only commits onto upstreammain, then runs fmt,check --all-targets, and the lib tests. It also checks thatnative-tls/openssl-sysstay out of the--no-default-features --features rustlsnormal and build graph. It pushesjam-rustls-transport-latestonly when the result changes.FORK-CHANGES.md. It covers each patch, what was dropped, recovery, and the tjam upgrade steps.Two parts of the old fork are dropped:
userInput.requestdispatch, because upstream now dispatches every inbound request on its own task.rust/Cargo.lockis deliberately left out of the patches, so upstream changes to the lockfile can't make the weekly replay conflict.Validation (local, macOS arm64, toolchain 1.94.0)
upstream/main(cf245cdf) in a fresh clone, as the workflow does. The resulting tree is identical to this branch.rust/:cargo fmt --all --checkpassed.cargo check --all-targets --features test-supportpassed.cargo test --lib --features test-support: 356 passed.native-tls/openssl-sys. The same check run with--features native-tlsflags it, so it can detect a regression.cargo clippy --all-targets --features test-support -- -D warningsis clean.build_downloadandbuild_acquisitiontests pass (15 + 4).default-features = false, features = ["rustls"]has nonative-tlsoropenssl-sysfor the macOS, Linux (x86_64-unknown-linux-gnu), and Windows (x86_64-pc-windows-msvc) targets. Before commit 2,native-tlscame in through the build-scriptureq.router.clear()instop(), the two stop tests fail.Not yet verified: the workflow's first run on Linux CI. Its validation step runs before any push, so a red run publishes nothing.
Merge and setup
jam-rustls-transport. Scheduled workflows run only from the default branch.jam-rebase-rustls-transport→ Run workflow once. This createsjam-rustls-transport-latest.jam/rustls-and-dispatch-v1.0.6-preview.1with Create a merge commit. That keeps01e70715d(tjam's current pin) on an org branch.Opening this PR may also trigger upstream's own
pull_requestworkflows in this fork. Some of them expect upstream secrets.