Skip to content

feat: require backends to honour authored trial timeout and retry choices - #1398

Merged
Brad-Edwards merged 6 commits into
devfrom
1361-sdl-recovery-requirements
Sep 27, 2026
Merged

Brad-Edwards merged 6 commits into
devfrom
1361-sdl-recovery-requirements

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Summary

An experiment's timeout and retry choices now reach backend admission. on_timeout: cancel requires the backend to support cancellation. More than one attempt requires evidence that the previous attempt stopped; when effects must not repeat, it also requires effect observation. The admitted trial plan records the required guarantees, backend manifests can declare them, and trial compilation refuses a backend that lacks them instead of treating them as best effort. The existing cleanup-capability check is now enforced there too. As agreed with the owner on the issue, there is no new SDL syntax. Workflows already carry in-world failure responses to admission, and nothing retries or resumes work because state was persisted. Replacement trials are tracked in #1396.

Requirement UIDs

  • API-402

Related Issues

Refs #1361

ADR Impact

  • ADR-113
  • ADR-104

Changes

  • Add required_operation_guarantees(): one RAE-owned projection from on_timeout and the cleanup retry policy to Publish backend operation and supervision contracts #1360 operation guarantees. Default choices require none.
  • Record execution_controls.required_guarantees on admitted trial entries. The field is omitted when empty, so existing plan bytes and digests are unchanged. The plan rejects any value that differs from the one derived from the entry's controls and cleanup plan.
  • Add optional capabilities.operation_supervision (name, guarantees) to backend-manifest-v2. It requires the backend operation contract family and converts to and from the internal manifest.
  • Add require_execution_authority_capability(). It enforces the cleanup-plan capability (previously never called) and the required guarantees.
  • Trial compilation checks every backend selected for each entry, including mixed compositions. It refuses entries with no selected backend and with any unsupported choice, using trial-compiler.execution-authority-unsupported.
  • Regenerate and republish the admitted-trial-plan-v1 and backend-manifest-v2 schemas. Add valid and invalid fixtures.
  • Document the derivation, declaration and trial-author migration in the cleanup-contract spec, the backend operation reference, the public backend page, and the Carry execution and recovery requirements from SDL into plans #1361 decision note's delivery resolution.
  • Re-cut the specification-coverage (55.0.0) and formal-validation (56.0.0) captures against the new source.

Test Plan

  • Unit tests pass
  • Integration tests pass if applicable
  • Full completion suite required in CI before merge
  • No coverage regression

Targeted runs: the new #1361 module; the trial compiler, admitted plan, mixed trial, backend manifest, cleanup and facade tests; schema publication and coverage; and the evidence modules including integration-marked tests. The processor-only regression fails without the empty-backend refusal.

Ground Control Checks

  • Repository policy checks required in CI before merge
  • Pre-push Codex review completed; all findings fixed or dispositioned

Traceability

  • IMPLEMENTS: API-402 ← implementations/python/packages/raes_contracts/contracts/execution_requirements.py, API-402 ← contracts/schemas/plans/admitted-trial-plan-v1.json, API-402 ← contracts/schemas/backend-manifest/backend-manifest-v2.json, API-402 ← implementations/python/packages/raes_backend_protocols/capability_admission.py, API-402 ← implementations/python/packages/raes_processor/trial_compiler/compiler.py
  • TESTS: API-402 ← implementations/python/tests/test_issue_1361_execution_requirements.py

Checklist

  • Code follows the project's coding standards
  • Changelog: owned by Release Please (generated from the Conventional Commit PR title; no per-PR fragment)
  • Architectural docs updated if stack, package structure, or key behaviors changed

Documentation

Updated: see diff.

@Brad-Edwards

Copy link
Copy Markdown
Collaborator Author

Ground Control delivery — this pull request delivers issue #1361; Phase E runs on merge.

@Brad-Edwards
Brad-Edwards merged commit c4d90a3 into dev Sep 27, 2026
50 of 54 checks passed
@Brad-Edwards
Brad-Edwards deleted the 1361-sdl-recovery-requirements branch September 27, 2026 20:52
@Brad-Edwards
Brad-Edwards restored the 1361-sdl-recovery-requirements branch September 27, 2026 20:57
@Brad-Edwards
Brad-Edwards deleted the 1361-sdl-recovery-requirements branch September 27, 2026 20:59
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