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-19: none.
Tool: none found.
Reason: Searches found no open, maintained tool or library that renames CLI commands or derives command names from API routes; the HashiCorp Vault CLI is a client for Vault, not a tool that renames this project's Typer commands, MCP rows, docs and tests.
Lacks:
- Renaming existing Typer command names from API routes
- Updating MCP exposure rows and generated command reference
- Changing callers in docs, Makefile, k8s and skills
Proposed design
Problem statement
The devops vault commands use names that do not match the Vault API routes: status, get, set, logout and audit. The owner asked on 2026-11-12 that a devops command on an HTTP API take its names from the routes. Rename them to health, read, write, token revoke-self and audit-log. Update the MCP rows, the documents and the tests.
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
devops vault health --addr http://example.com:8200runs intests/commands/test_vault_cmd.pywith a fake Vault - THEN The command requests
GET /v1/sys/healthand exits 0.
Requirement: Read command name
The vault command group SHALL name its read command read and SHALL keep the option --key.
Scenario: Dry run of vault read
- WHEN
devops vault read secret/data/x --dry-runruns intests/commands/test_vault_cmd.py - THEN The output holds
GET /v1/secret/data/xand the command sends 0 requests.
Requirement: Read key option
The vault read command SHALL keep the option --key.
Scenario: Read one field with a key
- WHEN
devops vault read secret/data/x --key token --showruns intests/commands/test_vault_cmd.pywith a fake Vault that returnstokenwith valuevalue - THEN The output holds
token (from vault): valueand the command exits 0.
Requirement: Write command name
The vault command group SHALL name its write command write and SHALL take the field pairs k=v as arguments.
Scenario: Dry run of vault write
- WHEN
devops vault write secret/data/x k=v --dry-runruns intests/commands/test_vault_cmd.py - THEN The output holds
POST /v1/secret/data/xand the command 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
devops vault leases revoke lease-1 --dry-runruns intests/commands/test_vault_cmd.py - THEN The output holds
POST /v1/sys/leases/revokeand the command sends 0 requests.
Requirement: Removed leases option
The vault leases group SHALL refuse the option --revoke.
Scenario: Old leases option exits 2
- WHEN
devops vault leases --revoke lease-1runs intests/commands/test_vault_cmd.py - THEN The command exits 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
devops vault token revoke-selfruns intests/commands/test_vault_cmd.pywith a fake Vault and a usable token - THEN The command requests
POST /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
devops vault get,devops vault status,devops vault set p k=vanddevops vault logoutrun intests/commands/test_vault_cmd.py - THEN Each command exits 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
devops vault --helpruns intests/commands/test_vault_cmd.py - THEN The output lists
audit-logand holds no command namedaudit.
Requirement: Project verb sync kept
The command vault sync SHALL keep its name and its behavior.
Scenario: Dry run of vault sync
- WHEN
devops vault sync secret/data/x --dry-runruns intests/commands/test_vault_cmd.py - THEN The command exits 0 and sends 0 requests.
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
- WHEN
uv run pytest tests/ai/mcp/test_mcp_exposure_table.pyruns after the exposure table changes - THEN The test passes with no row named
vault_getorvault_status, and with rows namedvault_readandvault_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 - THEN The test passes.
Requirement: Generated command reference
The change SHALL leave the generated command reference equal to the output of its generator.
Scenario: Docs check
- WHEN
uv run devops docs checkruns after the reference regenerates - THEN The command exits 0.
Existing Tool Considered
The alternatives check of 2026-11-19 in the issue body returned none; see its block for the searches and the lacks. No open, maintained tool or library covers the need. The change edits existing Typer commands, the MCP exposure table, the generated command reference 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 names do the operations of the route
/v1/<path>take?: The command names arereadfor GET andwritefor POST. The route has no fixed path word, so the Vault names of its two operations give the verbs. (best practice) [sources: src/devops_cli/commands/vault.py, tests/commands/test_vault_cmd.py]- Chosen: read and write. The Vault API names the two operations of
/v1/<path>read and write. The route gives no other word. - 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. The Vault API names the two operations of
- Does the mount word
sysorauthstay in a command name?: No./v1/sysand/v1/authare base paths.statusbecomeshealthandlogoutbecomestoken revoke-self. (best practice) [sources: src/devops_cli/commands/vault.py, tests/commands/test_vault_cmd.py]- Chosen: Drop the mount word. A base path gives no word of the operation. The body records this rule for
/v1/sysand/v1/auth. - 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. The body records this rule for
- Which name does the local audit trail take?:
vault audit-log. In Vault,sys/auditmeans audit devices. A command namedauditwould read as that route. (best practice) [sources: src/devops_cli/commands/vault.py]- 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: tests/commands/test_vault_cmd.py, src/devops_cli/commands/vault.py]- 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: tests/commands/test_vault_cmd.py, src/devops_cli/commands/vault.py]- 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: tests/commands/test_vault_cmd.py, src/devops_cli/commands/vault.py]- 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: tests/commands/test_vault_cmd.py, src/devops_cli/commands/vault.py]- 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?: The rows follow their command paths:
vault_getbecomesvault_readandvault_statusbecomesvault_health. [sources: src/devops_cli/config/constants.py:306, tests/ai/mcp/test_mcp_exposure_table.py, src/devops_cli/ai/mcp/generator.py]
Fit
Fits in one pull request.
Suspected block
A person must remove one edge of the dependency cycle #5234 -> #5232 -> #5228 -> #5234 before work starts.
The item is in a dependency cycle: #5234 → #5232 → #5231 → #5230 → #5229 → #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