Repository navigation
Extract headless run service behind Strict SDK and MCP - #187
Conversation
Codex Review SummaryThis 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: 2608b25e99
ℹ️ 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 config.run_root: | ||
| overrides["run_root"] = config.run_root |
There was a problem hiding this comment.
Normalize the configured run root before launching children
When StrictRuntimeConfig.run_root is relative (for example, "runs"), the parent reserves the run under <cwd>/runs, but _launch starts the child with cwd=<cwd>/runs while exporting RUN_ROOT=runs. The child consequently searches <cwd>/runs/runs/<run_id> and exits without finding the reservation, leaving every such review interrupted. Resolve this value to an absolute path before constructing Settings or exporting it to the child.
Useful? React with 👍 / 👎.
| finding_rechecks=tuple(rechecks), | ||
| rechecks_complete=complete, | ||
| recheck_missing=tuple(missing), | ||
| stale=bool(raw.get("stale", False)), |
There was a problem hiding this comment.
Reject malformed stale flags instead of coercing them
If a corrupted, older, or custom service payload returns a non-boolean stale value, this coercion silently accepts it; notably, "false" becomes True, so an embedded host can incorrectly discard a valid review as stale. This also occurs in _quality_result. Since this boundary advertises ResultDecodeError for malformed structures and already validates rechecks_complete, validate stale as an actual boolean before constructing either typed result.
Useful? React with 👍 / 👎.
The embedded Strict SDK currently constructs the MCP server core and reaches the workflow orchestrator through a CLI module. This change moves the durable run queue, policy checks, reserve/poll logic, and knowledge reads into a headless
RunService; the SDK and MCP transport now call that same service. The CLI keeps its existingCopilotimport path as a compatibility export.The SDK adds a typed
StrictRuntimeConfigfor repository/checkout/backend binding and typed Strict and quality result projections, retaining the existing payload for wire compatibility. Explicit configuration disables dotenv loading, and the run service passes the selected backend and repository binding to isolated children. Public result decoding reports malformed structures throughResultDecodeError.Validation: complete offline suite passed 1,528 tests before the final backend propagation and dotenv test additions; targeted SDK/MCP tests passed 73 after those additions. SPEC freshness and doc link/citation checks passed. An installed wheel constructed the headless runtime without importing MCP or CLI modules.