Skip to content

Add fixed recipe worker protocol boundary#46

Merged
dovvnloading merged 1 commit into
mainfrom
codex/recipe-worker-contract
Jul 23, 2026
Merged

Add fixed recipe worker protocol boundary#46
dovvnloading merged 1 commit into
mainfrom
codex/recipe-worker-contract

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

  • add the transport-neutral recipe.worker.v1 contract with bounded prepare, input chunking, completion, cancellation, and output collection messages
  • add a one-request worker state machine with per-chunk and whole-stream hash validation, cancellation race handling, and redacted output metadata
  • add a reproducible PyInstaller worker package definition and Windows build script
  • document that the package exits with code 78 until the native broker loop is implemented; update the Phase 2 evidence log and ADR

Validation

  • python -m pytest -q — 226 passed, 1 skipped
  • python -m ruff check backend/cortex_backend/execution/worker_protocol.py tests/test_phase2_worker_protocol.py
  • python -m compileall -q backend/cortex_backend/execution packaging/recipe_worker tests/test_phase2_worker_protocol.py
  • python tools/generate_contracts.py
  • git diff --check
  • PyInstaller build produced dist/recipe-runtime/recipe_worker.exe; direct launch returned exit code 78

Gate status

This PR does not authorize provider execution. The worker package is unsigned and launch-refusing. The next stage must implement the reviewed native broker loop, launch the verified worker suspended under AppContainer/LPAC and Job Object policy, bind the live broker session to the actual worker PID/AppContainer token, and run the hostile decoder/cancellation corpus before lifecycle enablement.

@dovvnloading
dovvnloading marked this pull request as ready for review July 23, 2026 17:29
@dovvnloading
dovvnloading merged commit 7008208 into main Jul 23, 2026
1 check passed
@dovvnloading
dovvnloading deleted the codex/recipe-worker-contract branch July 23, 2026 17:29
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