Skip to content

require_green's refusal counter is keyed per repository, so a stale count weakens the next turn #61

Open

Description

@urban233

require_green.py keys its consecutive-refusal counter on the repository, in
.codev/hooks/require_green_blocks.json, not on the session.

A turn abandoned mid-refusal leaves a stale count behind. The next turn that
the hook refuses then stands down after one refusal instead of three, because
the counter is already at 2 — so the Stop guarantee is quietly weaker than it
looks, and weaker in exactly the situation where someone has already had
trouble.

Found by the correctness specialist during the outer-loop review of #57
(finding rc-4); recorded there rather than fixed, since the owner selected a
different set of findings for that round.

Fix: key the counter on the Stop payload's session_id, and drop
entries for sessions that are no longer current.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions