Skip to content

merge queue: checking #309 on main (bcfc509) - #342

Closed
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/c7108d88e4
Closed

merge queue: checking #309 on main (bcfc509)#342
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/c7108d88e4

Conversation

@mergify

@mergify mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request has been checked successfully and will be merged soon. 🎉

#309 is queued for merge on branch main (bcfc509).

This pull request has been created by Mergify to check the mergeability of #309.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule admin-bypass for merge:

  • check-success = lint
  • check-success = test

Required conditions to stay in the queue:

---
checking_base_sha: bcfc509f417683842bfbdda92951d46debd4d058
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 309
    scopes: []
scopes: []
...

edbert-bot and others added 3 commits September 9, 2026 22:20
…rage pass

## Context
- Two defects, both found by the same incident this session. A claim went out
  ("PR #303: full preflight green") that was never actually checked, and the
  guard that exists to catch that class stayed silent.
- Defect 1, the vacuous pass: preflight.py ran
  check_skill_test_coverage.py with no refs, while `base` was already in scope
  two lines above (used for check_no_dated_provenance). With no refs the gate
  defaults to origin/main, so for a stacked slice it compares the whole stack
  instead of the slice and can print "ok" for a slice it never looked at.
  That is how "full preflight green" was reported for a slice that had
  changed preflight.py with no colocated test.
- Defect 2, the missed admission: wrong-check-reflect exists precisely to fire
  on "a prior check was wrong" and inject /reflect. It stayed silent on
  "Also: a claim I made earlier was wrong." The user had to play the hook's
  role by hand.

## Considerations
- Defect 1 is fixed categorically, not by a rule asking anyone to remember the
  flags: preflight now passes --base <slice base> --head HEAD, so the wider
  default is unreachable from the gate runner. Tier 1 of
  reflect/references/lenses.md's fix hierarchy rather than tier 4.
- Defect 2's root cause is the detector's shape, not a missing phrase.
  ADMISSION_RES enumerates eight sentences someone actually wrote, which
  guarantees it lags the ninth -- exactly what
  principle-assert-invariants-not-last-bug warns about. Adding
  "a claim I made was wrong" as pattern nine would repeat the mistake.
- So the fix matches the SHAPE of a retraction: a first-person marker, a
  reference to something already stated, and a wrongness word, within one
  ~260-char window (a retraction often spans two sentences). The enumerated
  list is kept -- it costs nothing and documents real phrasings -- with the
  structural check as the fallback.
- NEGATIVE_RES still runs first, so hypotheticals ("if my earlier check was
  wrong") and product blame ("the test was wrong") cannot reach the window.
- Deliberately NOT attempted here: enumerating every way a model can admit
  fault. That is not enumerable. The judgment half is the next slice, which
  makes principle-flag-your-own-corrections auto-fire.

## Blast Radius
- wrong-check-reflect now fires on more shapes, so false positives are the
  risk. Guarded by four new negative tests plus the 12 pre-existing ones; the
  whole 36-test suite was re-run unchanged before adding any.
- preflight reports failures it previously hid. Expect previously "green"
  stacked slices to surface real gaps -- that is the point.
- Modified: engine/hooks/wrong-check-reflect/{detect.py,tests/test_hooks.py},
  engine/skills/make-pr/scripts/preflight.py.
- Revertable with git revert.

## Verification
- Structural layer, 9 cases, 0 mismatches, including the 4 real misses and 4
  shapes that must stay silent (present-tense product opinion, no
  prior-statement marker, hypothetical, unrelated bug report).
- python3 -m unittest discover -s engine/hooks/wrong-check-reflect/tests
  -> Ran 36 tests, OK (before adding new tests: no regression)
  -> Ran 43 tests, OK (after)
- python3 scripts/check_hook_test_coverage.py engine/hooks/wrong-check-reflect
  -> check_hook_test_coverage: OK (1 hook(s) checked)
- Vacuous-pass divergence, same tree, one skill touched with no test change:
    check_skill_test_coverage.py (no refs)                 -> ok
    check_skill_test_coverage.py --base <slice> --head HEAD -> fail
  The second is what preflight now runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQMWSLRArEfEm1psa7RKdD
Two gates were red on this branch. check_ecosystem_boundaries.py rejects
any engine/ Python that names a corpus/skills or product/skills path, and
wrong-check-reflect/detect.py cited two principle skills by full path.
check_no_new_comments.py rejected four more comment lines here and in
make-pr/scripts/preflight.py.

Both fixes are the same move: the prose goes into the module or function
docstring, which both gates exempt, and the principle names lose their
corpus/skills/ prefix. No behavior changes.

The ecosystem failure was invisible from a worktree under .worktrees/ --
that gate skips those paths and prints ok having read no files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013mDsvDgGuwaBuyRtYgvktd
@mergify mergify Bot closed this Sep 10, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/c7108d88e4 branch September 10, 2026 05: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