fix(workflows): close three gaps in harness and model selection - #127
Conversation
… harness expression
…the daemon's pinned model
There was a problem hiding this comment.
senamakel has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70b6dd7fee
ℹ️ 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".
| #[cfg(test)] | ||
| mod policy_tests { |
There was a problem hiding this comment.
Move the policy tests into the existing test module
Because workflows/mcp is already a directory module with an existing tests module, adding policy_tests inline to mod.rs violates the repository's mandatory test layout and makes this wiring file own test implementation. Move these cases into src/sdk/src/workflows/mcp/tests/ and register them through the existing mod tests;.
AGENTS.md reference: AGENTS.md:L61-L63
Useful? React with 👍 / 👎.
What
Three follow-up fixes to #125 (harness/model selection). They were raised in review on #125's final head and fixed there, but #125 was squash-merged before they landed, so they never reached
main. Cherry-picked onto currentmain— the old branch is not an ancestor of the squash commit, so a PR from it would have re-proposed the whole feature.Each is a gap in a fix that shipped in #125, not new ground.
1.
2327555— a sub-workflow child skips the harness-expression check#125 refuses a persisted
harness: "=..."expression before a run, because by dispatch time the engine has resolved config and an expression is indistinguishable from a name typed by hand. That check only covered the root graph. A child graph reached throughStoreWorkflowResolver::resolveskipped it entirely, so a hand-edited child could still carry an expression into a dispatch — the exact hole the root check exists to close.2.
1e52df7— an explicit same-provider override still inherits the pinned model#125's daemon guard compares
provider == default_providerto decide whether the daemon's pinned model still applies. That cannot distinguish "no harness preference stated" from "the same harness was explicitly named". On a Claude-default host with a pinned Opus model, a step sayingharness: "claude"— an explicit choice, deliberately paired with no model — was handed Opus anyway instead of Claude Code's own default.3.
70b6dd7— MCP advertises other machines' harness presetsworkflow_hostloads custom harness presets from the layered config without filtering onhostId, so a preset belonging to a different fleet machine was listed to the authoring agent and selectable by this device's MCP server. Now filtered to this device's own host id.The third is the one worth landing promptly: it is a cross-host exposure, not just a wrong-model bug.
Validation
Cherry-picks applied cleanly onto
mainat29e3a21; no conflicts with #124's per-item fan-out.Review note
#125 was reviewed by
chatgpt-codex-connectoralone — CodeRabbit hit its trial credit limit and posted no substantive review on any head, and Greptile was rate-limited throughout. These three findings all came from Codex. Worth a human eye on the daemon change in particular (src/sdk/src/daemon/task_loop/run.rs), since that file's model-fallback behaviour predates #125 and is now load-bearing for the feature's core guarantee: a model chosen for one harness must never reach a different one.