Skip to content

Add durable recipe coordinator and trusted publication path - #61

Merged
dovvnloading merged 1 commit into
mainfrom
codex/recipe-coordinator
Jul 29, 2026
Merged

Add durable recipe coordinator and trusted publication path#61
dovvnloading merged 1 commit into
mainfrom
codex/recipe-coordinator

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

This PR implements the next planned Phase 2 slice: a durable, qualification-only recipe coordinator and trusted artifact-publication path for the fixed-function image transform.

What changed

  • Added RecipeImageRequest, RecipeWorkerAttempt, RecipeWorkerOutput, and stable RecipeExecutionError contracts.
  • Added RecipeWorkerClient for the existing authenticated broker/worker protocol, including bounded chunking, response identity checks, digest/MIME/format validation, cancellation, timeout, and transport failure handling.
  • Added RecipeExecutionCoordinator with SQLite-backed idempotency, per-job leases, startup recovery, owner-scoped artifact reads, cancellation, private staging, and all-or-nothing publication through ArtifactBoundary.collect_outputs.
  • Added repository helpers for owner-scoped artifact metadata and guarded queued payload replacement.
  • Added adversarial coordinator/worker tests and a dedicated ADR; aligned the Phase 2 evidence and related ADR next gates.

Safety and scope

  • Durable payloads contain opaque artifact IDs and canonical plan data only; no source paths, shell/command fields, model authority, or executable paths are accepted.
  • Worker attempts are injected and must already be bound to the existing qualification/native broker gates. There is no host-process or in-process fallback.
  • Outputs are published only after exact-claim validation, byte-derived MIME checks, size/hash checks, and cancellation-race cleanup.
  • This PR does not add a public API route or make the normal application default-on. UI/API exposure and qualified attempt-factory wiring are the next planned stage.
  • External review, production signing, and trusted release roots remain optional official-release hardening and are not required for this open-source slice.

Validation

  • C:\Python314\python.exe -m pytest -q ? 325 passed, 1 skipped (Windows-inapplicable native test)
  • C:\Python314\python.exe -m ruff check backend/cortex_backend/execution/__init__.py backend/cortex_backend/execution/repository.py backend/cortex_backend/execution/recipe_coordinator.py tests/test_phase2_recipe_coordinator.py ? passed
  • git diff --cached --check ? passed

The unrelated working-tree edit in Cortex.pyproj was intentionally excluded.

@dovvnloading
dovvnloading merged commit 79367bf into main Jul 29, 2026
1 check passed
@dovvnloading
dovvnloading deleted the codex/recipe-coordinator branch July 29, 2026 13:28
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