Skip to content

PR and issue bar goes unenforced when the body is written and posted in one command #29

Description

@ecv

The gate that enforces the PR and issue bar passes without checking anything in the most common way people post a body, so non-compliant openers land unmeasured.

It runs before the tool call and reads the body off disk. Writing the body and posting it in one command means the file is not there yet when the gate looks, and an unreadable body is treated as no body, which exits clean.

Reproduced

Same body, two invocations. Written to disk first, then posted: denied. Written and posted in a single command: allowed.

The body used was five summary sentences against a cap of four, the exact miss the gate exists to catch.

Two failure modes

The gate is blind whenever the file does not exist yet, which is the normal shape for a first post. Nothing is measured and the call goes through.

Worse when the file already exists from an earlier attempt. The gate then measures the previous content, so it can block a body that now complies, or pass one that does not. A revision loop can bounce on a violation the author already fixed, which is what surfaced this.

Both are silent. The gate reports nothing when it declines to check, so it reads as a pass.

Why it matters

Every opener posted this way has been unmeasured. The bar has not been enforced for the workflow most likely to hit it, and the failure is invisible from the outside.

Definition of done

  • A body posted in the same command as the file that carries it is measured, not skipped
  • An unreadable or missing body is distinguishable from a compliant one, rather than exiting clean
  • A body that cannot be read produces a visible signal instead of silence

One option is to read the pending content out of the command itself when it carries a heredoc, rather than off disk. Another is to move the check after the write. Either way, an unreadable body should not read as a pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions