Skip to content

feat(roadmap): allow-list builder for planner read-only commands #4004

Closed

Description

@dan-petty

Problem or Motivation

A command run by the planner can cause damage if it writes state, deletes keys, or exposes private paths (such as the defect in #3218 where config unset deleted a key). As decided in ADR 0018 (docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md, #3242), the run tool must enforce a strict allow-list before executing any command in the sandbox.

Proposed Solution & Architectural Design

Implement the allow-list builder and validator for planner commands:

  1. Build the allow-list table of permitted command paths from:
    • Help commands for every command: devops <command> --help.
    • Each read-only command from CONST_MCP_EXPOSURE_TABLE in src/devops_cli/config/constants.py with options permitted by its MCP tool.
    • Exclude any command that publishes an option for a path, as governed by _PATH_PARAM_RESTRICTIONS in src/devops_cli/ai/mcp/generator.py (even if marked read-only in the exposure table).
  2. Refuse any command path not in the allow-list table and return the refusal reason so the planner continues planning without running the command.
  3. Prohibit any user-supplied path options: the run tool operates solely on the mounted read-only staged commit.

Depends on: #3242 (ADR 0018).

Target Subsystem

AI & Agentic Review Pipeline

Existing Tool Considered

The existing CONST_MCP_EXPOSURE_TABLE and _PATH_PARAM_RESTRICTIONS tables in DevOps CLI already classify read-only commands and path parameters. Reusing these tested tables avoids duplicating command definitions. Building the allow-list comparison logic costs approximately 10,000 tokens and 0.5 elapsed days.

Proposed design

Problem statement

The planner runs devops CLI commands in a sandbox. A write command can delete state or expose a private path; devops config unset deleted a key in #3218. ADR 0018 requires a strict allow-list before the sandbox runs any command. This change builds that allow-list from the read-only rows of CONST_MCP_EXPOSURE_TABLE and narrows each command through _PATH_PARAM_RESTRICTIONS. The validator refuses every other command and returns one reason, so the planner continues planning.

Acceptance criteria

Requirement: Read-only command enters the allow-list

The allow-list builder SHALL hold each command path whose CONST_MCP_EXPOSURE_TABLE row is read-only and whose permitted Click parameters hold no path option.

Scenario: A read-only command with no path option

  • WHEN The builder runs and the row of gh labels list is read-only and its permitted Click parameters hold no path option
  • THEN The table holds ('gh', 'labels', 'list') with repo among its options

Requirement: Write command stays out

The allow-list builder SHALL leave out each command path whose CONST_MCP_EXPOSURE_TABLE row is not read-only.

Scenario: A write command

  • WHEN The validator checks valkey flush, whose row is not read-only
  • THEN The table holds no entry for ('valkey', 'flush') and the validator returns the reason not read-only

Requirement: Path option of a restricted command leaves it out

The allow-list builder SHALL leave out each command path whose permitted options hold an option that Typer types as a path.

Scenario: A restricted command with a path option

  • WHEN The builder runs and the allowed set of tf plan holds directory, whose Click type is typer.models.TyperPath
  • THEN The table holds no entry for ('tf', 'plan') and the validator returns the reason path option

Requirement: Path option of an unrestricted command leaves it out

The allow-list builder SHALL leave out each read-only command path whose Click parameters hold an option that Typer types as a path.

Scenario: An unrestricted command with a path option

  • WHEN The builder runs and the repo parameter of ai read has the type typer.models.TyperPath
  • THEN The table holds no entry for ('ai', 'read') and the validator returns the reason path option

Requirement: The restrictions narrow the options

The allow-list builder SHALL take the permitted options of a command that _PATH_PARAM_RESTRICTIONS names from that entry's allowed set.

Scenario: A restricted command with no path option

  • WHEN The builder runs and ('telemetry', 'profile') allows only trace_id
  • THEN The table holds ('telemetry', 'profile') with trace_id as its only option

Requirement: Help of every command is permitted

The validator SHALL permit the --help form of every command path that the Click tree holds.

Scenario: Help of a write command

  • WHEN The validator checks valkey flush with the --help option
  • THEN It permits the run and returns no reason

Requirement: Unknown command is refused

The validator SHALL refuse each command path that the allow-list does not hold and SHALL return the reason.

Scenario: The command of the defect in #3218

  • WHEN The validator checks config unset ai.vllm_url
  • THEN It refuses the run with the reason unknown command and names the path ('config', 'unset')

Requirement: An unpermitted option is refused

The validator SHALL refuse each option that the permitted set of the command does not hold.

Scenario: A withheld option of an allowed command

  • WHEN The validator checks ai benchmark with the output option
  • THEN It refuses the run with the reason option not permitted and names output

Existing Tool Considered

No alternatives check has run. No open, maintained library builds an allow-list of read-only Click commands from the project's exposure table. Click and Typer give the command tree and the option types, and the project's CONST_MCP_EXPOSURE_TABLE and _PATH_PARAM_RESTRICTIONS give the policy. The change reuses those tables, the Click tree that resolve_click_command reads, and the path check of tests/ai/mcp/test_path_confinement.py. The comparison logic is built here, at a written cost of about 10,000 tokens to build, keep and fix, and 0.5 elapsed days.

Key questions

  • Is ADR 0018 in the repository at this commit?: Yes. docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md is in the repository. Its Follow-ups section names the allow-list builder as item 2. Its Decision section gives the two rules of the table: the read-only rows of CONST_MCP_EXPOSURE_TABLE, and no command that publishes a path option. [sources: docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md]
  • Which table gives the command paths and the read-only flag?: CONST_MCP_EXPOSURE_TABLE in src/devops_cli/config/constants.py. Each row holds the command path tuple, a timeout in seconds, the read_only flag and the format_json flag. [sources: src/devops_cli/config/constants.py, docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md]
  • How does the builder read the options that a command permits?: resolve_click_command(path) in src/devops_cli/ai/mcp/generator.py returns the Click command of a path. The builder reads click_cmd.params and applies the filter of _introspect_command_parameters. It skips _IGNORED_PARAM_NAMES and the JSON parameters when the row sets format_json. It keeps only the allowed set when _PATH_PARAM_RESTRICTIONS names the path, and it keeps no second list of options. [sources: src/devops_cli/ai/mcp/generator.py]
  • How does the builder tell a path option from another option?: By the Click type that Typer builds: typer.models.TyperPath for a Path annotation and typer._click.types.File for a FileText or FileBinaryRead annotation. Neither class is a subclass of click.Path. The builder uses isinstance(param.type, (TyperPath, TyperFile)), the check of the audit in tests/ai/mcp/test_path_confinement.py. SECURITY.md rule 11 makes a file path from a model untrusted input. (best practice) [sources: tests/ai/mcp/test_path_confinement.py, openspec/changes/archive/2026-11-05-3480-mcp-path-audit-reads-types/design.md, SECURITY.md, docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md]
    • Chosen: Read the Typer Click type. Typer builds TyperPath or File from the annotation, so a new path option needs no list; a click.Path check misses both classes.
    • Rejected: Keep a list of path option names. A new command's path option would go unseen, and the list repeats metadata that the annotation holds.
    • Rejected: Check click.Path. TyperPath and File are not subclasses of click.Path, so the check finds no Typer path option.
  • What does a command that _PATH_PARAM_RESTRICTIONS names add to the allow-list?: Only the options of its allowed set. The command leaves the allow-list when one of those options is a path option. telemetry profile keeps trace_id. tf plan leaves because its allowed set holds directory, a typer.models.TyperPath. (best practice) [sources: src/devops_cli/ai/mcp/generator.py, src/devops_cli/commands/tf.py]
    • Chosen: Keep the command with its allowed options. The table withholds options, so the command publishes only the allowed ones, and a safe command such as telemetry profile stays.
    • Rejected: Leave out every command that the table names. It drops safe read-only commands such as telemetry profile and valkey ping, which publish no path.
  • Does the allow-list permit the --help form of a write command?: Yes. The allow-list permits --help for every command path in the Click tree. Click handles the help option itself and exits before the command body runs, so the help of a write command writes nothing. test_all_registered_subcommands_have_help shows that every command group answers --help with a usage line. (best practice) [sources: tests/commands/test_all_commands_help_dryrun.py, docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md]
    • Chosen: Permit --help for every path. Click handles the help option itself and runs no command body.
    • Rejected: Permit --help only for a path in the allow-list. The planner learns the options of a command from its help, and the help of a write command writes nothing.
  • What does the validator return when it refuses a run?: A refusal that holds the command path and one reason from a closed set. The reason is unknown command for a path that no row of CONST_MCP_EXPOSURE_TABLE names. It is not read-only for a row whose flag is false. It is path option for a read-only row whose permitted options hold a path. It is option not permitted for an option outside the permitted set. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/roadmap/stage/stage_tools.py]
    • Chosen: A closed set of reason words. A test asserts one word, and the planner branches on it with no parse of free text.
    • Rejected: A free-text message. No test can assert it, and the planner cannot branch on it.
  • Where does the allow-list builder live, and what does it expose?: A new module src/devops_cli/roadmap/stage/stage_run_allowlist.py, beside the planner's read-only tools in src/devops_cli/roadmap/stage/stage_tools.py. It exposes build_allowlist(), which returns the table, and check_command(path, options), which returns None or the refusal. (best practice) [sources: docs/roadmap/package-layout.md, src/devops_cli/roadmap/stage/stage_tools.py]
    • Chosen: A module beside the planner's tools. The run tool is a tool of the stage planner, and the planner's tools live in src/devops_cli/roadmap/stage/stage_tools.py; the builder stays out of the MCP transport and the sandbox engine.
    • Rejected: A module under src/devops_cli/ai/mcp/. The MCP server is no caller, and the builder must not depend on the MCP transport.
    • Rejected: A module under src/devops_cli/sandbox/. The sandbox package holds the workload and host sandbox engines, not the planner's command policy.
  • Where do the tests of the builder live?: tests/roadmap/stage/test_stage_run_allowlist.py, beside the tests of the other stage modules. The tests of tests/roadmap/ mirror the layout of src/devops_cli/roadmap/. [sources: docs/roadmap/package-layout.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-09: none.
Tool: none found.

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    on Nov 7, 2026
  2. added
    status/new
    value/high
    effort/low
    on Nov 7, 2026
  3. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Priority: P1-High. The change stops destructive planner commands and is a prerequisite for the run tool.
    • Value: High. The allow-list prevents writes and key deletion such as the defect in #3218.
    • Effort: Low. The candidate states about 10,000 tokens and 0.5 elapsed days of work.
    • Related: docs(security): design a sandboxed read-only run tool for the planner #3242, which asks for a different change. Both concern the ADR 0018 run tool; #3242 designs the tool and the candidate builds the allow-list check.
  4. added
    priority/p1-high
    on Nov 7, 2026
  5. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 5520193 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.

  6. added
    status/ready
    and removed
    status/new
    on Nov 7, 2026
  7. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 226394c (see proposed design in issue body).

  8. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: Two searches (Click CLI allow-list validators and LLM-agent command allow-lists) returned only unrelated MDN pages. No open, maintained tool builds an allow-list from this project's CONST_MCP_EXPOSURE_TABLE and _PATH_PARAM_RESTRICTIONS. The issue already reuses those tables, plus Click and Typer introspection, and builds only the comparison logic.

    Tool: none found

    Lacks:

    • No library derives an allow-list from the project's exposure table and path restrictions
    • No library classifies Typer path options (TyperPath, File) for this policy

    Searches run:

    • allow-list Click CLI commands validator restrict agent to read-only commands library, results: 5
    • python command allowlist for LLM agent shell tool safe command validation open source, results: 5

    Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.

  9. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Staged: branch feat/4004-allow-list-builder-for-planner-read, draft pull request #4357. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. Build the allow-list and the refusal from the exposure table and the two path records: 35046 tokens
    2. List the new module in the package layout: 10922 tokens

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • false_premise at group 1 (the builder's path-option rule), and the what_changes and security sections: The builder finds a path option only by the Click type that Typer builds, so the read-only row (("scan", "sast"), 300.0, True, False) enters the allow-list with its config option permitted, and devops scan sast --config <path> names a file path that the type check cannot see. The plan's claim that no path option enters the table, so the planner names no file and the run reads only the mounted copy, is therefore false, and the plan breaks the issue's rule that no user-supplied path option runs. Evidence: "_TEXT_PATH_OPTIONS: Mapping[str, frozenset[str]] = {"scan_sast": frozenset({"config"})}"
    • false_premise at feasibility: The plan says the exposure table holds 149 rows, but CONST_MCP_EXPOSURE_TABLE holds 144 rows: lines 286-434 are 149 lines and five of them (319, 361, 371, 397, 399) are comments. The group 1 census test that fails when the count is not 149 therefore fails on the base, and the plan's row count is wrong. Evidence: "the plan takes the set as the 149 rows above that line"
    • contrived_test at group 1: The only test of the text-path clause builds a small Typer app and patches only the confinement table, but build_allowlist() walks CONST_MCP_EXPOSURE_TABLE and resolves each row through resolve_click_command, so the app never becomes a row. The test asserts an absence it never caused and passes whatever the builder does, leaving the text-path rule untested. Evidence: "build a small Typer app with a config: str option, give its tool name an entry in the confinement table with monkeypatch, and assert the row leaves"
    • contrived_test at feasibility: The census test recomputes each row's decision with the same rule as the builder, so it mirrors the builder's code instead of checking it and a builder that applies the rule wrongly in the same way still passes; only the hardcoded count is an independent check. Evidence: "The census decides each row from its own data"
    • contrived_test at specs: The text-path scenario uses scan sast, whose target is already a typed path, so the case passes even if the builder never reads PATH_CONFINEMENTS and does not assert the requirement's second clause. Evidence: "the type check alone already leaves the row src/devops_cli/config/constants.py:410: (("scan", "sast"), 300.0, True, False), out of the table."
    • contrived_test at group 1: The test builds a small Typer app and gives only its tool name an entry in the confinement table, but build_allowlist() walks CONST_MCP_EXPOSURE_TABLE and resolves commands from the Click tree, so the synthetic command is never a row and the test cannot assert that a row leaves. Evidence: "build a small Typer app with a config: str option, give its tool name an entry in the confinement table with monkeypatch, and assert the row leaves"
    • contrived_test at group 1: The census test decides each row with the same rule as the builder, so it repeats the code and passes whatever the builder does; only the count of 144 is independent. Evidence: "The census decides each row from its own data: a row whose flag is false is removed with not read-only, a read-only row whose permitted parameter is a path is removed with path option, a row whose command the Click tree does not resolve is removed with unknown command, and every other read-only row is allowlisted."

    The runs of the planner and the review made 146 model request(s), and used 9610632 input tokens and 268898 output tokens. The tool calls, in order:

    1. file_symbols({"path":"src/devops_cli/ai/mcp/generator.py"})
    2. list_files({"directory":"tests/roadmap/stage"})
    3. read_file({"path":"docs/roadmap/package-layout.md"})
    4. read_issue({"number":3242})
    5. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":1,"end_line":120})
    6. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":185,"end_line":330})
    7. read_file({"path":"tests/ai/mcp/test_path_confinement.py","end_line":80})
    8. search_code({"text":"(\"gh\", \"labels\", \"list\")"})
    9. search_code({"text":"(\"tf\", \"plan\")"})
    10. search_code({"text":"(\"ai\", \"read\")"})
    11. read_file({"end_line":190,"path":"src/devops_cli/ai/mcp/generator.py","start_line":120})
    12. read_file({"path":"src/devops_cli/config/constants.py","start_line":296,"end_line":345})
    13. read_spec({"capability":"roadmap-stage"})
    14. read_file({"path":"src/devops_cli/roadmap/stage/stage_tools.py","end_line":90})
    15. search_code({"text":"(\"valkey\", \"flush\")"})
    16. search_code({"text":"(\"telemetry\", \"profile\")"})
    17. read_file({"end_line":300,"path":"src/devops_cli/config/constants.py","start_line":268})
    18. read_file({"end_line":470,"path":"src/devops_cli/config/constants.py","start_line":345})
    19. search_code({"text":"allowlist"})
    20. search_code({"text":"package-layout.md"})
    21. read_spec({"capability":"roadmap-package-layout"})
    22. file_symbols({"path":"tests/invariants/test_source_tree.py"})
    23. search_code({"text":"trace_id"})
    24. search_code({"text":"def list_labels"})
    25. read_file({"path":"src/devops_cli/commands/gh.py","start_line":233,"end_line":262})
    26. read_file({"path":"src/devops_cli/commands/telemetry.py","start_line":374,"end_line":400})
    27. search_code({"text":"def plan("})
    28. search_code({"text":"\"unset\""})
    29. file_symbols({"path":"src/devops_cli/commands/tf.py"})
    30. read_file({"end_line":198,"path":"src/devops_cli/commands/tf.py","start_line":159})
    31. search_code({"text":"CONST_HELP_OPTION_NAMES = "})
    32. file_symbols({"path":"src/devops_cli/commands/vault.py"})
    33. read_file({"end_line":205,"path":"src/devops_cli/commands/vault.py","start_line":136})
    34. list_files({"directory":"tests/invariants"})
    35. search_code({"text":"RunRefusal"})
    36. search_code({"text":"check_command"})
    37. search_code({"text":"ci docs"})
    38. read_issue({"number":3218})
    39. find_issues({"terms":"allow-list run tool"})
    40. list_files({"directory":"openspec/changes"})
    41. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":1,"end_line":200})
    42. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":1,"end_line":80})
    43. list_files({"directory":"src/devops_cli/roadmap/stage"})
    44. list_files({"directory":"tests/roadmap/stage"})
    45. search_code({"text":"(\"gh\", \"labels\", \"list\")"})
    46. search_code({"text":"(\"telemetry\", \"profile\")"})
    47. search_code({"text":"(\"ai\", \"read\")"})
    48. search_code({"text":"CONST_MCP_EXPOSURE_TABLE"})
    49. search_code({"text":"(\"tf\", \"plan\")"})
    50. search_code({"text":"(\"valkey\", \"flush\")"})
    51. search_code({"text":"(\"ai\", \"benchmark\")"})
    52. search_code({"text":"def resolve_click_command"})
    53. search_code({"text":"def labels_list"})
    54. search_code({"text":"target_path: Annotated[Path"})
    55. search_code({"text":"directory: Annotated[Path"})
    56. search_code({"text":"@app.command(\"unset\")"})
    57. file_symbols({"path":"src/devops_cli/commands/tf.py"})
    58. search_code({"text":"labels"})
    59. file_symbols({"path":"src/devops_cli/commands/gh.py"})
    60. search_code({"text":"def ai_read"})
    61. read_file({"end_line":245,"path":"src/devops_cli/commands/gh.py","start_line":225})
    62. search_code({"text":"@app.command(\"read\")"})
    63. search_code({"text":"repo: Annotated[Path"})
    64. search_code({"text":"def read_command"})
    65. search_code({"text":"command(\"read\")"})
    66. search_code({"text":"target_path"})
    67. read_file({"end_line":1945,"path":"src/devops_cli/commands/ai.py","start_line":1895})
    68. read_file({"end_line":300,"path":"src/devops_cli/config/constants.py","start_line":282})
    69. read_file({"end_line":435,"path":"src/devops_cli/config/constants.py","start_line":306})
    70. read_file({"end_line":265,"path":"src/devops_cli/ai/mcp/generator.py","start_line":183})
    71. search_code({"text":"def _introspect_command_parameters"})
    72. search_code({"text":"trace_id: Annotated"})
    73. search_code({"text":"stage_tools"})
    74. search_code({"text":"\"benchmark\""})
    75. read_file({"end_line":400,"path":"src/devops_cli/commands/telemetry.py","start_line":372})
    76. search_code({"text":"\"--output\""})
    77. read_spec({"capability":"roadmap-stage"})
    78. read_file({"end_line":165,"path":"src/devops_cli/commands/benchmark.py","start_line":148})
    79. read_file({"end_line":330,"path":"src/devops_cli/commands/config.py","start_line":310})
    80. read_file({"end_line":14,"path":"docs/roadmap/package-layout.md","start_line":1})
    81. list_files({"directory":"src/devops_cli/roadmap/stage"})
    82. list_files({"directory":"tests/roadmap/stage"})
    83. list_files({"directory":"docs/adr"})
    84. read_file({"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md"})
    85. read_file({"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md","start_line":50,"end_line":120})
    86. read_file({"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md","start_line":85,"end_line":160})
    87. search_code({"text":"(\"vault\", \"get\")"})
    88. search_code({"text":"(\"vault\", \"get\"),"})
    89. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":175,"end_line":200})
    90. search_code({"text":"def vault_get"})
    91. read_file({"end_line":180,"path":"src/devops_cli/commands/vault.py","start_line":120})
    92. read_file({"end_line":260,"path":"src/devops_cli/commands/gh.py","start_line":215})
    93. read_file({"end_line":345,"path":"src/devops_cli/config/constants.py","start_line":280})
    94. read_file({"end_line":1955,"path":"src/devops_cli/commands/ai.py","start_line":1895})
    95. read_file({"end_line":420,"path":"src/devops_cli/commands/telemetry.py","start_line":370})
    96. read_file({"end_line":170,"path":"src/devops_cli/commands/benchmark.py","start_line":150})
    97. read_file({"end_line":340,"path":"src/devops_cli/commands/config.py","start_line":310})
    98. search_code({"text":"(\"valkey\", \"flush\"),"})
    99. read_spec({"capability":"roadmap-stage"})
    100. read_file({"end_line":95,"path":"src/devops_cli/ai/mcp/generator.py","start_line":60})
    101. search_code({"text":"allow-list"})
    102. search_code({"text":"allowlist"})
    103. search_code({"text":"_introspect_command_parameters"})
    104. file_symbols({"path":"src/devops_cli/ai/mcp/generator.py"})
    105. read_file({"end_line":325,"path":"src/devops_cli/ai/mcp/generator.py","start_line":284})
    106. search_code({"text":"def ci_test"})
    107. search_code({"text":"ci docs"})
    108. search_code({"text":"@app.command(\"test\")"})
    109. search_code({"text":"def test_cmd"})
    110. search_code({"text":"\"test\""})
    111. search_code({"text":"\"ci\": ("})
    112. search_code({"text":"def ci_test_command"})
    113. file_symbols({"path":"src/devops_cli/commands/ci.py"})
    114. read_file({"end_line":1920,"path":"src/devops_cli/commands/ci.py","start_line":1860})
    115. search_code({"text":"package-layout"})
    116. read_spec({"capability":"roadmap-package-layout"})
    117. read_file({"end_line":215,"path":"src/devops_cli/commands/vault.py","start_line":174})
    118. read_spec({"capability":"roadmap-stage","requirement":"Criteria mapping in the stage reply"})
    119. read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})
    120. search_code({"text":"read_only"})
    121. read_file({"path":"src/devops_cli/ai/mcp/roles.py"})
    122. read_file({"end_line":222,"path":"src/devops_cli/ai/mcp/generator.py","start_line":192})
    123. read_file({"end_line":440,"path":"src/devops_cli/config/constants.py","start_line":415})
    124. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":150,"end_line":330})
    125. search_code({"text":"TyperPath"})
    126. list_files({"directory":""})
    127. read_issue({"number":3242})
    128. find_issues({"terms":"allow-list planner run tool"})
    129. read_spec({"capability":"roadmap-stage","requirement":"The planner has a read-only toolbox"})
    130. read_spec({"capability":"roadmap-stage","requirement":"A document task starts with the Edit verb"})
    131. read_spec({"capability":"roadmap-stage","requirement":"The documentation field starts with an imperative verb"})
    132. file_symbols({"path":"src/devops_cli/ai/mcp/path_confinement.py"})
    133. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py","start_line":1,"end_line":80})
    134. file_symbols({"path":"src/devops_cli/roadmap/implement/implement_shell_policy.py"})
    135. read_file({"end_line":60,"path":"src/devops_cli/roadmap/implement/implement_shell_policy.py","start_line":1})
    136. read_file({"end_line":250,"path":"src/devops_cli/roadmap/implement/implement_shell_policy.py","start_line":140})
    137. search_code({"text":"CONST_MCP_EXPOSURE_TABLE"})
    138. search_code({"text":"package_layout"})
    139. search_code({"text":"package-layout.md"})
    140. read_spec({"capability":"roadmap-stage","requirement":"A verify command has the project form"})
    141. read_file({"end_line":80,"path":"docs/TESTING.md","start_line":50})
    142. read_file({"path":"src/devops_cli/roadmap/stage/stage_commands.py","start_line":1,"end_line":60})
    143. search_code({"text":"(\"scan\", \"sast\")"})
    144. search_code({"text":"_TEXT_PATH_OPTIONS"})
    145. search_code({"text":"\"sast\""})
    146. read_file({"path":"src/devops_cli/commands/scan.py","start_line":360,"end_line":430})
    147. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":20,"end_line":200})
    148. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":200,"end_line":330})
    149. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":1,"end_line":130})
    150. search_code({"text":"scan_sast"})
    151. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":240,"end_line":300})
    152. read_file({"path":"docs/MCP_TOOLS.md","start_line":2122,"end_line":2175})
    153. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":130,"end_line":240})
    154. search_code({"text":"_PATH_PARAM_KEYWORDS"})
    155. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py"})
    156. search_code({"text":"(\"k8s\", \"lint\")"})
    157. search_code({"text":"(\"scan\", \"sbom\")"})
    158. search_code({"text":"command(\"lint\")"})
    159. search_code({"text":"command(\"sbom\")"})
    160. search_code({"text":"def k8s_lint("})
    161. read_file({"path":"src/devops_cli/commands/scan.py","start_line":492,"end_line":525})
    162. read_file({"path":"src/devops_cli/commands/k8s/security_audit.py","start_line":100,"end_line":160})
    163. search_code({"text":"(\"k8s\", \"diff-helm\")"})
    164. search_code({"text":"(\"tls\", \"inspect\")"})
    165. search_code({"text":"def k8s_diff_helm("})
    166. search_code({"text":"diff-helm"})
    167. search_code({"text":"def diff_helm_cmd("})
    168. read_file({"path":"src/devops_cli/commands/k8s/diagnostics.py","start_line":185,"end_line":225})
    169. search_code({"text":"(\"review\", \"stats\")"})
    170. search_code({"text":"(\"repos\", \"list\")"})
    171. search_code({"text":"(\"branches\", \"list\")"})
    172. search_code({"text":"(\"ai\", \"ingest\", \"query-library\")"})
    173. search_code({"text":"def repos_list("})
    174. search_code({"text":"def review_stats("})
    175. read_file({"path":"src/devops_cli/commands/review.py","start_line":1455,"end_line":1485})
    176. search_code({"text":"base_dir: Annotated["})
    177. read_file({"path":"src/devops_cli/config/constants.py","start_line":425,"end_line":440})
    178. search_code({"text":"len(CONST_MCP_EXPOSURE_TABLE)"})
    179. list_files({"directory":"src/devops_cli/roadmap/stage"})
    180. list_files({"directory":"tests/roadmap/stage"})
    181. search_code({"text":"CONST_MCP_EXPOSURE_TABLE"})
    182. read_spec({"capability":"roadmap-stage"})
    183. search_code({"text":"allow-list"})
    184. search_code({"text":"(\"gh\", \"labels\", \"list\")"})
    185. search_code({"text":"(\"vault\", \"sync\")"})
    186. search_code({"text":"ci docs"})
    187. search_code({"text":"CONST_MCP_EXPOSURE_TABLE:"})
    188. read_file({"path":"src/devops_cli/config/constants.py","start_line":300,"end_line":360})
    189. read_file({"path":"src/devops_cli/config/constants.py","start_line":360,"end_line":440})
    190. read_file({"path":"src/devops_cli/config/constants.py","start_line":280,"end_line":300})
    191. read_file({"end_line":200,"path":"src/devops_cli/ai/mcp/generator.py","start_line":160})
    192. read_file({"end_line":255,"path":"tests/ai/mcp/test_path_confinement.py","start_line":235})
    193. read_spec({"capability":"roadmap-stage","requirement":"The planner has a read-only toolbox"})
    194. read_spec({"capability":"roadmap-stage","requirement":"A new test module sits in a mirror directory"})
    195. search_code({"text":"def read("})
    196. search_code({"text":"(\"labels\", \"list\")"})
    197. search_code({"text":"def plan("})
    198. search_code({"text":"def benchmark("})
    199. search_code({"text":"target_path"})
    200. search_code({"text":"\"labels\""})
    201. list_files({"directory":"src/devops_cli/commands"})
    202. read_file({"end_line":1945,"path":"src/devops_cli/commands/ai.py","start_line":1898})
    203. read_file({"end_line":240,"path":"src/devops_cli/commands/gh.py","start_line":136})
    204. search_code({"text":"directory"})
    205. search_code({"text":"def tf_plan"})
    206. file_symbols({"path":"src/devops_cli/commands/tf.py"})
    207. search_code({"text":"(\"ai\", \"benchmark\")"})
    208. read_file({"end_line":198,"path":"src/devops_cli/commands/tf.py","start_line":159})
    209. search_code({"text":"output"})
    210. file_symbols({"path":"src/devops_cli/commands/benchmark.py"})
    211. search_code({"text":"\"--output\""})
    212. search_code({"text":"allowlist"})
    213. search_code({"text":"build_allowlist"})
    214. read_file({"path":"src/devops_cli/roadmap/stage/stage_tools.py","start_line":1,"end_line":60})
    215. read_file({"end_line":305,"path":"src/devops_cli/ai/mcp/generator.py","start_line":286})
    216. read_file({"end_line":112,"path":"tests/ai/mcp/test_path_confinement.py","start_line":98})
    217. search_code({"text":"test_all_registered_subcommands_have_help"})
    218. list_files({"directory":"docs/adr"})
    219. read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})
    220. read_spec({"capability":"roadmap-stage","requirement":"Criteria mapping in the stage reply"})
    221. read_spec({"capability":"roadmap-stage","requirement":"A verify command has the project form"})
    222. read_file({"end_line":40,"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md","start_line":1})
    223. read_file({"end_line":120,"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md","start_line":95})
    224. search_code({"text":"exposure table"})
    225. search_code({"text":"check_command"})
    226. search_code({"text":"package-layout"})
    227. search_code({"text":"test_source_tree"})
    228. read_spec({"capability":"roadmap-package-layout"})
    229. search_code({"text":"roadmap/package-layout.md"})
    230. read_issue({"number":3242})
    231. find_issues({"terms":"allow-list run tool"})
    232. read_file({"end_line":395,"path":"src/devops_cli/commands/scan.py","start_line":368})
    233. read_file({"end_line":25,"path":"tests/ai/mcp/test_path_confinement.py","start_line":1})
    234. search_code({"text":"private"})
    235. search_code({"text":"ai.mcp"})
    236. search_code({"text":"def get("})
    237. read_file({"path":"src/devops_cli/commands/vault.py","start_line":1,"end_line":120})
    238. search_code({"text":"vault get"})
    239. search_code({"text":"def vault_get"})
    240. read_file({"path":"src/devops_cli/config/constants.py","start_line":280,"end_line":440})
    241. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":1,"end_line":120})
    242. read_file({"end_line":440,"path":"src/devops_cli/config/constants.py","start_line":421})
    243. read_file({"end_line":330,"path":"src/devops_cli/ai/mcp/generator.py","start_line":121})
    244. read_spec({})
    245. read_file({"path":"src/devops_cli/config/constants.py","start_line":280,"end_line":440})
    246. list_files({"directory":"src/devops_cli/roadmap/stage"})
    247. list_files({"directory":"tests/roadmap/stage"})
    248. read_spec({"capability":"roadmap-stage"})
    249. read_file({"path":"src/devops_cli/config/constants.py","start_line":421,"end_line":440})
    250. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":170,"end_line":210})
    251. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":280,"end_line":310})
    252. read_spec({"capability":"roadmap-stage","requirement":"A verify command has the project form"})
    253. read_spec({"capability":"roadmap-stage","requirement":"The planner has a read-only toolbox"})
    254. search_code({"text":"allow-list"})
    255. search_code({"text":"allowlist"})
    256. search_code({"text":"def test("})
    257. search_code({"text":"ci docs"})
    258. search_code({"text":"package-layout"})
    259. read_file({"path":"src/devops_cli/commands/ci.py","start_line":1866,"end_line":1930})
    260. read_spec({"capability":"roadmap-package-layout"})
    261. search_code({"text":"package_layout"})
    262. search_code({"text":"def _resolve_test_targets"})
    263. search_code({"text":"package-layout.md"})
    264. search_code({"text":"def docs("})
    265. read_file({"path":"src/devops_cli/commands/ci.py","start_line":1759,"end_line":1830})
    266. read_file({"path":"src/devops_cli/commands/ci.py","start_line":2130,"end_line":2200})
    267. search_code({"text":"labels"})
    268. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py","start_line":55,"end_line":70})
    269. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":95,"end_line":115})
    270. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":235,"end_line":255})
    271. search_code({"text":"labels_list"})
    272. read_file({"path":"tests/ai/mcp/test_path_confinement.py","start_line":34,"end_line":44})
    273. search_code({"text":"_PATH_PARAM_KEYWORDS"})
    274. search_code({"text":"def read("})
    275. read_file({"path":"src/devops_cli/commands/scan.py","start_line":360,"end_line":390})
    276. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py","start_line":14,"end_line":30})
    277. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py","start_line":88,"end_line":100})
    278. search_code({"text":"name=\"read\""})
    279. search_code({"text":"def read_command"})
    280. search_code({"text":"@app.command(\"read\")"})
    281. search_code({"text":"def labels_list("})
    282. search_code({"text":"list_labels"})
    283. search_code({"text":"ai_read"})
    284. list_files({"directory":"src/devops_cli/commands"})
    285. read_file({"path":"src/devops_cli/commands/gh.py","start_line":225,"end_line":265})
    286. search_code({"text":"\"read\""})
    287. search_code({"text":"def inspect"})
    288. read_file({"path":"src/devops_cli/commands/ai.py","start_line":1895,"end_line":1960})
    289. search_code({"text":"def plan("})
    290. search_code({"text":"def plan_cmd"})
    291. search_code({"text":"def tf_plan"})
    292. search_code({"text":"@app.command(\"plan\")"})
    293. read_file({"path":"src/devops_cli/commands/tf.py","start_line":157,"end_line":200})
    294. read_file({"path":"src/devops_cli/ai/mcp/generator.py","start_line":30,"end_line":60})
    295. search_code({"text":"def get("})
    296. search_code({"text":"@app.command(\"get\")"})
    297. search_code({"text":"def vault_get"})
    298. read_file({"path":"src/devops_cli/commands/vault.py","start_line":130,"end_line":175})
    299. read_file({"path":"src/devops_cli/commands/telemetry.py","start_line":1,"end_line":20})
    300. read_file({"path":"docs/adr/0018-a-sandboxed-read-only-run-tool-for-the-planner.md","start_line":1,"end_line":130})
    301. read_file({"path":"src/devops_cli/ai/mcp/path_confinement.py","start_line":100,"end_line":180})
    302. search_code({"text":"stage_request"})
    303. search_code({"text":"stage_tools"})

    Tool calls: file_symbols=12 (empty=0), find_issues=3 (empty=0), list_files=16 (empty=0), read_file=103 (empty=0), read_issue=4 (empty=0), read_spec=23 (empty=0), search_code=142 (empty=20)

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  10. added a commit that references this issue on Nov 10, 2026
  11. 17 remaining items

  12. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at group 1 by the rule retry: a person commented implement: retry. The item is Planned again, and the Service takes it in the next round.

  13. added
    owner/service
    status/in-progress
    and removed
    status/planned
    on Nov 10, 2026
  14. added
    status/in-review
    and removed
    status/in-progress
    on Nov 10, 2026
  15. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Pull request #4378 is ready for review. The checks passed.

    Spend: 95 model requests, 8304022 input tokens, 44441 output tokens.

  16. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261110-145932-273d ended: succeeded.
    Image digest: sha256:b76fd2adaee82311d01b551ad1d82a0873b7226df7956a98c217d69015be28eb

    The last lines of its log:

    # Implement plan for dan-petty/devops-cli
    
    ## To implement
    - #4004 feat(roadmap): allow-list builder for planner read-only commands: branch `feat/4004-allow-list-builder-for-planner-read`, pull request #4378
    Tool call: read_file, ok.
    Tool call: read_file, ok.
    Tool call: grep, ok.
    Tool call: list_files, ok.
    Tool call: grep, ok.
    Tool call: edit_file, ok.
    Tool call: shell, started: uv run devops ci docs
    Tool call: shell, program uv, ok.
    Tool call: edit_file, ok.
    Tool call: shell, started: git diff --stat
    Tool call: shell, started: uv run devops openspec check
    Tool call: shell, program git, ok.
    Tool call: shell, program uv, ok.
    Tool call: shell, started: git diff --stat
    Tool call: shell, program git, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: git status --short
    Tool call: shell, program git, ok.
    Tool call: read_file, ok.
    Tool call: grep, ok.
    Tool call: shell, started: git log --oneline -3 | cat
    Tool call: shell, program git, refused.
    Tool call: shell, started: git log --oneline -3
    Tool call: shell, program git, ok.
    Tool call: shell, started: git show --stat HEAD
    Tool call: shell, program git, ok.
    ✓ Took 1 item(s) to a ready pull request, stopped 0.
    Elapsed: 10m 32s
    
  17. removed
    owner/service
    on Nov 10, 2026
  18. removed
    status/in-review
    on Nov 10, 2026
  19. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-10 16:07 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/roadmapsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions