Repository navigation
Description
Problem or Motivation
The owner asked on 2026-11-12 that a devops command on an HTTP API take its names from the API routes (ADR 0026, #5223). The project pins no vault CLI and no bao CLI, so devops vault is an API command. Sources: commands/vault.py, security/vault_plans.py and config/constants.py.
| devops command | Route |
|---|---|
vault status |
GET /v1/sys/health |
vault get <path> --key |
GET /v1/<path> (Vault: read) |
vault set <path> k=v |
POST /v1/<path> (Vault: write) |
vault leases --revoke <id> |
POST /v1/sys/leases/revoke. The action is in an option. |
vault logout |
POST /v1/auth/token/revoke-self |
vault audit |
The local devops audit trail. In Vault, sys/audit means audit devices. |
Loki holds no usage error for this group in the 7 days to 2026-11-12.
Proposed Solution & Architectural Design
- Rename to
vault health,vault read <path>,vault write <path> k=vandvault leases revoke <lease_id>.vault logoutbecomes the commandrevoke-selfin the groupvault token. The mounts/v1/sysand/v1/authare base paths, so they give no word. The route/v1/<path>has no fixed word, so the Vault names of its operations, read and write, are the verbs (ADR 0026). vault login --methodalready matchesPOST /v1/auth/{method}/login: the config givesmethodby default, so it is an option.--role-idand--secret-idmatch the body fields.- The local trail becomes
vault audit-log, a word that no Vault route uses. vault syncstays a project verb: it copies Vault into the keyring.- Change the MCP rows
vault get(tovault read) andvault status(tovault health). - Add
vaultto the groups oftests/commands/test_api_command_names.py. - Premise check: list the callers of
vault getandvault setin documents, the Makefile,k8s/and the skills, and change them.
Target Subsystem
Secrets (devops vault).
Existing Tool Considered
The Vault HTTP API reference gives the names. Nothing is built.
Acceptance Criteria
devops vault read secret/data/x --dry-runprintsGET /v1/secret/data/xand sends 0 requests.devops vault leases revoke <id> --dry-runprintsPOST /v1/sys/leases/revoke.devops vault getanddevops vault statusexit 2.tests/commands/test_api_command_names.pypasses forvault.devops docs checkpasses.
Dependencies
Open the pull request after the pull request of #5232 merges (generated command reference, CONST_MCP_EXPOSURE_TABLE, the API name test).
Source: #5223
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches returned only HashiCorp Vault itself and unrelated pages. The need is renaming this repository's own Typer commands, MCP tables, generated docs and tests, which no external tool or library does.
Lacks:
- No tool renames this project's Typer commands to route names
- No tool rewrites the MCP exposure, restriction and confinement tables
- No tool regenerates the command reference and the OpenSpec specs
Proposed design
Problem statement
The devops vault commands use names that do not match the Vault API routes: status, get, set and logout, and the local audit trail uses audit, a word that Vault uses for audit devices. ADR 0037 records the owner's 2026-11-12 rule that a command for an API-based tool takes the names of the API route. Rename them to health, read, write, token revoke-self and audit-log, and make the leases revoke action a leases revoke subcommand. The rename reaches the MCP exposure table, the MCP parameter restrictions, the path-confinement table, the resource://vault/status resource, the generated command reference, the OpenSpec specs, and the callers in tests, documents, the Makefile, k8s/ and the skills.
Acceptance criteria
Requirement: Health command name
The vault command group SHALL name its health command health, after the route GET /v1/sys/health.
Scenario: Health command requests sys health
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_healthruns with a fake Vault - THEN The test passes and asserts that
devops vault health --addr http://example.com:8200requestsGET /v1/sys/healthand exits 0.
Requirement: Read command name
The vault command group SHALL name its read command read.
Scenario: Dry run of vault read
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_read_dry_runruns - THEN The test passes and asserts that
devops vault read secret/data/x --dry-runprintsGET /v1/secret/data/xand sends 0 requests.
Requirement: Read key option
The vault read command SHALL keep the option --key.
Scenario: Read one field with a key
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_read_keyruns with a fake Vault that returnstokenwith valuevalue - THEN The test passes and asserts that
devops vault read secret/data/x --key token --showprintstoken (from vault): valueand exits 0.
Requirement: Write command name
The vault command group SHALL name its write command write and SHALL take field pairs k=v as arguments.
Scenario: Dry run of vault write
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_write_dry_runruns - THEN The test passes and asserts that
devops vault write secret/data/x k=v --dry-runprintsPOST /v1/secret/data/xand sends 0 requests.
Requirement: Leases revoke subcommand
The vault leases group SHALL hold the subcommand revoke and SHALL NOT hold the option --revoke.
Scenario: Dry run of vault leases revoke
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k leases_revoke_dry_runruns - THEN The test passes and asserts that
devops vault leases revoke lease-1 --dry-runprintsPOST /v1/sys/leases/revokeand sends 0 requests.
Requirement: Removed leases option
The vault leases group SHALL refuse the option --revoke.
Scenario: Old leases option exits 2
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k leases_revoke_option_refusedruns - THEN The test passes and asserts that
devops vault leases --revoke lease-1exits with code 2.
Requirement: Token revoke-self command
The command vault logout SHALL become revoke-self in the group vault token.
Scenario: Token revoke-self sends the revoke request
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k token_revoke_selfruns with a fake Vault and a usable token - THEN The test passes and asserts that
devops vault token revoke-selfrequestsPOST /v1/auth/token/revoke-selfand exits 0.
Requirement: Removed command names
The names get, set, status and logout SHALL NOT stay as commands of the group vault.
Scenario: Removed names exit 2
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k removed_vault_namesruns - THEN The test passes and asserts that
devops vault get,devops vault status,devops vault set p k=vanddevops vault logouteach exit with code 2.
Requirement: Local audit trail name
The command of the local devops audit trail SHALL be named audit-log.
Scenario: Audit log name
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_audit_log_helpanduv run pytest tests/commands/test_cli_format_adoption.py -k vaultrun - THEN The tests pass and assert that
devops vault --helplistsaudit-log, holds no command namedaudit, and the value-command table namesvault audit-log.
Requirement: Project verb sync kept
The command vault sync SHALL keep its name and its behavior.
Scenario: Dry run of vault sync
- WHEN
uv run pytest tests/commands/test_vault_cmd.py -k vault_sync_dry_runruns - THEN The test passes and asserts that
devops vault sync secret/data/x --dry-runexits 0 and sends 0 requests.
Requirement: Dry-run class table follows the renamed commands
The dry-run class table SHALL name vault read, vault write, vault health, vault leases revoke, vault token revoke-self and vault audit-log.
Scenario: Dry-run class declarations
- WHEN
uv run pytest tests/commands/test_valkey_vault_dry_run.pyruns - THEN The test passes and asserts that the six renamed vault commands carry their dry-run classes and that the old command paths are gone.
Requirement: MCP rows take the new names
The vault rows of CONST_MCP_EXPOSURE_TABLE SHALL take the command paths vault read and vault health.
Scenario: Exposure table rows and tool listing
- WHEN
uv run pytest tests/ai/mcp/test_mcp_exposure_table.py tests/ai/mcp/test_mcp_tool_listing.pyruns after the exposure table changes - THEN The tests pass; the table holds
("vault", "read")and("vault", "health")and no row that names a command the tree lacks, and the tool listing namesvault_readandvault_healthand novault_getorvault_status.
Requirement: MCP parameter restrictions follow the new paths
The path restrictions of _PATH_PARAM_RESTRICTIONS SHALL follow the renamed command paths, so vault read publishes no show and vault health publishes no vault_addr.
Scenario: MCP schemas of the renamed vault tools
- WHEN
uv run pytest tests/ai/mcp/test_mcp_tool_secrets.py tests/ai/mcp/test_mcp_tool_registry.py tests/roadmap/stage/test_stage_run_allowlist.py -k vaultruns - THEN The tests pass and assert that
vault_readpublishes noshow,vault_healthpublishes novault_addr, and the allowlist of("vault", "read")ispath,keyanddry_run.
Requirement: MCP path confinement names vault read
The NOT_A_FILE_PATH table SHALL name the Vault read tool as vault_read.
Scenario: Path confinement entry for vault read
- WHEN
uv run pytest tests/ai/mcp/test_path_confinement.pyruns - THEN The test passes and asserts that
vault_read.pathis recorded as a Vault secret path and that no entry namesvault_get.
Requirement: Vault status resource runs the health command
The MCP resource resource://vault/status SHALL run devops vault health.
Scenario: Vault status resource dispatches the health command
- WHEN
uv run pytest tests/ai/mcp/test_mcp_prompts_and_resources.py -k vaultruns - THEN The test passes and asserts that the resource dispatches
uv run devops vault health.
Requirement: API name test covers vault
The group vault SHALL be a case of tests/commands/test_api_command_names.py.
Scenario: API name test for vault
- WHEN
uv run pytest tests/commands/test_api_command_names.py -k vaultruns after the pull request of feat(cloudflare): cloudflare commands take the API route names #5232 merges - THEN The command exits 0 and collects at least one test for
vault.
Requirement: Generated command reference
The change SHALL leave the generated command reference, the MCP tool page and the generated command pages equal to the output of their generator.
Scenario: Docs check
- WHEN
uv run devops docs checkruns afteruv run devops docs generate - THEN The command exits 0.
Requirement: OpenSpec specs follow the new names
The change SHALL update the OpenSpec specs that name the vault commands and MCP tools.
Scenario: OpenSpec check
- WHEN
uv run devops openspec checkruns afteropenspec/specs/command-dry-run-class/spec.md,openspec/specs/mcp-tool-secrets/spec.md,openspec/specs/mcp-tool-path-confinement/spec.mdandopenspec/specs/vault-status/spec.mdtake the new names - THEN The command exits 0.
Existing Tool Considered
No open, maintained tool or library covers the need. The alternatives check of 2026-11-19 in the issue body returned none; see its block for the searches and the lacks. hashicorp/vault is a client for Vault, not a tool that renames this project's Typer commands, MCP rows, generated documents and tests. The change edits existing Typer commands, the MCP exposure and restriction tables, the path-confinement table, the MCP resource, the generated command reference, the OpenSpec specs and their callers. It builds no new module to keep and fix, so it has no token or elapsed-time cost for new code.
Key questions
- Which record holds the owner's 2026-11-12 rule for API command names?: ADR 0037, 'Tool commands mirror and pass through options', records the rule that a command of an API-based tool takes the names of the API route. ADR 0026 is 'GitHub settings are OpenTofu code the owner applies', so the issue body's citation of ADR 0026 is wrong. [sources: docs/adr/0037-tool-commands-mirror-and-pass-through-options.md:14, docs/adr/README.md:173, docs/adr/README.md:184]
- Which names do the operations of the route
/v1/<path>take?:readfor GET andwritefor POST, the Vault names of the two operations. The route has no fixed path word, so the operation names give the verbs. (best practice) [sources: docs/adr/0037-tool-commands-mirror-and-pass-through-options.md:14, src/devops_cli/security/vault_plans.py:33, src/devops_cli/security/vault_plans.py:44]- Chosen: read and write. ADR 0037 gives the route names, and the Vault API names the GET and POST operations of
/v1/<path>read and write. - Rejected: get and set. The Vault API names no get or set operation on this route. The words do not come from the route.
- Rejected: kv get and kv put. The group covers every mount, not only the KV secrets engine. A KV word is too narrow.
- Chosen: read and write. ADR 0037 gives the route names, and the Vault API names the GET and POST operations of
- Does the mount word
sysorauthstay in a command name?: No./v1/sysand/v1/authare base paths.statusbecomeshealthandlogoutbecomestoken revoke-self. (best practice) [sources: docs/adr/0037-tool-commands-mirror-and-pass-through-options.md:14, src/devops_cli/config/constants.py:2522, src/devops_cli/config/constants.py:2523, src/devops_cli/config/constants.py:2524]- Chosen: Drop the mount word. A base path gives no word of the operation, and the route constants show
sys/health,sys/leases/revokeandauth/token/revoke-selfafter the base path. - Rejected: Keep
sysandauthin the names. The words repeat the mount on each command and add nothing to the operation name.
- Chosen: Drop the mount word. A base path gives no word of the operation, and the route constants show
- Which name does the local audit trail take?:
vault audit-log. The command reads the local devops trail, not a Vault route; in Vault,sys/auditmeans audit devices. A command namedauditwould read as that route. (best practice) [sources: src/devops_cli/commands/vault.py:560, openspec/specs/command-dry-run-class/spec.md:603]- Chosen: audit-log. No Vault route uses
audit-log, so the name reads as the local devops trail and not assys/audit. - Rejected: audit.
sys/auditnames audit devices in Vault. The name reads as a Vault route that the command does not call. - Rejected: logs. The word is too broad. It reads as each log of the project, not only the local audit trail.
- Chosen: audit-log. No Vault route uses
- Does
vault logoutbecomevault token revoke-self?: Yes. The routePOST /v1/auth/token/revoke-selfgivestokenandrevoke-self./v1/authis a base path. (best practice) [sources: docs/adr/0037-tool-commands-mirror-and-pass-through-options.md:14, src/devops_cli/config/constants.py:2522, src/devops_cli/security/vault_plans.py:103]- Chosen: token revoke-self. The name takes each word of the route after the base path. The action is the subcommand.
- Rejected: Keep
logout. No Vault route names logout. The name does not come from the API. - Rejected: revoke-self at the top level. The name drops the
tokenword of the route.
- How does the leases revoke action become a command?: The group
vault leasesholds the subcommandrevoke. The lease id is its argument. The routePOST /v1/sys/leases/revokegives the wordrevoke. (best practice) [sources: docs/adr/0037-tool-commands-mirror-and-pass-through-options.md:14, src/devops_cli/config/constants.py:2524, src/devops_cli/security/vault_plans.py:113]- Chosen: Subcommand
leases revoke. The route ends in the action wordrevoke. A subcommand puts the action in the command path. - Rejected: Keep the option
--revoke. The action stays an option. The command path does not take the route name. - Rejected: Top-level
vault revoke. The name drops theleasesword of the route.
- Chosen: Subcommand
- Does
vault loginkeep its current form?: Yes. The routePOST /v1/auth/{method}/logingiveslogin. The config suppliesmethodby default, so--methodstays an option.--role-idand--secret-idmatch body fields. (best practice) [sources: src/devops_cli/commands/vault.py:308, src/devops_cli/config/constants.py:2517, src/devops_cli/config/constants.py:2521]- Chosen: Keep
vault login --method. The command name is the route word. The method has a config default, so it stays an option. - Rejected: Rename to
vault auth login./v1/authis a base path. It gives no word of the operation.
- Chosen: Keep
- Does
vault synckeep its name?: Yes. It copies Vault into the keyring. No Vault route covers that work, so it stays a project verb. (best practice) [sources: src/devops_cli/commands/vault.py:247]- Chosen: Keep
vault sync. The command copies Vault into the keyring. No API route names that work. - Rejected: Rename it to a route name. No route covers the keyring copy. A route name would state a request that the command does not send.
- Chosen: Keep
- How do the MCP rows of the group change?:
CONST_MCP_EXPOSURE_TABLErows follow their command paths:("vault", "get")becomes("vault", "read")and("vault", "status")becomes("vault", "health");("vault", "sync")stays. [sources: src/devops_cli/config/constants.py:455, src/devops_cli/config/constants.py:456, src/devops_cli/config/constants.py:457] - Which MCP surfaces key on the vault command paths?: The exposure table,
_PATH_PARAM_RESTRICTIONS(("vault", "status")and("vault", "get")), theNOT_A_FILE_PATHentryvault_get, theresource://vault/statusresource that runsdevops vault status, the tool-listing snapshot, and the registry, secrets and allowlist tests. A rename that leaves them is a stale key:vault readwould publishshow,vault healthwould publishvault_addr, and the path-confinement test fails. [sources: src/devops_cli/ai/mcp/generator.py:189, src/devops_cli/ai/mcp/generator.py:191, src/devops_cli/ai/mcp/path_confinement.py:96, src/devops_cli/ai/mcp/server.py:298, src/devops_cli/config/constants.py:455, tests/ai/mcp/test_path_confinement.py:262, tests/roadmap/stage/test_stage_run_allowlist.py:144, tests/ai/mcp/test_mcp_tool_secrets.py:153] - Which files name the old vault command or tool names?: The generated command reference and command page, the MCP tool page, the MCP generator restrictions, the path-confinement table, the vault status resource, the OpenSpec specs, and the command, security, MCP and format tests. Each caller must take the new name. [sources: docs/CLI_REFERENCE.md:427, docs/commands/vault.md:9, docs/MCP_TOOLS.md:154, src/devops_cli/ai/mcp/generator.py:189, src/devops_cli/ai/mcp/path_confinement.py:96, src/devops_cli/ai/mcp/server.py:302, src/devops_cli/config/constants.py:455, tests/commands/test_valkey_vault_dry_run.py:81, tests/security/test_vault_broker.py:187, tests/ai/mcp/test_mcp_tool_registry.py:174, tests/ai/mcp/test_mcp_tool_secrets.py:153, tests/commands/test_cli_format_adoption.py:154, tests/roadmap/stage/test_stage_run_allowlist.py:146, openspec/specs/command-dry-run-class/spec.md:599, openspec/specs/mcp-tool-secrets/spec.md:9, openspec/specs/mcp-tool-path-confinement/spec.md:60, openspec/specs/vault-status/spec.md:9]
- Does the API name test cover the group
vault?: Not at this commit:tests/commands/holds notest_api_command_names.py, because the test arrives with feat(cloudflare): cloudflare commands take the API route names #5232. This change addsvaultto the groups of that test and runs it after feat(cloudflare): cloudflare commands take the API route names #5232 merges. [sources: tests/commands/test_all_commands_help_dryrun.py:138] - Which specs name the vault commands and tools?:
command-dry-run-classnamesvault auditandvault leases --revoke;mcp-tool-secretsnamesvault_get,vault_statusandvault_sync;mcp-tool-path-confinementnamesvault_get.path;vault-statusnames the toolvault_status. [sources: openspec/specs/command-dry-run-class/spec.md:599, openspec/specs/command-dry-run-class/spec.md:603, openspec/specs/mcp-tool-secrets/spec.md:9, openspec/specs/mcp-tool-path-confinement/spec.md:60, openspec/specs/vault-status/spec.md:9]
Fit
Fits in one pull request.
Suspected block
None.
The item is in a dependency cycle: #5234 → #5232 → #5228 → #5234. A person removes one edge of the cycle, so that its items no longer wait on each other.
Activity
dan-petty commentedon Nov 12, 2026
Both are children of #5223 and ADR 0026, but #5228 renames gh commands while this candidate renames vault commands.devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at 4d085f1 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/config/constants.py,docs/CLI_REFERENCE.md.devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at 8cf9935 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
fix(roadmap): an open tracker holds back no item (#6548)
devops-cli-service commentedon Nov 21, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence