Skip to content

Let WorkflowEnvironment mock Nexus service calls #198

Closed

Description

@rmcdaniel

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.

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

  1. added
    priority:P2Normal-priority product work
    kind:defectA public product behavior is incorrect
    status:readyReady for implementation
    on Oct 22, 2026
  2. rmcdaniel commented on Oct 22, 2026

    @rmcdaniel
    MemberAuthor

    Accepted as P2 product work, owned by General. The harness currently rejects NexusServiceCall after 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.

  3. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    Nexus mock support is merged through #204 at fdde735c53e5bf2cf8a509a8d29a7c1a86ec7874, October 23 at 09:18:53 UTC. Merge tree 07ef1a48c7b5e32d5106342bb34847f74cad841c exactly matches qualified candidate caf853acee955751b950d74ebd22f7bbb6716f67.

    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.

  4. added
    status:blockedWaiting on a named dependency or decision
    status:in-progressApproved work is actively being implemented or validated
    and removed
    status:readyReady for implementation
    status:blockedWaiting on a named dependency or decision
    on Oct 23, 2026
  5. rmcdaniel commented on Oct 23, 2026

    @rmcdaniel
    MemberAuthor

    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.

  6. added
    status:doneDerived from the authoritative closed issue state
    and removed
    status:in-progressApproved work is actively being implemented or validated
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:defectA public product behavior is incorrectpriority:P2Normal-priority product workstatus:doneDerived from the authoritative closed issue state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions