Add schema-discovered repository-backed session creation - #451
Draft
Osvaldo Ortega (osortega) wants to merge 1 commit into
Draft
Osvaldo Ortega (osortega) wants to merge 1 commit into
Osvaldo Ortega (osortega) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 16, 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.
Draft / review status
Draft for human public protocol and SDK review. Three independent model reviews completed with no blocking findings. Live host/client interoperability remains unverified. This PR does not cut a release or change the protocol version.
Summary
RepositorySessionConfig { urlProperty: string; revisionProperty?: string }and optionalSessionConfigSchema.repository.resolveSessionConfig.configandcreateSession.config. Schema discovery does not prepare a repository. Repository intent and non-emptyworkingDirectoriesare mutually exclusive.creating/ready/failedlifecycle. Progress remains optional and ephemeral.Public client counterpart
microsoft/vscode#336361 is the public draft client implementation for this schema-based flow. The client synchronization uses proposed AHP revision
5eadbe33f6048f748fe42a0a125b96e91414bfdcthrough the existing generator. Both PRs remain drafts for review.Validation
npm run generatepassed; regeneration leaves the committed tree unchanged.cargo check --locked --manifest-path clients/rust/Cargo.toml -p ahp --libpassed, including the generatedahp-typesdependency.npm run testpassed, including protocol typecheck, lint, fragment/release checks, schema checks, and reducer coverage.--filter-classoption passed all 48 wire-fixture tests.Review path (~12 minutes)
Premise and vocabulary (2 min): start with the descriptor and schema. The premise is that existing config and session state can express one-repository creation without a new imperative RPC. Stop here if that premise is wrong.
Host behavior (4 min): read repository-backed creation in this order: field constraints, input validation, recoverable state, then retry/cleanup. Check the ordering of authorization, preparation, published directories, and readiness; also check what a minimal client can ignore.
Generated wiring (3 min): inspect the five generator registration additions, then the Rust representation and equivalent mirrors. Check optionality, exact wire names, public exports, and .NET serializer registration. TypeScript and reference-doc mirrors remain generated-and-ignored by repository convention.
Tests (3 min): finish with schema-shape coverage, generic SDK config round-trips, and the three new shared fixtures. Check absent descriptors, optional revisions, host-chosen field names, and durable state rather than progress.
Choices to challenge
workingDirectories. An initial empty-array fixture exposed existing Goomitemptybehavior; this PR preserves the field's existing optionality rather than changing general Go array serialization. The ready-session fixture still checks resolved directories.Scope and verification limits
This is a creation-only contract for one repository, not project management or a concrete repository-preparation implementation. It adds no RPC, dedicated creation argument,
_metaconvention, lifecycle state, cancellation command, or protocol version.Old schema payloads remain valid. Older released binaries and all downstream source/binary compatibility were not exercised. In particular, Rust callers constructing
SessionConfigSchemawith struct literals must supply the newrepositorymember (Nonefor legacy behavior).