Skip to content

docs(openspec): plan #5451 Each ci check row subcommand - #5587

Merged
dan-petty merged 2 commits into
mainfrom
feat/5451-each-check-row-is-a-devops
Nov 14, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/5451-each-check-row-is-a-devops

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #5451

Ten of the 25 rows of devops ci have no subcommand, so agents and the implement runner type ci openspec, ci test-tree and ci --list, and some write a script. This change registers one subcommand for each row from a static tuple, so the import time of the startup-imports row stays flat, and a test keeps the tuple equal to the registry. --only and --skip keep the comma form of the pre-push hooks and gain one callback: a wrong row name is a usage error with up to 3 close names, and the ledger records it. Their help lists the rows. devops ci run is removed and every document that named it is regenerated or edited. The gate-slot metric description holds no removed command. The implement prompt table gains ci constructs, ci docs and ci openspec.

Change: openspec/changes/5451-each-check-row-is-a-devops/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 14, 2026
@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 14, 2026 01:35
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (shepherd, 2026-11-14). Verdict: needs fix. Each point below blocks a correct build.

  1. tests/commands/test_ci.py is not in the Changes list of group 2 or group 3, and the change breaks 4 of its tests. A scratch edit in a detached worktree removed the run command and added a BadParameter callback on --only and --skip. These tests then failed: test_ci_additional_subcommands (line 547, runner.invoke(app, ['run', '--fix'])), test_ci_helpers_and_edge_cases (line 578, ['run', '--no-fix']), test_ci_run_docs_fix_when_needed (line 637, ['run', '--fix']), and test_ci_cli_runner_only_and_skip_validation (lines 2207-2220, which asserts the old text "Invalid check name(s): 'invalid_gate'" through the CLI). The design says that the implement job cannot edit a test file that the plan leaves out. Add tests/commands/test_ci.py to the Changes of group 2 and group 3, and name these 4 tests.
  2. Task 1.2 does not run the generated row command on the same path as the narrowed group run, so the spec requirement 'runs the same path as devops ci --only ' fails. all_checks (ci.py, near line 1625 on main) wraps the run in _until_stopped, maps asyncio.CancelledError to typer.Exit(CONST_EXIT_CANCELLED), calls _warn_when_over_budget, and calls _handle_ci_results(save_cache=False), which clears the CI cache on a failure. Task 1.2 names only _gate_slot, _run_all_checks_async, the print of the failures and the summary, and exit 1. The row checks start their processes with start_new_session=True through run_subprocess_async. Without _until_stopped, a SIGTERM from a supervisor stops only the Python process and leaves the check processes running (the defect of fix(ci): a test that hangs fails at a per-test timeout, so devops ci never stalls on a stuck child process #1669 and feat(ci): devops ci ends each row at a time limit #4775). Group 6 gives 'ci constructs' to the implement agent, whose shell stops a command at a deadline. Fix: move the narrowed body of all_checks into one helper and call it from all_checks and from each generated command.
  3. Group 7 adds the pytest case test_no_other_file_names_the_removed_command, which starts a real 'git grep' over the tracked files. docs/TESTING.md line 71 says 'A test of src/ starts no system program', and line 72 says 'A check of committed files or of tool configuration is a row of devops ci, not a pytest test'. test(roadmap): Move the golden base commit check to a ci row #5575 (merged to main today, closes test(roadmap): check golden base commits in a devops ci row #4449) moved a test that started git to a ci row for this reason. The hermetic floor allows git, so the case would run, but it breaks the written rule. Fix: remove the case. Put the negative search '! git grep -n -I -F -w 'devops ci run' -- README.md docs/ src/ tests/' in a verification line. The step allows this form, and the options nIFw are all permitted. devops docs check already refuses an unresolved devops command line in hand-written and prompt documents (check_documented_argv), and the source argv collector covers argv lists in src/.
  4. No task writes a test for the acceptance criterion 'A test runs devops ci --only constructs,openspec --dry-run and proves that both rows run'. The Criteria section maps this criterion to group 2, but task 2.1 names only the misspelled --only and --skip cases and the help case. The spec scenarios 'A comma-separated list of two rows', 'A repeated option' (--only constructs --only openspec) and 'A row with a hand-written command' (lint --dry-run) also have no test case in any task. Add these cases to tasks 1.1 and 2.1.

Paths that the change must touch and that the plan does not name: tests/commands/test_ci.py

Points that do not block:

  • The row count is out of date. test(roadmap): Move the golden base commit check to a ci row #5575 merged to main after the plan (d374026) and added the row roadmap-stage-eval-commits. get_check_specs() on origin/main 130e428 now has 26 rows, and 11 of them have no hand-written command. The plan's CHECK_ROW_NAMES tuple of 25 names, the count of 10 generated commands, and the text in the proposal, the design and task 1.2 are therefore out of date. The tuple test would catch the difference, and the Dependencies section expected it, but refresh the plan text. fix(ci): Size narrowed test workers by collected tests #5547 (ci.py and docs/commands/ci.md) also merged. The PR head 1fde68e is 9 commits behind origin/main, but GitHub reports mergeable_state clean.
  • The design still holds the false premise from the model review: 'Click calls a multiple=True callback once for each occurrence'. Click calls the callback once with the full tuple. The scratch callback in this vet got the whole list. The decision to return the value unchanged still works, but correct the reason.
  • In the issue comment of 2026-11-13, the owner asks to generate the prompt rows from CONST_ROADMAP_IMPLEMENT_SCOPED_ROWS and to resolve each row with resolve_devops_argv in a test. Task 6.2 writes 3 static LocalCommand entries, and no test makes sure that the ci rows of LOCAL_COMMANDS stay equal to the constant. Generate the entries, or add that equality test.
  • The premise holds on main. The run command exists (ci.py near line 2493). --only and --skip are group options with help text that names no row. resolve_selected_specs exits with typer.Exit(2). LOCAL_COMMANDS holds only 'ci test' of the ci rows. feat(cli): usage errors show a hint for known wrong commands #4860 is still open, so no 'ci ' hint rule needs removal. A scratch check proved that a BadParameter from the ci group option callback records kind bad_value with command path ci, and that 'ci run' (after removal) records kind unknown_command with command path ci.
  • Every --only and --skip value in the tracked files is a valid row name (for example lint,format,domain and actionlint,zizmor in .pre-commit-config.yaml, and constructs,docs,openspec). The new callback refuses none of them. 'ci --check --only types' in tests/roadmap/test_roadmap_failure.py is only fixture text.
  • Task 1.2 gives one closure for all generated commands, but it does not say how each command gets its own help text. The regenerated docs/commands/ci.md and docs/CLI_REFERENCE.md show that help text. Give each command a help string with its row name.
  • The knowledge base table src/devops_cli/ai/knowledge_base/devops_cli/cli_command_reference.md loses its run row, but it gets no rows for the new row commands. This is optional.
  • The model review points 1 to 3 about the gate-slot description are fixed. The new text 'Time a gate run waited for a free gate slot before its checks started' does not hold the substring 'devops ci run'.
  • Security and thresholds: no control is weakened and no threshold is lowered. The new LOCAL_COMMANDS rows are prompt text. uv was already a permitted shell program, so the shell policy does not change. The callback makes the selection stricter.
  • Prose: the vocabulary is mostly ASD-STE100, but many sentences are longer than the 20-word procedural limit and the 25-word descriptive limit. Examples are the 'What Changes' bullets of the proposal, task 1.2 and task 5.1. The Plan Check passed.

@dan-petty dan-petty added the verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix label Nov 14, 2026
@dan-petty
dan-petty force-pushed the feat/5451-each-check-row-is-a-devops branch from 1fde68e to d7f731a Compare November 14, 2026 13:43
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (2026-11-14). Verdict: ready.

Problems identified in the prior review have been resolved:

  1. tests/commands/test_ci.py is now added to Changes in Group 2 and Group 3, updating 4 existing test cases (test_ci_additional_subcommands, test_ci_helpers_and_edge_cases, test_ci_run_docs_fix_when_needed, and test_ci_cli_runner_only_and_skip_validation) to invoke subcommands with --fix/--no-fix instead of the removed run command and validating against the updated BadParameter message.
  2. Extracted _run_checks_lifecycle so that generated row commands share the exact cancellation, signal handling (_until_stopped), budget warning, and cache reset behavior as all_checks.
  3. Replaced the pytest git-grep test in Group 7 with a shell verification step (! git grep), adhering to docs/TESTING.md rules against pytest running system programs.
  4. Added explicit test cases in tasks 1.1 and 2.1 for comma-separated rows, repeated --only, and dry-run rows.
  5. Rebased cleanly onto origin/main.

Checks: plan-check passed, local pre-push checks passed.

@dan-petty dan-petty changed the title docs(openspec): plan #5451 Give every ci check row its own subcommand docs(openspec): plan #5451 Each ci check row own subcommand Nov 14, 2026
@dan-petty dan-petty changed the title docs(openspec): plan #5451 Each ci check row own subcommand docs(openspec): plan #5451 Each ci check row subcommand Nov 14, 2026
@dan-petty
dan-petty merged commit 2fadf16 into main Nov 14, 2026
23 of 26 checks passed
@dan-petty
dan-petty deleted the feat/5451-each-check-row-is-a-devops branch November 14, 2026 14:07
dan-petty added a commit that referenced this pull request Nov 14, 2026
Release pull request #5690 failed the `Static Analysis` quality gate
because of an OpenSpec requirement overlap (#5692). Both #3148 and #5451
rewrote the requirement "The prompt lists the local devops commands of
the catalog" in `roadmap-implement-step/inputs`. PR #5587 (for #5451)
and PR #5635 (for #3148) merged independently into `main` without
checking the overlap.

Closes #5692

Change:
`openspec/changes/archive/2026-11-14-5692-resolve-inputs-overlap/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant