Workflow.record: platform-recorded typed history with list/latest#53
Merged
czpython merged 1 commit intoJul 22, 2026
Conversation
czpython
force-pushed
the
commonzenpython/eng-733-sdk-the-run-record-platform-recorded-typed-history-with
branch
from
July 21, 2026 20:14
cfb2146 to
37e14d0
Compare
czpython
force-pushed
the
commonzenpython/eng-733-sdk-the-run-record-platform-recorded-typed-history-with
branch
from
July 21, 2026 21:03
81bcc00 to
11e3df4
Compare
czpython
force-pushed
the
commonzenpython/eng-733-sdk-the-run-record-platform-recorded-typed-history-with
branch
from
July 22, 2026 06:01
6824c2d to
17f0477
Compare
czpython
deleted the
commonzenpython/eng-733-sdk-the-run-record-platform-recorded-typed-history-with
branch
July 22, 2026 06:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every extension that accumulates working state hand-maintains a journal — each agent call wrapped in an
add_*write, the replay contract restated in a docstring — rebuilding what the platform already witnesses at its own chokepoints. This gives the SDK the record instead.Workflow.record— an ordered, in-memory, read-only record of the run's typed utterances, appended by the platform:Agent.__call__appends the post-to_result()domain value, body-level only. The existing_in_stepgate keeps in-step calls out on the live pass; the enclosing step's memoization keeps them out on replay — so the record rebuilds bit-for-bit on recovery.run()bodies (one whole step) never append.Gate.waitappends the validatedGateinstance.review()now returns a typedReviewReply(platform-ownedGatesubclass, topic pinned toreview) and appends it. The resume endpoint's wire shape is untouched —{action, answers, note}validates as-is, partial senders included.Selection is by contract type, never by producer:
record.list(T, **filters)/record.latest(T, **filters), flat attr=value equality, ANDed — subscriber-filter semantics. Noafter=, no windows, no ordinals — a projection that needs more is a domain bug, per the ticket.recordis a plain read-don't-write instance attribute, same species assubjectandinput. Two SDK test flows that used the name as a step renamed tonote_repo.Nothing is stored and no DBOS step was added, renamed, or reordered — in-flight runs replay across this deploy unchanged.
Docs: "Replay-rebuilt workflow state" in writing-an-extension.md becomes "The run record" — the platform records the run's calls, extensions project them; step returns and
run()internals stay in locals.Build's
_plan_phasemoves to attribute access on the typed reply; the journal migration itself is ENG-734, stacked on this.codex-reviewed: the adversarial pass flagged subclass shadowing of
recordand a filter-typo inconsistency. The typo behavior is settled as plain subscriber semantics (attributes read directly; a typo raises as entries scan); the shadowing hardening (getter-only property + reserved-name check) was tried and dropped — platform attributes stay plain read-don't-write names here, likesubject/input/state.ENG-733