Repository navigation
Add Adaption hosted contract and bounded HTTPS runner - #18
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1822891c2e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if process is not None and process.pid is not None: | ||
| if process.is_alive(): | ||
| process.kill() |
There was a problem hiding this comment.
Make child launch interruption-safe before relying on its PID
If SIGINT arrives during process.start() after the fork but before multiprocessing assigns Process._popen, the child already exists while process.pid still returns None. This cleanup guard therefore skips it. If the embedding caller catches KeyboardInterrupt and remains alive, parent-death protection does not fire, and the child continues without the parent watchdog. I reproduced this by delivering SIGINT immediately after multiprocessing.popen_fork.Popen._launch returned: the hanging fixture child remained alive beyond its deadline. Make launch and child-handle publication interruption-safe so cleanup can always terminate an already-forked child.
Useful? React with 👍 / 👎.
Adds a frozen Adaption request/response contract and bounded HTTPS/process runner with durable claims and conservative holds for ambiguous delivery. The runner always reaps its owned child on parent interruption, and synthetic ledger connections close explicitly rather than relying on garbage collection.
This PR targets main after #20 and #19 merged. The combined workflow retains all five Rust/Python runtime lanes, the previous-stable checkout check and both hosted fixture stages. Existing commits and experimental receipts are preserved.
Independent offline review reproduced the interrupt-cleanup and connection-lifetime issues before their fixes. Hosted CI then exposed startup assumptions in two fixture families. The corrected tests wait for real claims or child readiness before expiring the supervisor test clock, preserve real process termination and partial bytes, and separately assert before/after-claim expiry refuses dispatch. Production deadline and accounting gates were not relaxed.
Validation at
0afe43eb1e729b9a0896685b22072d8da48b3962: every runtime lane passed 362 Rust tests, 440 Python script tests, 18 reference and 8 oracle checks, plus the explicit integration/example stages. No warnings or test skips appeared in the retained logs. The previous-stable checkout job also passed. Exact-head CI. Delayed-startup RED/GREEN reproductions and all original failed runs are retained.These changes include no live provider request or billing reconciliation. Mock transport, canned subprocesses and fixtures establish the tested offline contracts only. The report in #19 remains independently pinned to measured source
20fab84a; the local correction pilot in #21 uses a separate model/runtime.See
docs/incident-hosted-runner.mdanddocs/hosted-integration.mdfor execution boundaries and evidence locations.Integration verification at
1822891c2e02b0316b17d7cd03937d29cc5c6719passes all five runtime lanes and the checkout compatibility job (CI). The stable lane passed 362 Rust, 441 script, 18 reference and 8 oracle tests with no warnings or skips. A new integration run exposed an existing receipt-hang test racing its 1.5-second startup window. The independently reviewed test-only correction waits for matching durable artifact/SQLite receipts before advancing the parent watchdog clock, asserts real SIGKILL/reaping and retained accounting, and adds a delayed-start regression. Production gates and the separate startup-expiry refusal test are unchanged. The original failed run and delayed-start RED/GREEN evidence are retained.