Skip to content

fix(api): derive registered invocation cancellation policy from the executable binding #4185

Closed

Description

@ScriptedAlchemy

Problem

Registered HTTP dispatch has a second read/effect classification that disagrees with the existing operation catalog. WorkflowOperation::is_read_only() identifies six read operations, including get/list/history/diff/validate definitions and get-run. Its RegisteredHttpOperation implementation instead returns false unconditionally. The dispatcher chooses cancellation policy using that trait method even after resolving an executable binding with authoritative effect metadata.

This changes behavior: cancellation/deadline handling for a read is routed through authoritative-effect settlement, which can wait for the response grace period or return an indeterminate outcome.

Evidence at reviewed commit 30c23baa1967d4bb04aee3f20deb7a19f302ba61:

Change

Select InvocationCancellationPolicy from the resolved binding.effect().is_read_only(). Remove is_read_only from RegisteredHttpOperation and its per-family implementations. Reuse the binding already needed for route/result validation; do not introduce another registry or policy abstraction.

Review other invocation adapters for the same duplicate classification and migrate any redundant decision at a point where the binding is already available. Keep the change scoped to policy selection and delete obsolete parity-only scaffolding where its separate declaration disappears.

Acceptance criteria

  • Workflow read cancellation and deadlines follow the read interruption path after admission.
  • Authoritative mutations continue waiting for their durable settlement and expose truthful partial/indeterminate states; cancellation must never turn a committed mutation into an apparent rollback.
  • Work and the other registered families derive policy from the same catalog authority.
  • Request identity, result-contract validation, scope authorization and existing deadline limits remain intact.
  • Focused behavioral coverage exercises one real read interruption and one effect settlement, and fails with the current Workflow trait implementation. Run affected tests through Bazel rather than adding source-string inventories.

Verification and coordination

The classification disagreement and both execution branches were inspected directly; no runtime latency measurement or test execution is claimed. Searches found no duplicate open issue or PR. Merged #4158 changes Work writer jobs and settlement internals; this issue removes an adapter policy disagreement without reopening that storage design.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions