Repository navigation
Description
Problem
Some MCP tools write local state or a file, and the exposure table marks them read-only. A role server and a client choose tools by that flag. A model can get a write that the flag says it cannot make.
The tools, at origin/main commit 2db71f2:
ai_quiescesets the constellation quiesce flag in a snapshot file.ai_resumeclears that flag.ai_failoverrecords a fallback route in that flag.ai_gateway_failover:--resetand--no-simulatewrite the gateway state file (_save_gateway_stateinsrc/devops_cli/ai/gateway.py).review_export_feedbackappends review verdicts to the feedback dataset file.
The flag cannot change today. Each of the five commands has the dry-run class no-external-request. The requirement mcp-read-only-hint-agrees-with-no-external-request in openspec/specs/command-dry-run-class/spec.md says that such a tool has readOnlyHint true. The test test_mcp_exposure_table_no_external_request_read_only in tests/invariants/test_dry_run_class_ratchet.py fails on a tool that is not read-only. The class says that the command makes no external request. It does not say that the command writes nothing.
The review of #3235 found these tools. That change flags the tools that its verb rule and its review found, and it cannot flag these five without a decision on the requirement.
Expected
Decide what the class means for the flag. Then make the requirement, the ratchet test and the table agree.
A recommended answer: the class names external requests only. The ratchet then allows a tool that is not read-only for a command that writes local state. The five tools are marked not read-only.
Acceptance criteria
- The requirement and the ratchet test state what a
no-external-requestcommand means forreadOnlyHint. ai_quiesce,ai_resume,ai_failover,ai_gateway_failoverandreview_export_feedbackare not read-only, or the requirement says why one is.- A test fails when one of these tools is flagged read-only against the rule of criterion 1.
Existing tool considered
None. The change edits one table, one requirement and one test of this repository.
Related
Source: #3235
Proposed design
Problem statement
The MCP exposure table marks five tools read-only although their commands write local state or a file. A role server and a client use readOnlyHint to choose tools, so a model can make a write that the flag says it cannot. The no-external-request dry-run class currently implies readOnlyHint true, so the table, the requirement and the ratchet test disagree.
Acceptance criteria
Requirement: no-external-request-scope
The no-external-request dry-run class SHALL state that it constrains external requests only and does not state that the command writes nothing.
Scenario: spec states the class scope
- WHEN a test reads the
no-external-requestrequirement inopenspec/specs/command-dry-run-class/spec.md - THEN the requirement says the class constrains external requests only and does not imply
readOnlyHint
Requirement: local-write-tools-are-not-read-only
The MCP exposure table and docs/MCP_TOOLS.md SHALL set readOnlyHint false for ai_quiesce, ai_resume, ai_failover, ai_gateway_failover and review_export_feedback.
Scenario: five local-write tools are not read-only
- WHEN a test reads
CONST_MCP_EXPOSURE_TABLEanddocs/MCP_TOOLS.mdfor the five tool names - THEN each MCP entry has
readOnlyHintfalse and each documentation row showsfalse
Requirement: ratchet-rejects-read-only-local-writer
The MCP exposure ratchet test SHALL fail when a command that writes local state or a file is marked read-only.
Scenario: local-write tool marked read-only fails
- WHEN the test fixture flags the MCP entry of any one of the five local-write commands as read-only
- THEN the ratchet test reports a mismatch for that command
Requirement: ratchet-keeps-read-only-non-writer
The MCP exposure ratchet test SHALL keep readOnlyHint true for a no-external-request command that writes no local state or file.
Scenario: non-writer marked not read-only fails
- WHEN the test fixture marks a
no-external-requestcommand outside the local-write set as not read-only - THEN the ratchet test reports a mismatch for that command
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need: the change edits the repository's MCP exposure table, the dry-run-class requirement and the ratchet test. It builds no new code, so the cost to build, keep and fix code is zero tokens and zero elapsed time.
Key questions
- What does the
no-external-requestdry-run class mean forreadOnlyHint?: The class constrains external requests only. It does not say that the command writes nothing.readOnlyHintfollows the command's local write behavior. (best practice) [sources: openspec/specs/command-dry-run-class/spec.md, tests/invariants/test_dry_run_class_ratchet.py, src/devops_cli/ai/gateway.py]- Rejected: Class implies read-only true. Rejected: five commands write local state and the current rule marks them read-only.
- Chosen: Class constrains external requests only and readOnlyHint follows local writes. Chosen: the class name matches the rule and the flag becomes truthful.
- Rejected: Add a separate dry-run class for local writes. Rejected: it changes the decorator and every command callback beyond this issue.
- Which five MCP tools must be not read-only?:
ai_quiesce,ai_resume,ai_failover,ai_gateway_failoverandreview_export_feedbackmust setreadOnlyHintfalse. [sources: docs/MCP_TOOLS.md:16, docs/MCP_TOOLS.md:17, docs/MCP_TOOLS.md:27, src/devops_cli/ai/gateway.py, tests/ai/mcp/test_fastmcp_contracts.py, openspec/specs/command-dry-run-class/spec.md] - How should the ratchet test know which commands write local state?: Use an explicit set of the five local-write command paths in the test. Assert that their MCP entries are not read-only, and that every other
no-external-requestentry is read-only. (best practice) [sources: tests/invariants/test_dry_run_class_ratchet.py, src/devops_cli/ai/gateway.py, openspec/specs/command-dry-run-class/spec.md]- Chosen: Explicit local-write set in the test. Chosen: it is the smallest change, names the known writers and keeps the ratchet deterministic.
- Rejected: Add a write flag to the dry-run decorator. Rejected: it changes every command callback and the decorator for a table defect.
- Rejected: Infer writes by reading command source. Rejected: source inspection is brittle and cannot prove that a command writes nothing.
- Should
docs/MCP_TOOLS.mdchange with the exposure table?: Yes.docs/MCP_TOOLS.mdmust show the five local-write tools as not read-only so the public table matches the exposure table. (best practice) [sources: docs/MCP_TOOLS.md, tests/invariants/test_dry_run_class_ratchet.py]- Chosen: Update the documentation table. Chosen: the documentation currently shows true for these tools and would contradict the fixed table.
- Rejected: Leave the documentation table unchanged. Rejected: the public table would still say the five tools are read-only.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-07: none.
Tool: none found.
Activity
dan-petty commentedon Nov 5, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(mcp)scope of the title gives the scope.The mislabeled flag misleads tool selection but does not block a user or expose a vulnerability.Correct flags let a model and client choose tools by their true write capability.The change edits one table, one requirement, and one test.Both reference the no-external-request class, but #2247 assigns the class to commands while this candidate fixes what the class means for readOnlyHint.fix(mcp): mark tools that write not read-only and test the schema (#3649
devops-cli-service commentedon Nov 6, 2026
Status set to Ready at cda72c7 (see proposed design in issue body).
devops-cli-service commentedon Nov 7, 2026
Alternatives check: none
Reason: The web searches returned no results (the provider did not answer), and the need is a repository-internal correction: the MCP exposure table, the
no-external-requestrequirement inopenspec/specs/command-dry-run-class/spec.mdand the ratchet test intests/invariants/test_dry_run_class_ratchet.pymust agree on whatreadOnlyHintmeans for commands that write local state. No open, maintained tool or library performs that change, and the issue itself records that no existing tool was found; the ADRs in force cover roadmap, CI and sandbox topics and name no MCP tooling that would settle the flag's meaning.Tool: none found
Lacks:
readOnlyHintvalue of this repository's MCP exposure table from each command's local write behaviourno-external-requestrequirement so it constrains external requests onlySearches run:
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 12, 2026
Released in v0.117.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.117.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 07:00 UTC