Skip to content

Docs: describe ID reuse policies and start request IDs as the server implements them - #1584

Merged
longquanzheng merged 4 commits into
mainfrom
docs/flow-start-reuse-policy
Nov 11, 2026
Merged

longquanzheng merged 4 commits into
mainfrom
docs/flow-start-reuse-policy

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

Documents the Flow start options as the server implements them.

  • protos/dex.proto: comments for IdReusePolicy and each value, FlowAlreadyStartedOptions.ignore_already_started_error, and StartFlowRequest.request_id, including the retry rule from server-zd: deduplicate StartFlow retries before the ID reuse policy #1559. Generated Go, Java, and TypeScript code regenerated.
  • ID_REUSE_POLICY_ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY (Go IDReuseAllowIfPreviousFailed and equivalents): the SDK enum docs, the five docs/reference/*/start-flow-options.mdx pages, and skills/dex-sdk/references/core/flow.md now say a new run starts when the latest run closed as Failed, Canceled, or Terminated (not only Failed). A Flow timeout closes a run as Failed or Canceled under FAIL or CANCEL; under HANDLER the handler decides.
  • The default reuse value: the five SDKs' docs now say it rejects the start whenever the Flow ID has a run, the same as Disallow; the server has no setting that changes it (Rust said it used a "configured policy").

No server or SDK behavior changes.

Why

An audit of the start options after #1551 found that the proto had no comments for these fields, that every SDK and the reference described the "abnormally" policy as "only after a failed run" while apply treats Failed, Canceled, and Terminated as abnormal (server-zd/crates/dexzd-apply/src/command_handlers/flow_start.rs, is_conflict: a conflict only when the latest run is Running or Completed), and that the default value was described as configurable when it is not.

The skills file stated a wrong fact, so skills get a PATCH bump to 1.0.13 with a CHANGELOG entry.

doc-map: no change needed: the concept pages state no per-status reuse rule; only the Developer reference and SDK docs describe the policy values.

Testing

  • make generated-code-check: pass.
  • Go go vet and gofmt; TypeScript tsc --noEmit; Python ruff check and ruff format --check; Rust cargo fmt --check and clippy -D warnings; Java compileJava and javadoc: pass.
  • cd docs && npm run check: pass.

…iled

Add proto comments to IdReusePolicy, FlowAlreadyStartedOptions, and
StartFlowRequest.request_id that state the server behavior, and regenerate
the SDK code.

ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY starts a new run when the latest run is
Failed, Canceled, or Terminated; only Running or Completed rejects it. The
SDK enum docs, the start-flow-options reference pages, and the dex-sdk skill
said "only after a failed run". Correct them, and bump skills to 1.0.12.
The default sends ID_REUSE_POLICY_UNSPECIFIED, which apply treats as
DISALLOW_REUSE. It is not a configurable server policy.
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant