mergedcheck

command
v0.201.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: BSD-3-Clause Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command mergedcheck refuses a reply that tells the user a pull request is merged when no tool call of that turn read the pull request's state from GitHub and found it MERGED.

⛔ A MERGE IS SAID FROM MEMORY MORE OFTEN THAN IT IS READ. On 2026-11-22 at 19:40 a session told the user a pull request was merged without having read it; the lesson was written and the recur ledger records the recurrence. A written lesson is not a gate, so this is the gate: a Stop hook, modelled on replystamp --hook and statecheck --hook, that reads the transcript and answers the hook protocol.

What it judges

The text of the turn (every assistant text block after the user's last message). A sentence is a CLAIM when it carries "merged", "mergé(e)(s)" or "fusionné(e)(s)", unless it is a question, sits in code, a quotation or a block quote, is negated or hypothetical ("not merged yet", "pas encore fusionnée", "once merged", "sera fusionnée"), or uses the word as an adjective ("the merged result").

The claim is bound to the pull request it NAMES: owner/repo#N, "PR 12", "pull request #12", ".../pull/12", or a bare #12 that is not an issue being closed. A claim naming no number is accepted only when the turn read exactly one pull request as MERGED.

What counts as a read

A Bash call of the turn whose OUTPUT shows the state of THAT number: `gh pr view N --json state` (or `number,state`, `-q .state`, the text form), `gh pr list --json number,state`, `gh api repos/o/r/pulls/N`, and the output of ghmerge or ghrelease reporting the merge. `prwait` is NOT a read of the merge state. The latest read of a pull request wins: an OPEN read followed by a ghmerge that reports "merged" is a MERGED read.

Why it allows whenever it cannot read

Same rule as the other hooks: a refusal is not a verdict. An unreadable transcript, a payload that names none, a subagent's payload, a session it cannot keep a count for: it says so on stderr and allows. A reply is refused once (by its last text's uuid), a Stop that follows a block stands down, and the exit status under --hook is always 0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL