Repository navigation
Conversation
Allow callers that own skill reconciliation to omit the SDK's automatic post-resume reload. Preserve awaited best-effort behavior by default and leave mandatory resume readiness and wire settings unchanged. Cover request omission, retained default behavior, callbacks, and cleanup with framed transport controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation preserves compatibility, remains local-only, and has thorough regression coverage.
0 open findings
What changed in this PR
Adds a Rust-only opt-out for automatic skill reload after resuming a session while preserving existing default behavior.
Changes:
- Adds
ResumeSessionConfig::with_reload_skills(bool). - Conditionally skips the post-resume reload without changing wire/AHP configuration.
- Adds comprehensive resume, callback, cleanup, provider, and serialization tests.
| File | Description |
|---|---|
rust/src/types.rs |
Defines and documents the new configuration option. |
rust/src/session.rs |
Applies the option during resume. |
rust/src/types/tests.rs |
Verifies local-only configuration behavior. |
rust/src/ahp_host/factory_tests.rs |
Confirms AHP settings remain unchanged. |
rust/tests/prepared_session_test.rs |
Tests ordinary/prepared resume and cleanup behavior. |
rust/tests/session_test.rs |
Extends startup callback coverage. |
rust/tests/skill_provider_test.rs |
Verifies provider callbacks without automatic reload. |
rust/README.md |
Documents behavior and limitations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
CI diagnosis for
The exact-base main run 37875911048, at The managed fixtures fail on both published legacy and native transports. CI selects In PR run 37894466201, all four actual Rust platform jobs, schema/SDK freshness, and CodeQL passed. The final PR check rollup is 42 successful, 47 skipped, and 9 failed. The PR remains blocked, not CI-green. Potential Node/layout/policy-fixture maintenance is separately scoped, not added to this Rust PR. No test skips, weakened assertions, retries, or merge bypasses are proposed. |
Summary
Fixes #2827.
Add the Rust-local
ResumeSessionConfig::with_reload_skills(bool)option. Unset/true retains the existing awaited, best-effort automatic skill reload. Explicit false omits that SDK-issued request for callers that own required skill reconciliation.The Rust SDK currently waits for
session.skills.reloadafter a successfulsession.resumereply. Returned reload errors are tolerated, but an unanswered request can keep resume pending. Callers that already own reconciliation cannot currently prevent this additional operation.The option controls issuance only. It does not disable skills, imply catalog or disabled-preference freshness, cancel an already-issued request, or gate pending work or work running on another connection. No timeout, detached refresh, or retry is introduced.
Compatibility
session.rpc().skills().reload()remains available.Synthetic regression coverage
Framed in-memory transport controls cover ordinary/prepared omission, startup events and hooks, mandatory readiness, default/true reload settlement and returned errors, explicit caller reload, provider callbacks, failure/cancellation cleanup, and terminal owner-connection loss. Configuration tests cover cloning, Debug output, preserved skill configuration, and unchanged wire/AHP settings.
Verification
Commands ran from the Rust crate directory without runtime acquisition.
Semantic red: with only the automatic-reload gate temporarily removed, the following compiled and failed both ordinary/prepared opt-out controls on actual
session.skills.reloadinstead of expectedsession.options.update. The gate was restored immediately.Passing fixed controls:
Results: 39 prepared-session and 15 provider tests; 6 startup-callback controls; 15 resume-filter tests (one repeats a callback control); and 2 local configuration/wire/AHP unit controls. The no-runtime unit build emitted two existing dead-code warnings. Focused Clippy and pinned formatting passed.
Documentation limitation: strict rustdoc failed on the pre-existing, unchanged HEAD link
SessionFsSetProviderConventionsatsrc/session_fs.rs:135. It did not pass.The warning-capped alternative generated documentation with only that warning and no new API-link warnings; unrelated source is unchanged.