Repository navigation
feat(mcpx): Python binding for script-side generate (#1925 slice 2) - #16942
Merged
Merged
Conversation
The Python half of contract section 2's deferred bindings (docs/script-generate.md): generate() in the generated Python client plus the mcpx_globals.pyi stub import. Same JSON request/result contract as the TypeScript binding (PR #16941): a non-dict options argument raises TypeError; a daemon transport failure returns an ok:false / errorKind:provider result value; the daemon's discriminated result passes through untouched. Synchronous, like the rest of the Python client (call/batch are) -- the language-appropriate shape of the contract for this client. The Roc binding stays deferred on the contract's terms. Verification (authoring worktree on the laptop, on main incl. PR #16941): new TestPythonGenerateRoundTrip passes -- it drives the generated client against a fixture daemon (result pass-through, options on the wire as given, TypeError for a non-dict argument, provider result for a dead endpoint). Full internal/codegen suite: only the pre-existing TestRocModulePassesCompiler failure, which reproduces on pristine origin/main and is unrelated (Roc stdlib drift). gofmt clean. Refs #1925. Lane 1222-F (delta PRESS author lane, 2026-11-29).
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Refs #1925 — slice 2: the Python binding for the script-side
generatesurface (contract §2's named follow-on to PR #16941).What lands
generate()in the generated Python client (internal/codegen/py.go): POSTs the options to the daemon's/v1/generate(landed in feat(mcpx): script-side generate — daemon route, TS global, op declaration (#1925 slice) #16941) and returns its discriminated result untouched. A non-dict options argument raisesTypeError(there is no request to describe); a transport failure returns{ok: false, errorKind: "provider"}— a model-side outcome is a value, never an exception, per contract §6. Synchronous, like the rest of the Python client (call/batchare), which is the language-appropriate shape of the same JSON contract for this client.mcpx_globals.pyistub now importsgeneratefrommcpx_client.docs/script-generate.md: §2 and the status note record the Python binding as landed; Roc remains deferred on the contract's terms.TestPythonGenerateRoundTrip: drives the generated client against a fixture daemon — result pass-through, options on the wire as given,TypeErrorfor a non-dict argument, provider-kind result for a dead endpoint.Verification
Authoring worktree on the laptop, based on main including #16941: new round-trip test passes; full
internal/codegensuite shows only the pre-existingTestRocModulePassesCompilerfailure (Roc stdlib drift, reproduced on pristineorigin/main, unrelated); gofmt clean. Diff: 3 files, +124/−4.Lane 1222-F (delta PRESS author lane, 2026-11-29). Claim: #1925 comment 7260848430.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T18:58:54Z", "session_id": null, "lane": null, "host": "amd", "worktree": "/home/user/git/code-wt-1222f-1925", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/code-wt-1222f-1925", "repo": "developing-today/code", "branch": "lane/1222f-1925-generate-py", "sha": "d6a1a2e0775553b96f908986d9d209ca547a0f4c" }, "auth_subject": "oc-code-06", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.