Require every capability case with tool calls to replay equal under DBOS and Temporal
Merged
DO
4d ago+857+857+012345678901234567890123456789-208-208-012345678901234567890123456789
Stacked on #14366 (base capability-conformance); retargets to main when that merges. No issue: this is contract D1 of the capability-conformance plan, agreed with @DouweM.
Every capability case with calls (core and Harness) now runs its calls under DBOS and Temporal, and the units each run journals are pinned next to the case.
Changes:
Calls.durable_stepsis now a typedDurableSteps(dbos=..., temporal=...): step and activity names in order, without the agent prefix and the run's own model requests, which are counted instead (one per call, plus one). Every case lists them; an empty list is checked too.DURABLE_DBOS(tests/harness/test_durable_tool_io.py, now over every case): runs the calls one per response in a DBOS workflow and forks it from after the last step, as recovery does. It fails if a counted request repeats or the steps drift. No exemptions.DURABLE_TEMPORAL(newtests/harness/test_durable_temporal_replay.py): one dev server and one worker per module. AReplayermust replay each recorded history without failing or making a request, and the activities must match the case's list. Exempt, each still checked to break:- Case fixtures: the echo stand-in and the core
MCPtoolset get ids.ToolGuardrailandPromptInjectionDefenderget explicit ids, which core requires of an id-less capability with durable operations. - The Prefect construction check now covers every case Temporal accepts.
- The
CONTRACTShelpers moved totests/harness/_contracts.py, shared withtest_capability_contracts.py, which adds unit tests for the journal check and for nested-run request counting. agent_docs/capability-conformance.md: the "Durable execution" section (requirements, D1).
Decisions:
start_localrather than a time-skipping server: it's repo precedent and cached in CI, the time-skipping binary is a separate download, and these workflows have no timers.UnsandboxedWorkflowRunner: the cases' stand-ins live in the test process, and the replay checks determinism.- One call per response with a non-streaming model: the journal order is deterministic, and the call ids match the C contracts'.
- The expected lists were worked out from the code, then corrected from CI's output.
Open for @DouweM:
BrowserUseisn't checked by D1 in CI, since only the browser-use job installsbrowser_use. Under DBOS its nested agent's requests are probably repeated on recovery. Should that job also run the two durable suites, which means installing DBOS and Temporal there?
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.