Repository navigation
Add Engine-like Python connections and verified functional recovery - #93
Merged
Merged
Conversation
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.
Summary
Scientists can connect through an Engine-like orchestration layer, inspect and select usable services, compute and export observations, close locally, and restore the original authorized work in another Python process using the existing Client APIs.
DeploymentProfile, typed bootstrap identity/service references, catalog and injectable selection policy.POST /api/v2/engines/auth-cert). Parse Java-properties encoding/escaping/continuations, enforce explicit Hub/service trust, and reject credential-bearing redirects.Example
The same workflow accepts
IssuedTokenProvider; profile/environment references keep credential values outside profile files, saved handles and subprocess arguments. Authentication/group metadata is descriptive, not a client-side authorization grant.Functional tests added
python-client/tests/functional/test_connection.pycontains four live cases:The existing runner recognizes
connection-onboarding,connection-recovery,connection-accessandconnection-readiness. Onboarding/recovery share the same combined two-provider scenario. Offline unit/local HTTP subprocess checks cover trust, redirects, ambiguity, expiry, identity changes, unknown capabilities, deterministic deadlines, cleanup faults and mutation non-replay.Validation
Reviewed integration base:
9c7c371539ff31a05238cfc7355395ca05f21aceonfeature/python-client.Verified connection milestone:
1bb607ea08e5acdc86f294afa634cc16dead6cb1. The subsequent diagnostic-only correction is included on this PR branch and has separate validation below.E9,F63,F7,F82lint, sdist and wheel builds passed.PYTHONOPTIMIZE=1, including the four new connection cases and three existing regressions. Independent fixture oracle: 20 cells at 123.25 m and 20 at 123250 mm; native GeoJSON identity and geographic corners checked independently.Executable source digest for that verified milestone:
b11a45bc8fc1225e0469e833349122d858bdb6c1c4b4fbfdad3de8ede3d8d687.JSON diagnostic refinement on this PR
The optional review note is addressed: invalid-JSON classification is limited to JSON decoding. A closing
ValueErrororTypeErrorafter a valid response now produces a sanitizedTransportError, while malformed JSON/encoding remains aProtocolError.Follow-up validation: 17 focused tests and 780 full offline tests passed on Windows Python 3.12.7, with existing coverage/lint gates passed. The earlier installed-interpreter/build/live results above describe the verified milestone; they were not rerun for this narrow diagnostic-only follow-up. Updated hosted checks run on the PR branch.
Evidence and reproduction:
python-client/docs/connection-verification.mdpython-client/docs/results/bootstrap-cleanup-verification.jsonpython-client/docs/connection-layer.mdControlled acceptance used explicit compiled server candidate
244883d7b04f1eae2cc22e799575d33a9bdb2a43, pinned imod608bef150ced0a109db98a5aad64ba4461beaa54, and published geospatial component1.0-20260926.083046-222(SHA-256e7d470f69943e93ce48e9669bad6a41b618dfbe0e7bc748076e010583daef644). Source/class/model hashes are retained in the record.Acceptance boundaries
ac41ff2074246eb310de015da8b780e2a00f3490; no refresh, browser-login or authenticated Engine-attachment endpoint is invented.Commits
440a14611Add Engine-like Python connections and functional recoveryd71a8a029Preserve primary connection failures during cleanup1bb607ea0Harden bootstrap cleanup and deterministic deadline checksec863f9acScope bootstrap JSON error classification to decoding