Repository navigation
Description
Problem
#5223 is a tracker. Its five sub-issues give the route names of five tool groups. Refine and stage skip a tracker, so no item builds the core scope of #5223: the pass-through registry and its ADR.
Other work needs the registry: the pass-through class that #4840 defers, and the "Merge first" lines of #5229 and #5230.
Scope
- ADR. Record the rule of the owner request of 2026-11-12 on feat(cli): tool commands pass unknown arguments to the tool #5223: a command that runs a tool takes the command names and the options of the tool, and passes its arguments through. A command of an API-based tool takes the names of the API route. Use the next free ADR number, because 0026 is in use. Use the form of
docs/adr/README.md. - Registry. Add
src/devops_cli/core/passthrough.py. The key of an entry is the tool path (gh run list). An entry holds:- the devops paths (a
gh prentry namesdevops gh pr <verb>anddevops pr <verb>) - the runner (
run_gh, orrun_subprocesswith the isolated environment of the tool) - read or write
- the owned options and the refused options, with the names of the tool
- the MCP allowlist: each option that an MCP caller can give, with its arity and its caps
- the cost of one run, and the page rule of
-L/--limit - the timeout
- the devops paths (a
- Never-wrapped list. The registry lists the gh verbs that devops never wraps:
pr merge,auth,secret set,repo deleteandrelease.
The other points of the design of #5223 are not in this item: the command shape, the runner, help, dry run, MCP, the recorded flags and the resolver (points 3 to 10).
Acceptance criteria
- Test first: a test reads the entry
gh run listfrom the registry. It finds the devops paths, the runner, the read mode, and the owned and refused options of the entry. The test fails on the base. - A test: the never-wrapped list holds the five verbs, and no entry has a path that the list holds.
- A test: each devops path of an entry is a registered command.
uv run devops docs checkpasses.
Dependencies
None.
Source
Source: #5223
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches returned no maintained tool for this registry. Generic CLI frameworks and the gh CLI pass arguments through, but none holds per-entry devops paths, option ownership, an MCP allowlist, cost, timeout and never-wrapped rules.
Lacks:
- Registry keyed by tool path with devops aliases
- Owned and refused options per entry
- MCP allowlist with arity and caps
- Run cost, page rule and timeout per entry
- Never-wrapped verb list enforcement
Proposed design
Problem statement
No item builds the core scope of #5223: the pass-through registry and its ADR. Other work needs the registry: the pass-through class that #4840 defers, and the merge-first lines of #5229 and #5230. This item adds ADR 0035, the registry entry for gh run list, and the never-wrapped gh verb list.
Acceptance criteria
Requirement: ADR 0035 uses the MADR form
The project SHALL add ADR 0035 in the MADR form of docs/adr/README.md.
Scenario: ADR form test passes
- WHEN A developer runs
uv run devops ci test tests/invariants/test_adr_records.py. - THEN The command exits 0 and reports no rule failure for ADR 0035.
Requirement: ADR 0035 records the pass-through rule
ADR 0035 MUST state the pass-through rule of the owner request of 2026-11-12 on #5223.
Scenario: ADR index and docs check pass
- WHEN A developer runs
uv run devops docs check. - THEN The command exits 0 and the ADR index in
docs/adr/README.mdlists record 0035.
Requirement: Registry holds the gh run list entry
The pass-through registry SHALL hold one entry keyed by gh run list.
Scenario: The entry has its fields
- WHEN A test reads
devops_cli.core.passthrough.REGISTRY['gh run list']. - THEN The entry has
devops gh run listin its devops paths, runnerrun_gh, moderead, and non-empty owned and refused option maps.
Requirement: Registry test fails on the base commit
The registry test MUST fail on the base commit before the module exists.
Scenario: Test first
- WHEN A developer runs
uv run devops ci test tests/core/test_passthrough.pyon the base commit. - THEN The command exits non-zero and names the missing
devops_cli.core.passthroughmodule.
Requirement: Never-wrapped gh verbs have no entry
The registry SHALL list pr merge, auth, secret set, repo delete and release as never wrapped.
Scenario: The list has five verbs and no entry
- WHEN A test reads
NEVER_WRAPPEDandREGISTRY. - THEN The set equals the five verbs, and no registry key equals or starts with a listed verb plus a space.
Requirement: Registry paths resolve to registered commands
Each devops path in a registry entry MUST resolve to a command registered in the CLI.
Scenario: Every path resolves
- WHEN A test walks each entry's devops paths and resolves each path in the CLI command tree.
- THEN Each path resolves to a registered command, and the test reports no missing path.
Requirement: Registry entry holds cost, page rule and timeout
The gh run list entry SHALL hold a run cost, a page rule for -L/--limit, and a timeout.
Scenario: Operational limits are present
- WHEN A test reads the
gh run listentry. - THEN The entry has a positive cost, a page rule that names
-Land--limit, and a positive timeout.
Requirement: Registry entry holds an MCP allowlist
The gh run list entry SHALL hold an MCP allowlist with an arity and caps for each allowed option.
Scenario: MCP allowlist is complete
- WHEN A test reads the MCP allowlist of the
gh run listentry. - THEN Each allowed option has an arity and a cap, and every allowed option is in the owned options.
Requirement: Documentation check passes
The documentation check SHALL pass after the ADR and index update.
Scenario: Docs check
- WHEN A developer runs
uv run devops docs check. - THEN The command exits 0.
Existing Tool Considered
The alternatives check of 2026-11-21 in the issue body gives verdict none and names no tool. It lists the needs that no maintained tool covers: a registry keyed by tool path with devops aliases, owned and refused options, an MCP allowlist with arity and caps, run cost, page rule, timeout, and never-wrapped enforcement. The project builds src/devops_cli/core/passthrough.py itself. The written cost is about 80k tokens and 1.5 engineer-days to build, and about 10k tokens per year to keep and fix.
Key questions
- Which ADR number and status does the new record use?: Use ADR 0035 with status accepted, date 2026-11-12, decision-makers [owner], issue 6597 and tracker 5223. The index ends at 0034, and 0026 is in use. An accepted record carries a body-hash. (best practice) [sources: docs/adr/README.md]
- Chosen: ADR 0035, status accepted. The index ends at 0034, and the README requires the accepted status and body-hash before merge.
- Rejected: ADR 0035, status proposed. The pull request sets accepted before it is ready, so the final record is accepted.
- Rejected: ADR 0026. Record 0026 is in use by the GitHub settings record.
- How does the registry represent an entry?: Use a frozen dataclass
PassthroughEntryand a module-levelREGISTRY: dict[str, PassthroughEntry]keyed by the tool path. The fields are devops_paths, runner, mode, owned_options, refused_options, mcp_allowlist, run_cost, page_rule and timeout. (best practice) [sources: src/devops_cli/core/process.py:1195, src/devops_cli/github/rate_limiter.py:1888, ARCHITECTURE.md:184]- Chosen: Frozen dataclass and dict. It gives typed fields and an immutable entry, and a test can read it offline.
- Rejected: TypedDict. It gives no runtime validation of the option maps or the timeout.
- Rejected: Plain dict. It gives no type check and no stable field names.
- Which runner does the
gh run listentry hold?: Userun_gh, because the entry runs the gh CLI and must use the GitHub rate limiter and the gh authentication. Userun_subprocesswith the isolated environment only for a tool that has no dedicated runner. (best practice) [sources: src/devops_cli/github/rate_limiter.py:1888, src/devops_cli/core/process.py:1195, ARCHITECTURE.md:184]- Chosen: run_gh. It keeps the GitHub rate limit and the gh authentication for the entry.
- Rejected: run_subprocess. It bypasses the GitHub rate limiter and the gh authentication.
- Which devops paths does the
gh run listentry name?: Namedevops gh run listin this item. Adddevops run listwhen the CLI registers therungroup. The test requires every named path to resolve to a registered command. (best practice) [sources: src/devops_cli/commands/gh.py]- Chosen: Only
devops gh run list. Theghcommand is registered, and the test requires every named path to resolve. - Rejected:
devops gh run listanddevops run list. This item adds norungroup, so it cannot show that the second path resolves.
- Chosen: Only
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 21, 2026
Both items work on the pass-through registry, but 5323 adds gh sub-group entries and the candidate builds the registry and its ADR.devops-cli-service commentedon Nov 21, 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 (7)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 25, 2026
Released in v0.213.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.213.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 02:42 UTC