Skip to content

docs(power): clarify replay safety and step semantics#5

Open
embano1 wants to merge 2 commits intoaws:mainfrom
embano1:codex/fix-power-replay-semantics-docs
Open

docs(power): clarify replay safety and step semantics#5
embano1 wants to merge 2 commits intoaws:mainfrom
embano1:codex/fix-power-replay-semantics-docs

Conversation

@embano1
Copy link
Member

@embano1 embano1 commented Mar 8, 2026

Update the durable-functions power guidance to distinguish deterministic orchestration code from non-atomic durable operation bodies.

  • generalize replay-safety guidance across steps, waits, and concurrent branches
  • document logger replay caveats and note that context.logger can wrap an existing logger
  • correct StepSemantics defaults and examples for TypeScript and Python
  • document the at-most-once-per-retry fallback for non-idempotent steps with retries disabled

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Update the durable-functions power guidance to distinguish deterministic orchestration code from non-atomic durable operation bodies.

- generalize replay-safety guidance across steps, waits, and concurrent branches
- document logger replay caveats and note that context.logger can wrap an existing logger
- correct StepSemantics defaults and examples for TypeScript and Python
- document the at-most-once-per-retry fallback for non-idempotent steps with retries disabled
@embano1 embano1 requested review from bfreiberg and yaythomas March 8, 2026 09:20
@embano1
Copy link
Member Author

embano1 commented Mar 8, 2026

FYI, I also have another branch ready (based on these changes), which reduces the power size by ~50%.

@embano1
Copy link
Member Author

embano1 commented Mar 8, 2026

@singledigit can you use this updated power to verify if it would have caught the bugs in your scanner function: https://github.com/singledigit/durable-function-video-scanner/tree/main

Scanner fix: generate stable Transcribe/Rekognition submission identifiers once from durable state, not from wall-clock time inside the callback submitter. Default: derive them from scanId plus a deterministic suffix, or generate them in an earlier durable step and reuse them in the submitter.
Scanner fix: replace handler-level logger.* calls with context.logger (and childContext.logger / submitter ctx.logger where available) for all logging that can occur during replay.

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.

2 participants