merge queue: checking #503 on main (814e208), stacked on #502 - #516
Closed
mergify[bot] wants to merge 19 commits into
Closed
merge queue: checking #503 on main (814e208), stacked on #502#516mergify[bot] wants to merge 19 commits into
mergify[bot] wants to merge 19 commits into
Conversation
…t-mode-default injects on every prompt when the flag is on, except a prompt containing a typed /cat-mode, and the regex classifier is gone. Review lane: behavior Safety invariant: With the flag on, every prompt gets cat-mode unless it already contains `/cat-mode`; with the flag off, no prompt gets it; nothing guesses meaning with regex. Effectiveness measurement: Entrypoint tests on six prompts with the flag on and off assert inject or silent for each. Slice rationale: A single hook's decision rule, reviewable alone. Architectural effect: cat-mode context reaches acknowledgement and short execution turns too; the Agent-tool companion is unchanged. Goal: Remove ACKS, WORK_VERBS, WORK_VERB_RE, MIN_WORK_LENGTH and is_work_prompt, and update the tests. Motivation: The regex skips execution turns like "yes do it". Alternative considerations: A background llm-judge was rejected because its verdict arrives on the next prompt; a blocking judge was rejected because the user's standing rule is never block on the judge. Implementation details: decide() returns the context whenever the flag is on, apart from a typed /cat-mode, which stays because a slash command is a fixed machine format. Non-goals: No change to the Agent-tool companion (agent_updated_input, mentions_cat_mode), flag resolution, or the injected text; no corpus/ skill edits. Layer: domain Feature state: active Files: - engine/hooks/cat-mode-default/detect.py - engine/hooks/cat-mode-default/tests/test_hooks.py - engine/hooks/cat-mode-default/tests/fixtures/ Change types: - engine/hooks/cat-mode-default/detect.py: modify - engine/hooks/cat-mode-default/tests/test_hooks.py: modify - engine/hooks/cat-mode-default/tests/fixtures/: modify Acceptance criteria: - `python3 -m unittest discover -s engine/hooks/cat-mode-default/tests -v` exits 0. - `python3 scripts/check_hook_test_coverage.py engine/hooks/cat-mode-default` exits 0. - `git grep -n -e is_work_prompt -e WORK_VERB -e MIN_WORK_LENGTH -- engine tests` prints nothing. Exit code: 0
…gine/hooks/cat-mode-default/README.md and the docs/ecosystem.md row say cat-mode applies on every prompt when the flag is on. Review lane: docs Safety invariant: Only the two Markdown files change; no code, test, or config file is edited. Effectiveness measurement: `git grep -n "work turns" -- docs engine/hooks/cat-mode-default` prints nothing after the change. Slice rationale: Prose in its own commit so the code commit stays one claim. Architectural effect: None; prose only. Goal: Replace the work-prompt wording with the every-prompt rule. Motivation: The README and ecosystem table would otherwise describe the old classifier. Alternative considerations: Code comments were rejected; the repo forbids new comments. Implementation details: Two Markdown edits. Non-goals: No code, test, or config edits; nothing under corpus/. Layer: docs Feature state: active Files: - engine/hooks/cat-mode-default/README.md - docs/ecosystem.md Change types: - engine/hooks/cat-mode-default/README.md: docs-only - docs/ecosystem.md: docs-only Acceptance criteria: - `git grep -n "work turns" -- docs engine/hooks/cat-mode-default` prints nothing. Exit code: 0 Invoker-Finalize-Id: 5442b6e5-293e-443f-84aa-52f0fe0d0135
…aim: The cat-mode-default tests, its coverage gate, and the repo suite pass, and no classifier symbol remains. Review lane: proof Safety invariant: Verification is read-only and does not alter any repository file. Effectiveness measurement: The commands are the direct measurement. Slice rationale: One focused proof before review. Architectural effect: None; verification only. Goal: Prove every-prompt injection and flag-off silence. Motivation: Running the tests is the proof. Alternative considerations: The full suite catches consumers of deleted symbols elsewhere. Implementation details: Run the coverage gate, the suite (which discovers the hook tests), and the grep. Non-goals: No mutations. Layer: app_regression Feature state: active Acceptance criteria: - Exits 0 only when all pass and the grep finds nothing. Exit code: 0 Invoker-Finalize-Id: fdb51ec8-9875-493c-8a43-052107f958b5
…0.t0.a-a2f65f86c-fed7e3c7
…No ephemeral inter-task handoff files remain in the worktree before the merge gate. Review lane: cleanup Safety invariant: The scrub script only checks for known handoff artifact names and never touches source, tests, or other repository files. Effectiveness measurement: The script exits non-zero if any handoff artifact remains. Slice rationale: Required terminal scrub for every implementation workflow. Architectural effect: None; hygiene only. Goal: Leave the branch free of handoff artifacts. Motivation: Handoff files must not reach the PR. Alternative considerations: Manual cleanup was rejected as non-deterministic. Implementation details: Run scripts/scrub-handoff-artifacts.sh. Layer exception: allowed -- the terminal scrub must run after every task in the workflow, including the docs task. Non-goals: No product edits. Layer: app_regression Feature state: active Acceptance criteria: - `bash scripts/scrub-handoff-artifacts.sh` exits 0. Exit code: 0 Invoker-Finalize-Id: 03cb1c94-1cac-4310-af56-316f3d1707f6
…ooks/_runner/run.py runs one hook script, passes its stdout, stderr and exit code through unchanged, and appends one metrics row with a classified outcome. Review lane: behavior Safety invariant: A hook run through the runner produces byte-identical stdout and the same exit code as running it directly; a failed metrics write changes neither and adds one stderr line. Effectiveness measurement: Fixture hooks run directly and through the runner give identical stdout bytes and exit codes, and each row carries the expected outcome. Slice rationale: The runner and its outcome rules are one claim, reviewable before any install wiring. Architectural effect: Adds a shared, harness-agnostic hook runner under engine/hooks/_runner/ next to engine/hooks/_markers/. Dormant until installed. Goal: Create the runner, the pure outcome classifier, and tests. Motivation: No record exists today of which hooks fire, stay silent, or crash. Alternative considerations: Editing all 82 entrypoints to import a logging decorator was rejected: it cannot record import errors, syntax errors, or timeouts, and touches every hook. An in-process runpy runner was rejected because a harness-killed or hanging hook would take the recorder down with it. Implementation details: A subprocess wrapper plus a pure classifier in outcome.py. Non-goals: No install.sh, settings, or hook fragment change; no report CLI; no change to any existing hook. Layer: domain Feature state: dormant Files: - engine/hooks/_runner/run.py - engine/hooks/_runner/outcome.py - engine/hooks/_runner/tests/test_outcome.py - engine/hooks/_runner/tests/test_run.py - engine/hooks/_runner/tests/fixtures/ Change types: - engine/hooks/_runner/run.py: create - engine/hooks/_runner/outcome.py: create - engine/hooks/_runner/tests/test_outcome.py: create - engine/hooks/_runner/tests/test_run.py: create - engine/hooks/_runner/tests/fixtures/: create Acceptance criteria: - `python3 -m unittest discover -s engine/hooks/_runner/tests -v` exits 0. - `bash scripts/run_all_tests.sh` exits 0. - `python3 scripts/check_hook_test_coverage.py` exits 0. Exit code: 0 Invoker-Finalize-Id: e5ba51e8-de9e-430f-8672-e0eef3e3bafc
…ine/hooks/_runner/README.md states what the runner records, where the rows go, and the outcome precedence. Review lane: docs Safety invariant: Only engine/hooks/_runner/README.md changes; no code, test, or config file is edited. Effectiveness measurement: Every row field and outcome named in the README appears in run.py and outcome.py, checked by reading both. Slice rationale: Prose in its own commit so the code commit stays one claim. Architectural effect: None; prose only. Goal: Create engine/hooks/_runner/README.md. Motivation: Readers of the hook directory need the row format without reading code. Alternative considerations: Code comments were rejected; the repo forbids new comments. Implementation details: One new Markdown file. Non-goals: No code, test, or config edits. Layer: docs Feature state: dormant Files: - engine/hooks/_runner/README.md Change types: - engine/hooks/_runner/README.md: create Acceptance criteria: - `test -f engine/hooks/_runner/README.md` exits 0. Exit code: 0 Invoker-Finalize-Id: 917f28d4-7b67-447f-bfd1-7a26a20061da
…unner tests, the repo test suite, and the hook coverage gate pass. Review lane: proof Safety invariant: Verification is read-only and does not alter any repository file. Effectiveness measurement: The three commands are the direct measurement. Slice rationale: One focused proof before review. Architectural effect: None; verification only. Goal: Prove pass-through and outcome classification. Motivation: Running the tests is the proof. Alternative considerations: A live-harness run is deferred to step 2, where the runner is installed. Implementation details: Run the three commands. Non-goals: No mutations. Layer: app_regression Feature state: active Acceptance criteria: - Exits 0 only when all pass. Exit code: 0 Invoker-Finalize-Id: e73029a9-e2ea-4d00-8c66-f727763900a1
….t0.a-ae5fdfe43-637dd362
…No ephemeral inter-task handoff files remain in the worktree before the merge gate. Review lane: cleanup Safety invariant: The scrub script only checks for known handoff artifact names and never touches source, tests, or other repository files. Effectiveness measurement: The script exits non-zero if any handoff artifact remains. Slice rationale: Required terminal scrub for every implementation workflow. Architectural effect: None; hygiene only. Goal: Leave the branch free of handoff artifacts. Motivation: Handoff files must not reach the PR. Alternative considerations: Manual cleanup was rejected as non-deterministic. Implementation details: Run scripts/scrub-handoff-artifacts.sh. Layer exception: allowed -- the terminal scrub must run after every task in the workflow, including the docs task. Non-goals: No product edits. Layer: app_regression Feature state: active Acceptance criteria: - `bash scripts/scrub-handoff-artifacts.sh` exits 0. Exit code: 0 Invoker-Finalize-Id: cb09f6f2-66d1-4564-adb3-38e63423dbfa
…ad5e1628a-dff66f66 — Review claim: No ephemeral inter-task handoff files remain in the worktree before the merge gate. Review lane: cleanup Safety invariant: The scrub script only checks for known handoff artifact names and never touches source, tests, or other repository files. Effectiveness measurement: The script exits non-zero if any handoff artifact remains. Slice rationale: Required terminal scrub for every implementation workflow. Architectural effect: None; hygiene only. Goal: Leave the branch free of handoff artifacts. Motivation: Handoff files must not reach the PR. Alternative considerations: Manual cleanup was rejected as non-deterministic. Implementation details: Run scripts/scrub-handoff-artifacts.sh. Layer exception: allowed -- the terminal scrub must run after every task in the workflow, including the docs task. Non-goals: No product edits. Layer: app_regression Feature state: active Acceptance criteria: - `bash scripts/scrub-handoff-artifacts.sh` exits 0.
…af591618b-0e93f775 — Review claim: No ephemeral inter-task handoff files remain in the worktree before the merge gate. Review lane: cleanup Safety invariant: The scrub script only checks for known handoff artifact names and never touches source, tests, or other repository files. Effectiveness measurement: The script exits non-zero if any handoff artifact remains. Slice rationale: Required terminal scrub for every implementation workflow. Architectural effect: None; hygiene only. Goal: Leave the branch free of handoff artifacts. Motivation: Handoff files must not reach the PR. Alternative considerations: Manual cleanup was rejected as non-deterministic. Implementation details: Run scripts/scrub-handoff-artifacts.sh. Layer exception: allowed -- the terminal scrub must run after every task in the workflow, including the docs task. Non-goals: No product edits. Layer: app_regression Feature state: active Acceptance criteria: - `bash scripts/scrub-handoff-artifacts.sh` exits 0.
…n recording fails datetime.UTC exists only on 3.11+, so on CI's Python 3.9 the runner raised after the hook ran and dropped the hook's stdout and exit code. Use datetime.timezone.utc, and catch any failure while classifying or writing the metrics row so the hook's output is still forwarded, with one stderr line naming the error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G95BG4NxDsW4NA6fcipHrv Change-Id: Ie823ca268e85e83dd57d3b6f1b026946daeb4c99
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 This pull request has been checked successfully and will be merged soon. 🎉
#503 is queued for merge on branch main (814e208).
Stacked behind 1 pull request queued ahead of this batch, not part of it. These checks run on a tip that also carries its commits, so a failure here can come from it as much as from #503.
Queued ahead of this batch:
This pull request has been created by Mergify to speculatively check the mergeability of #503.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue rule
admin-bypassfor merge:check-success = lintcheck-success = testRequired conditions to stay in the queue:
-draftbase=mainlabel=admin-bypass