Repository navigation
chore(arch): declare every router's MCP surface + refresh stale architecture.md counts (#2238) - #2482
Merged
Merged
Conversation
…tecture.md counts (#2238) A full /validate-architecture run on 9b0ed63 found Invariant #13 unenforceable — 44 of the non-excluded routers had neither a same-named MCP tool module nor a `# mcp: none` marker — and seven architecture.md counts more than 25% stale. - Every router outside the by-design exclusions (internal/setup/auth/public/paid) now opens with a `# mcp:` header: 30 x `none — <reason>` (admin, grant-vs-use human-only, UI-only) and 14 x a pointer to the covering tool module (`agents.ts (rename_agent)`, ...), so the validator can tell "unexposed on purpose" from "forgotten". Comments only; each module docstring stays the first statement (AST-checked). - architecture.md: router / service / tool-module / tool counts, agents.py size, AGENT_REFS cascade width, compatibility check count, four endpoint-group counts; the MCP tools table gains its three missing modules (a2a, connector, rooms) and the chat/skills rows catch up; the dead "DEPRECATED Redis credential keys" bullet (zero readers or writers) is removed; Invariant #13 records the header convention. - CLAUDE.md: MCP tool count and endpoint/router count. Related to #2238 — the remaining #6/#7/#15/#18 gaps stay tracked there. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQHbGS2GV78AmBFnZX78j6
vybe
force-pushed
the
chore/2238-mcp-none-markers-arch-counts
branch
from
September 2, 2026 08:33
53ee902 to
4b2c9a1
Compare
vybe
approved these changes
Sep 2, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated via /validate-pr: 44 routers each gain exactly one first-line '# mcp:' comment (0 removals, no import/route change, docstring still first statement in all 73 modules); every refreshed architecture.md count reproduced from the head (72 routers, 127/155 services, 121 tools / 30 modules, AGENT_REFS 50, 89 checks); all 14 pointer headers resolve to registered tools and none of the 30 'none' routers has an MCP consumer. All 21 checks green incl. six-seed pytest + regression diff. 'Related to #2238' left as-is on purpose (partial fix, 4 gaps stay open). Approving.
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
Follow-up to the full
/validate-architecturerun recorded on #2238 (comment of 2026-09-01). Two of the quick wins from that report:Invariant #13 — every router declares its MCP surface. 44 of the non-excluded routers had neither a same-named MCP tool module nor a
# mcp: nonemarker, so the validator could not tell "unexposed on purpose" from "forgotten". Every router outside the by-design exclusions (internal,setup,auth,public,paid) now opens with a one-line# mcp:header:# mcp: none — <reason>— admin surfaces (canary, audit log, ops, soft-delete recovery…), grant-vs-use human-only surfaces (sharing, users, MCP keys, settings, public links…), and UI-only data (analytics, telemetry, dashboard, onboarding…).# mcp: <module>.ts (<tools>)— routers whose tools live in a differently named module (agent_rename.py→agents.ts (rename_agent),telegram.py→channels.ts, …). Each pointer was verified against the URL builders insrc/mcp-server/src/client.ts.Comments only. An AST check confirms every module docstring is still the first statement.
Doc drift — architecture.md + CLAUDE.md counts. Router / service / tool-module / tool counts,
agents.pysize,AGENT_REFScascade width, compatibility check count, and four endpoint-group headings. The MCP tools table gains its three missing modules (a2a.ts,connector.ts,rooms.ts) and thechat.ts/skills.tsrows catch up (fan_out,run_skill,list_runnable_skills). The "DEPRECATED Redis credential keys" bullet is removed — nothing insrc/backendreads or writes those keys any more. Invariant #13's text now records the header convention.Verification
python3 -m pytest tests/unit/test_models_centralized.py test_1310_auth_wiring.py test_293_admin_gate_rejects_agent_keys.py test_186_enumeration_uniformity.py test_agent_auth_header_guard.py test_1677_operator_alert_emitters.py test_ent435_settings_sink_guard.py— 90 passed (the AST guards that walkrouters/).tests/unit/test_1966_ops_reset_audit.py,test_2008_dead_credentials_update.py(the two tests that read the livearchitecture.md) andtest_compatibility_checks.py(spec-doc sync) — all pass.# mcp:header or a same-named tool module.enterprise-docs-guardpattern grepped over both edited docs: no hits.Not in this PR
The other gaps from the same run stay open on #2238:
views/Library.vuecalling the API client directly (#6), rawfetch()inMcpKeysTab.vue/HostTelemetry.vue(#7),/api/agent-dashboard/{name}nesting (#15), and the three execution-creating boundaries without anIdempotency-Keypath (#18).Related to #2238
🤖 Generated with Claude Code
https://claude.ai/code/session_01AQHbGS2GV78AmBFnZX78j6