Skip to content

docs(openspec): plan #2600 record keep-port decision - #3070

Merged
dan-petty merged 4 commits into
mainfrom
refactor/2600-devops-scan-complexity-and-the-inspection
Nov 1, 2026
Merged

dan-petty merged 4 commits into
mainfrom
refactor/2600-devops-scan-complexity-and-the-inspection

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2600

This change records the decision to keep the hand-written McCabe port in core/code_metrics.py as the single source of complexity for devops scan complexity and the inspection hotspots. Ruff is a dev dependency only, and its JSON output has no structured field for the complexity number. The port is 90 lines of pure Python, tested to match Ruff's C901 on 12 samples. No code change is made. The existing test holds the match.

Change: openspec/changes/2600-devops-scan-complexity-and-the-inspection/

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 1, 2026 13:58
… checks

The plan named a test path that does not exist and claimed a failing base for a docstring change. It now cites command evidence, maps each acceptance criterion, and drops the spec delta and the stale follow-up section.
The test holds 12 figures taken from Ruff. It does not run Ruff. The plan now says so.
@dan-petty

Copy link
Copy Markdown
Owner

Advisory pre-merge review (automated; a person decides).

Recommendation: merge. I found no defect in this plan.

Findings: none.

What I checked (head 92ecf58):

  • Paths. All cited paths exist at origin/main 0dbd092: src/devops_cli/core/code_metrics.py, tests/core/test_code_metrics.py, tests/core/test_scan_complexity.py, tests/ai/test_ai_inspection.py, tests/security/test_review_ruff_mypy_evidence.py. The measure_tree imports at ai/inspection.py:28 and security/complexity.py:15 are correct. The proposal fixes the old issue path tests/test_code_metrics.py.
  • Premise. A script on pyproject.toml printed [] ['ruff==0.16.8']. ruff check --select C901 --config 'lint.mccabe.max-complexity=0' --output-format json gave the 11 keys in the proposal. The module has 119 lines (89 code). The test has 12 parameters from 11 sample sources. git log shows only test(cli): tests mirror package directories and trim root conftest #2830, ci(lint): Ruff PLR1702 caps nesting at 4 blocks and replaces the hook #2602 and docs(agents): AGENTS.md routes each task to the document that owns it, and no agent prompt or instruction carries the legacy process #1975. No other open change names code_metrics.
  • Scope. The PR makes no code change. The plan edits one docstring. The first acceptance criterion maps to group 1. The second is marked "does not apply" because the port stays. This is correct.
  • Test rule. No behavior changes, so no new failing test is needed. The verify steps are repeatable commands. I ran the four-file test command: 49 tests passed.
  • Order. The archive group is last.
  • Spec deltas. .openspec.yaml sets skip_specs: true. openspec validate --strict says the change is valid. uv run devops openspec check passed.
  • Verify commands use uv run devops ci test <path>, not bare pytest.
  • PR hygiene. The body starts with "Plans refactor(ci): record keep-port decision #2600" and has no closing keyword. The title is a Conventional Commit.

Nit (no action needed): the PR body says "90 lines" and the proposal says 89 lines of code. The issue says "about 90".

@dan-petty
dan-petty merged commit de52216 into main Nov 1, 2026
19 checks passed
@dan-petty
dan-petty deleted the refactor/2600-devops-scan-complexity-and-the-inspection branch November 1, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant