MCP workflow hardening (extracted from PR #387)#394
Draft
Conversation
Adds and hardens the DeepWork MCP workflow runtime: - New tools: get_active_workflow, validate_step_outputs - Platform-aware workflow invocation / review-guidance text - StateManager/StatusWriter.set_project_root rebind support - RootResolver normalizes OpenClaw plugin-bundle roots to the enclosing workspace - FORMATTERS registry with format_for_openclaw - short_instruction_filename alias files for OpenClaw review spawns - Instruction/test coverage for the above Extracted from the feat/openclaw-support branch (PR #387) so the MCP runtime changes can be reviewed separately from the OpenClaw bundle content. Note: tests/unit/review/test_formatter.py::TestFormatForOpenClaw::test_output_mentions_sessions_spawn and ::test_agent_name_becomes_agent_type were failing on the openclaw branch before extraction (pre-existing NameError: '_task_name' helper missing in format_for_openclaw). Left as-is for reviewer visibility.
nhorton
added a commit
that referenced
this pull request
Apr 21, 2026
The MCP workflow runtime changes from this branch have been extracted into a separate draft PR (#394) for independent review. This branch now contains only the OpenClaw bundle content. Note: with MCP hardening removed, `uvx deepwork serve --platform openclaw` will reject "openclaw" as an unsupported platform (FORMATTERS registry only knows "claude" on main). That is expected during this review split — determines whether the MCP changes are actually required to ship OpenClaw support, or whether the bundle can work on the main-branch runtime alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MCP runtime changes extracted from the OpenClaw support PR (#387) so they can be reviewed separately.
What's here
get_active_workflow,validate_step_outputsStateManager.set_project_root/StatusWriter.set_project_rootto rebind paths when the root resolves mid-sessionRootResolvernormalizes an OpenClaw plugin-bundle path back to the enclosing workspace rootFORMATTERSregistry +format_for_openclawfor review outputshort_instruction_filenamealias files alongside the canonical review instructions (for OpenClaw spawns)Why separate
Per @nrh: "I think the MCP is not needed, thus why I am getting it into a PR in case it is needed, then reviewing the non-mcp stuff separately in a pure-openclaw review."
Known failure (pre-existing on the openclaw branch)
tests/unit/review/test_formatter.py::TestFormatForOpenClaw::test_output_mentions_sessions_spawnandtest_agent_name_becomes_agent_typefail withNameError: name '_task_name' is not definedinformat_for_openclaw. The helper was never added. Left as-is for visibility — was already failing onfeat/openclaw-supportbefore extraction.Test plan
uv run pytest tests/unit/jobs/mcp/ tests/unit/review/