fix(mcp): add master_agent + master_reporter to RESOURCE_CATALOG#4717
Merged
senamakel merged 1 commit intoJul 8, 2026
Merged
Conversation
The `catalog_mirrors_builtins` parity check in `src/openhuman/mcp_server/resources.rs` iterates every `BUILTINS` entry and asserts a matching `openhuman://prompts/agents/<id>` catalog entry exists. When tinyhumansai#4660 introduced the `master_agent` and `master_reporter` built-ins, the catalog was not updated in the same commit, leaving BUILTINS at 43 entries and RESOURCE_CATALOG at 41 agent entries. Main CI stayed green because the changed-files coverage lane (`scripts/ci/rust-coverage-changed.sh`) only selects tests for the domains touched by the PR — post-tinyhumansai#4660 pushes didn't touch `src/openhuman/mcp_server/` or `src/openhuman/mod.rs`, so `mcp_server::resources::tests::*` were never scoped. Any PR that happens to widen the filter to `openhuman` (e.g. by touching `src/openhuman/mod.rs`) surfaces the pre-existing gap: thread '...::catalog_mirrors_builtins' panicked ... RESOURCE_CATALOG is missing an entry for built-in agent `master_agent` (expected URI `openhuman://prompts/agents/master_agent`). Add the two missing `PromptResource` entries pointing at the existing `orchestration/master_agent/prompt.md` and `orchestration/master_reporter/prompt.md`. Restores parity and unblocks the mcp_server::resources parity + read-content-for-each-subagent tests.
12 tasks
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe RESOURCE_CATALOG in resources.rs is extended with two new PromptResource entries for master_agent and master_reporter, each defining a URI, name, description, and embedded markdown content loaded at compile time via include_str!. ChangesPrompt catalog update
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
7 tasks
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
RESOURCE_CATALOGentries for themaster_agentandmaster_reporterbuilt-ins sosrc/openhuman/mcp_server/resources.rsmirrorssrc/openhuman/agent_registry/agents/loader.rs::BUILTINSagain (43 ↔ 43).openhuman://prompts/agents/master_agentandopenhuman://prompts/agents/master_reporter.Problem
catalog_mirrors_builtinsinsrc/openhuman/mcp_server/resources.rsis a parity guard: it iterates everyBUILTINSentry and asserts a matchingopenhuman://prompts/agents/<id>catalog entry exists. When #4660 (feat(orchestration): Master chat) introducedmaster_agentandmaster_reporterinBUILTINS, theRESOURCE_CATALOGwas not updated in the same commit — soBUILTINS.len() == 43but only 41 agent entries live in the catalog.Main CI stayed green because the changed-files coverage lane (
scripts/ci/rust-coverage-changed.sh) only selects tests for the domains touched by the PR. Post-#4660 pushes didn't touchsrc/openhuman/mcp_server/orsrc/openhuman/mod.rs, somcp_server::resources::tests::*were never scoped. Any PR that widens the filter to a bareopenhuman(e.g. by touchingsrc/openhuman/mod.rs) surfaces the pre-existing gap. Repro on PR #4600:read_resource_returns_content_for_each_subagentfails for the same reason (master_agenthas no URI mapping).Solution
Append two
PromptResourceentries — grouped with the otherorchestration/*subagents right afterreasoning_agent— pointing at the existing prompt files:openhuman://prompts/agents/master_agent→src/openhuman/orchestration/master_agent/prompt.mdopenhuman://prompts/agents/master_reporter→src/openhuman/orchestration/master_reporter/prompt.mdThe descriptions mirror each agent's
when_to_usein the correspondingagent.toml. No production code changes — only the static catalog +include_str!bindings.Submission Checklist
mcp_server::resources::tests::catalog_mirrors_builtinsandread_resource_returns_content_for_each_subagentalready cover both branches (present/absent, valid/empty content). This PR flips them from red → green; no new test needed.PromptResource {…}literals whoseuri,name, andcontentfields are read by the two parity tests above, so diff-cover will attribute them.docs/TEST-COVERAGE-MATRIX.md.## Related— N/A: no feature-ID rows change.Closes #NNNin the## Relatedsection — N/A: no tracking issue; discovered while investigating PR feat(safety): Emergency Stop for desktop automation (#4255) #4600 CI red.Impact
resources/listnow see two additional prompt resources (which they should have been seeing since feat(orchestration): Master chat — human↔OpenHuman control channel + working receive loop #4660 merged). No existing entry changes.Related
Rust Core Coveragelane once feat(safety): Emergency Stop for desktop automation (#4255) #4600 rebases on main.AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fix/mcp-master-agent-catalog3966d1962Validation Run
pnpm --filter openhuman-app format:check— N/A: no frontend files changed.pnpm typecheck— N/A: no TS/TSX changes.GGML_NATIVE=OFF cargo test --manifest-path Cargo.toml -p openhuman --lib openhuman::mcp_server::resources→ 9 passed, 0 failed (both previously failing tests now pass).cargo fmt --checkclean onsrc/openhuman/mcp_server/resources.rs.app/src-taurichanges.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
master_agentandmaster_reporterprompt.md via the documentedopenhuman://prompts/agents/<id>scheme.resources/listresponse.Parity Contract
catalog_mirrors_builtinsguard now holds (43 == 43);read_resource_returns_content_for_each_subagentcovers non-empty content for each new entry.Duplicate / Superseded PR Handling
Summary by CodeRabbit
master_agentandmaster_reporter, with built-in names, descriptions, and embedded content for easier access.