Skip to content

Qualify signed worker launch and broker boundary#51

Merged
dovvnloading merged 1 commit into
mainfrom
codex/worker-install-broker-qualification
Jul 24, 2026
Merged

Qualify signed worker launch and broker boundary#51
dovvnloading merged 1 commit into
mainfrom
codex/worker-install-broker-qualification

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

This PR advances the signed worker release gate and fixes the packaged-worker startup failure shown in the reported PyInstaller PKG archive dialog.

What changed

  • Grant the newly-created AppContainer SID narrowly inherited read/execute access to the verified one-folder package root before CreateProcessW, then revoke that per-launch ACE during cleanup.
  • Make the worker’s initial broker receive synchronous so startup acknowledgements are deterministic; retain the receiver thread only once a transform is active.
  • Restrict Pillow startup to the allowlisted PNG/JPEG/WebP plugins and include those plugins explicitly in the PyInstaller closure.
  • Add tools/execution_spikes/recipe_worker_e2e_qualification.py, a disposable signed end-to-end gate covering:
    • ephemeral Ed25519 signing and immutable installation;
    • active provenance verification;
    • AppContainer/job policy and live PID/SID broker binding;
    • authenticated prepare, input_chunk, input_complete, and collect protocol stages;
    • bounded timeout, redacted status, and exact worker cleanup.
  • Update the ADR and execution-spike runbook with the evidence and the remaining release gate.
  • Move the Win32 factory test to a temporary executable copy so it never mutates C:\Windows\System32.

Root cause and current gate

The reported embedded-PKG error was caused by the fresh AppContainer having no read/execute permission on the user-owned temporary package tree. That launch precondition is repaired and live-qualified.

The qualification run now passes signed installation, provenance, AppContainer/job identity binding, broker handshake, prepare, and input_chunk. It intentionally blocks at input_complete with worker_response_timeout while the packaged provider transform remains inside the worker. This PR therefore does not enable production provider execution or close the OS/provider lifecycle release gate.

Validation

  • python -m pytest -q — 259 passed, 1 expected platform skip.
  • Focused phase-2/native tests — 52 passed, 1 expected platform skip.
  • Ruff, py_compile, compileall, and git diff --check passed.
  • packaging/build_recipe_worker.ps1 — PyInstaller one-folder build completed successfully.
  • Live disposable qualification — passed through input_chunk, fail-closed timeout at input_complete; no worker process remained after cleanup.

Risk and rollout

No application lifecycle or provider enablement is changed. The qualification helper is not imported by Cortex, accepts no user/model input, uses only an in-memory trust root, and cannot turn a timeout into a pass. The remaining provider-transform timeout is documented as a blocking release condition for the next stage.

Repair AppContainer package read/execute access with reversible per-profile ACLs, make worker startup broker reads deterministic, constrain Pillow codec loading, and add a disposable signed end-to-end qualification gate. Document the live evidence and keep the provider transform release gate blocked on timeout.

Copy link
Copy Markdown
Owner Author

Remote verification complete: GitHub Actions Quality run 30112766530 passed all 20 steps in 3m1s, including headless tests, API contract generation, frontend lint/types/tests/build, launcher-managed bundle verification, signed WebView2 bootstrapper preparation, Windows one-folder package build, and packaged bootstrapper verification. The Node.js 20 deprecation annotation is informational only. The local signed-worker qualification remains intentionally blocked at the provider transform (worker_response_timeout); this PR does not enable that release gate.

@dovvnloading
dovvnloading merged commit 7c1f842 into main Jul 24, 2026
1 check passed
@dovvnloading
dovvnloading deleted the codex/worker-install-broker-qualification branch July 24, 2026 17:31
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