Skip to content

docs(openspec): plan #2116 use PATH stand-ins for scanner tests - #2977

Merged
dan-petty merged 1 commit into
mainfrom
test/2116-the-scanner-executor-tests-find-the
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
test/2116-the-scanner-executor-tests-find-the

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2116

Replace the autouse fixture scanners_installed in tests/test_scanner_tool_executor.py. It currently patches shutil.which to make review scanners look installed. Since #1982, the shared scanner_fake fixture makes scanners findable by putting executable stand-ins on PATH and patches no shutil or subprocess name. This change applies the same mechanism to the fixture in this test file, so no test in the file patches a shutil or subprocess name. The existing tests pass unchanged.

Change: openspec/changes/2116-the-scanner-executor-tests-find-the/

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 10:15
@dan-petty
dan-petty self-requested a review as a code owner November 1, 2026 10:15
@dan-petty
dan-petty merged commit 5bd9462 into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the test/2116-the-scanner-executor-tests-find-the branch November 1, 2026 10:15
dan-petty added a commit that referenced this pull request Nov 1, 2026
This change corrects the plan for #2116 in place. The first plan, staged
in #2977, named a test path that is not on main. Its spec delta, its
meta-test and its verify commands were wrong.

The corrected plan names the real file,
tests/security/test_scanner_tool_executor.py. It replaces the
shutil.which patch with executable stand-in files on PATH, the same way
as scanner_fake. It drops the spec delta and sets skip_specs, because
the change touches only a test fixture. Its verify commands now run on
main.

The change touches only the plan folder. It changes no code and no test.

Plans #2116
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
…ot need

Tests for the two new refusals of check_proposal, the purpose and the
requirement names in the model input, and the replay of the plan of #2977.
They fail on the base.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
The stage job now refuses a plan that carries a spec delta its changed
paths do not need.

- `check_proposal` refuses `skip_specs: false` when every `changes` path
is under `tests/`, `.github/workflows/`, `docs/` or `openspec/`.
- It refuses an ADDED requirement whose name the base spec of that
capability already has.
- The model input lists each capability with its purpose and requirement
names.
- Both problem texts go back to the model through the existing one-time
retry.
- The recorded plan of #2977 is refused by the `paths` gate in the
replay.

Fail-to-pass against `origin/main`: the new refusal, input and replay
tests fail on the base.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Closes #3013

Change:
`openspec/changes/archive/2026-11-02-3013-the-stage-job-refuses-a-spec/`

---------

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
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