Repository navigation
Let WorkflowEnvironment mock Nexus service calls #198
Description
Delivered in Python SDK 2.10.0
WorkflowEnvironment supports canned and callable Nexus operation mocks and typed failure delivery.
PyPI 2.10.0 is published at exact qualified source 4f853f396dba5a530ef0815509b16bfddaa9ebc3. Normal registry acceptance passes 334 controls, all 37 source files and all 50 hashed RECORD entries. Docs #212 merged at e530e33ec1303530779f91a0d249666c9f9aca16; its actual Pages deployment and all five affected routes were verified at 16:09 UTC. Current guidance states the minimum version.
Earlier failed observations remain failed. Separate #175/#215 source is outside this release.
Original report and earlier qualification
Current package delivery gate — October 23
The complete 2.10.0 candidate is 4f853f396dba5a530ef0815509b16bfddaa9ebc3, merged as 38b5a639262bebcf3fd0e67c6ec42ab16bc3a966 with the same tree. Fresh exact artifact hashes and installation proof: all 17 applicable normal gates, both distributions' smoke/metadata checks, 37 installed source/RECORD matches, 272 controls and actual console acceptance/refusal pass. The earlier 12b5f372 proof remains its own retained earlier cohort; the complete new candidate supersedes it only after all fresh proof passed.
Untagged and unpublished: existing #197 Trusted Publisher account setup remains required. No token fallback or repeated human account request. Actual registry installation and consumer acceptance remain open; draft #212 prepares versioned guidance and stays draft until those real delivery gates pass. Security-only 2.9.1/2da02a7a remains separate. No protocol-floor, major or automatic runtime/Cloud adoption follows.
Problem
WorkflowEnvironment can't run a workflow that calls a Nexus service operation, so that workflow can't be unit-tested. The Python guide says the harness dispatches yielded commands against registered mocks, but there is no mock for service calls.
- Workflow code calls
ctx.call_nexus_serviceorctx.start_nexus_operation, which yield aNexusServiceCall. - The harness handles activities, timers, children, side effects, search attributes and version markers and raises
TypeErrorfor anything else. - Its mock registration covers activities and child workflows only.
Reproduced on published 2.9.0. A workflow that yields ctx.call_nexus_service("billing", "invoices", "create", ["a"]) makes execute_workflow raise TypeError: unsupported command in test harness: NexusServiceCall(...).
Acceptance criteria
- Tests can register a result, or a callable, for a service operation by endpoint, service and operation name, and the workflow receives it the way a real call resolves.
- Tests can make a mocked operation fail, and workflow code sees the same failure type a real failed operation produces.
- An unmocked service call fails with a message that names the endpoint, service and operation and says how to register a mock.
- The Python guide's testing section shows mocking a service call.
Current delivery state
Source delivered through PR #204, merged at fdde735c53e5bf2cf8a509a8d29a7c1a86ec7874 on October 23 at 09:18:53 UTC. Its tree exactly matches candidate caf853ac; all 18 normal checks pass, including supported Python versions, actual integration and target qualification. Final Sonar has zero OPEN/CONFIRMED findings. The completed remote head is deleted and independently absent.
Result and synchronous callable mocks are keyed by endpoint/service/operation. Production replay delivers completion, acceptance or NexusOperationFailed; guidance covers typed failure and compensation, with real-Server limits. Original 18 failures and exact parent/local qualification remain in the delivery record.
Remaining: compatible publication and normally installed acceptance after the existing #197 Trusted Publisher account setup. Source guidance explicitly marks these APIs unreleased; remove that notice only after publication. Fresh-main CI 39930960615 is independent and currently pending. No package version or tag has changed.
Activity
rmcdaniel commentedon Oct 22, 2026
Accepted as P2 product work, owned by General. The harness currently rejects
NexusServiceCallafter handling other yielded commands. This is a missing testing capability, so documentation alone will not close it.Add service-operation mocks keyed by endpoint, service and operation, including callable results, the real operation-failure type and an actionable missing-mock error. Cover both service-call authoring methods and document the test recipe. The security-only 2.9.1 patch stays scoped; this work is queued separately.
rmcdaniel commentedon Oct 23, 2026
Nexus mock support is merged through #204 at
fdde735c53e5bf2cf8a509a8d29a7c1a86ec7874, October 23 at 09:18:53 UTC. Merge tree07ef1a48c7b5e32d5106342bb34847f74cad841cexactly matches qualified candidatecaf853acee955751b950d74ebd22f7bbb6716f67.All 18 normal candidate checks passed, including supported Python 3.10/3.11/3.12, actual integration and target qualification. Final Sonar readback reports zero OPEN/CONFIRMED findings; CodeQL's sole annotation is a runner-image notice. No threshold/profile adjustment or suppression. The completed remote head was deleted and independently returned no heads.
The full local 3,155-pass result belongs to functional parent
a81e754; current candidate qualification includes 161 combined harness/backoff/corpus controls and the final hosted suites. The original 18 failing controls remain recorded. Fresh-main checks remain independent and pending.Publication and normally installed acceptance remain pending. The source docs explicitly mark these APIs unreleased. The existing Trusted Publisher account setup in #197 remains the release dependency; source merge does not authorize a tag, alternate upload credential, protocol-floor change or downstream Server/Cloud adoption.
rmcdaniel commentedon Oct 23, 2026
Delivered in Python SDK 2.10.0. WorkflowEnvironment supports canned and callable Nexus operation mocks and typed failure delivery.
Registry acceptance and merged/deployed documentation #212 complete this acceptance. Current guidance is live. Earlier failed observations remain separate.