Skip to content

Stop a test from standing in for the real program - #1322

Merged
mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/reflect/same-repro-20261010/block-test-runner-pass-stands-real-cmd--161a67e5
Oct 11, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/reflect/same-repro-20261010/block-test-runner-pass-stands-real-cmd--161a67e5

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

A checker can stop a reply that uses a test as proof the real program works.

The written rule already said to rerun the check that failed. A later test could still stand in for the program a person runs.

The checker now reads the commands from the session. After that program has run and files have changed, the same program and action must run again.

Review Claim

A test cannot stand in for the real program that already showed the behavior.

Review Lane

behavior

Review Unit

engine-runtime

Safety Invariant

The gate blocks only when a product command already ran, a file was edited after it, and a test runner then ran without that same program and subcommand. An unreadable transcript does not block. A session that never ran a product command does not block.

Confirmed by the user on 2026-10-10.

Slice Rationale

This slice is the checker only. The written skill page that points at it stays out, so the review stays on one unit.

Non-goals

Does not install the checker into a running editor. Does not change the written skill page. Does not change the app people run.

Architecture

Before

graph TD
    A["reply ends"] --> B["ship claim check"]
    B --> C["allow or block that claim"]
Loading

After

graph TD
    A["reply ends"] --> B["ship claim check"]
    B --> C["same command check"]
    C --> D["allow or block"]
Loading

Measured

Command: CATSTACK_HOOK_TEST_MODEL=gpt-5.6-sol python3 -m unittest discover -s engine/hooks/prove-it-ship-gate/tests -k TestSameRepro -q

  • base: git grep -c TestSameRepro origin/main -- engine/hooks/prove-it-ship-gate/tests/test_hooks.py exited 1 and printed nothing
  • head: Ran 7 tests in 0.006s then OK, exit 0

Command: replay the session up to the test-runner turn, then same_repro_gap

  • base: the check is absent on main
  • head: ['invoker-cli --help', 'invoker-cli --version', 'invoker-cli doctor', 'invoker-cli query']

Test Plan

Test Plan
  • python3 scripts/ci/check_hook_test_coverage.py engine/hooks/prove-it-ship-gate — check_hook_test_coverage: OK (1 hook(s) checked)
  • ruff check --select E9,F engine/hooks/prove-it-ship-gate/cursor_stop_check.py engine/hooks/prove-it-ship-gate/detect.py engine/hooks/prove-it-ship-gate/tests/test_hooks.py — All checks passed!
  • CATSTACK_HOOK_TEST_MODEL=gpt-5.6-sol python3 -m unittest discover -s engine/hooks/prove-it-ship-gate/tests -q — Ran 38 tests in 0.504s then OK
  • Not run: installing the checker into the live editor. Blocker: that changes every later Cursor stop until this pull request is merged and the installer is run

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert 3199d8af
  • Post-revert steps: None
  • Data migration? No

The proof gate checked ship claims, not whether the program that showed the failure was the program that showed the fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Change-Id: I161a67e5cce7fea332ca43c4eddfb5ba0ce308c8
@cursor

cursor Bot commented Oct 11, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 7cde26fb-cce2-4071-a41a-92544739bcad)

@EdbertChan EdbertChan changed the title Block a test-runner pass that stands in for the real command. Stop a test from standing in for the real program Oct 11, 2026
@EdbertChan

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 Stop a test from standing in for the real program #1322 👈
2 Stop the same proof miss in Claude, Cursor, and Codex. #1323

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 50 seconds in the queue, including 1 hour 31 seconds running CI.

Required conditions to merge
  • check-success = lint
  • check-success = test
  • check-success = validate

@mergify mergify Bot added the queued label Oct 11, 2026
@mergify mergify Bot mentioned this pull request Oct 11, 2026
6 tasks done
@mergify
mergify Bot merged commit 0d8f2e0 into main Oct 11, 2026
8 checks passed
@mergify mergify Bot removed the queued label Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant