Repository navigation
core: plan the programmatic extension path in the core too - #1127
Merged
Merged
Conversation
Add `extension_resolution::plan_extension_path` with its unit tests, implementation stubbed. Pushed on its own so CI is observed red before the implementation lands. The config-entry planner already lives in the core (#1119); the programmatic `extensions=[{path}]` probe is the last piece both SDKs still port from one another. Part of #1122.
Implement `extension_resolution::plan_extension_path` and route both SDKs'
`resolve_extension_path` / `resolveExtensionPath` through it, so a programmatic
`extensions=[{path}]` entry is classified by the same code as a config entry
and each host keeps only the package lookup it alone can do.
The `is_bare_name` / `isBareName` binding exports were that probe's only
callers, so they go; `plan_extension_path` / `planExtensionPath` replaces them.
Resolved paths and error messages are unchanged.
Part of #1122.
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.
Slice D of #1072/#1111: the last piece of extension resolution both SDKs still
ported from one another — the programmatic
extensions=[{path}]probe — movesinto the core, and the binding exports it made necessary go away.
dirsql::extension_resolution::plan_extension_pathclassifies one path the sameway the config planner classifies a config entry: a path-looking value is a
Literal(made absolute againstbaseonly when asked), a bare name is aPackagewith a shadow probe. Python'sresolve_extension_pathandTypeScript's
resolveExtensionPathare now one call to the planner plus theexisting
plan_entry_path/planEntryPath, so each host keeps only thepackage lookup it alone can do (
importlib.util.find_spec/require.resolve).is_bare_name/isBareNamewere that probe's only callers; both bindings dropthem in favor of
plan_extension_path/planExtensionPath.Resolved paths and error messages are unchanged, so no migration fragment.
Fixes #1122.
Parity
Restores parity rather than drifting: both SDKs move onto the same core
contract, and Rust stays file-path-only by design (the #227 carve-out).
PARITY.md's "Where the planning lives" paragraph is updated.Manual verification
Built the
packages/rust/tests/fixtures/testextcdylib, installed it as a fakepackage, and resolved it by bare name through both SDKs:
E2E Verification
cargo test --workspace --features clivia preflight)packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python)packages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts)just test-e2e,just e2e-attest-python,just e2e-attest-ts,just preflightjust preflightreports 0 failing pairs.Changelog / Migrations
<root>/<pkg>/changelog.d/for each changed package (rust, python, ts)<root>/<pkg>/migrations.d/(not required — internal refactor, no observable change)Red/green
600349epushed the core contract with the implementation stubbed; CI wasobserved red for the right reason (
not implemented: plan_extension_path, 4failing tests in
dirsql Rust CI).c053177implements it.