Skip to content

fix(workflows): close three gaps in harness and model selection - #127

Merged
senamakel merged 3 commits into
mainfrom
fix/workflow-harness-followups
Jul 31, 2026
Merged

fix(workflows): close three gaps in harness and model selection#127
senamakel merged 3 commits into
mainfrom
fix/workflow-harness-followups

Conversation

@senamakel

Copy link
Copy Markdown
Member

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 current main — 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 through StoreWorkflowResolver::resolve skipped 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_provider to 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 saying harness: "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 presets

workflow_host loads custom harness presets from the layered config without filtering on hostId, 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

cargo test                          # 57 binaries, 3024 tests, 0 failed
cargo clippy --all-targets -- -D warnings
cargo fmt --check

Cherry-picks applied cleanly onto main at 29e3a21; no conflicts with #124's per-item fan-out.

Review note

#125 was reviewed by chatgpt-codex-connector alone — 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.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

senamakel has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eda11ed5-dcad-4a6d-80ac-3ef3f111adc0

📥 Commits

Reviewing files that changed from the base of the PR and between 29e3a21 and 70b6dd7.

📒 Files selected for processing (7)
  • src/sdk/src/config/types/orchestration.rs
  • src/sdk/src/daemon/task_loop/run.rs
  • src/sdk/src/daemon/tests/provider_tests.rs
  • src/sdk/src/workflows/mcp/mod.rs
  • src/sdk/src/workflows/registry.rs
  • src/sdk/src/workflows/registry_tests.rs
  • src/tui/src/local_host/mod.rs

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +257 to +258
#[cfg(test)]
mod policy_tests {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@senamakel
senamakel merged commit 59e9ad9 into main Jul 31, 2026
6 checks passed
@senamakel
senamakel deleted the fix/workflow-harness-followups branch August 4, 2026 11:05
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