Skip to content

Audit That a Merge-Bot Caller Stub Subscribes to auto_merge_disabled #4313

Closed

Description

@ptr727

Problem

#4063's fix (#4310) moves the merge bot's re-arm onto the pull request auto_merge_disabled event, which each caller stub must subscribe to. Nothing audits that subscription. The merge-bot entry in spec/files.json checks only the merge-bot job key and three tokens inside that job (requireTokensInJob). spec/audit.py has no contract key for a token outside a job, so a stub's on: types are never read. A repository that keeps its old stub passes the audit while the re-arm job never runs there, the same silent stall #4063 fixed.

Done looks like

  • A file-level contract key, for example requireTokens, checked against the whole caller file.
  • "requireTokens": ["auto_merge_disabled"] on the merge-bot entry in spec/files.json.
  • A test for the new key.
  • spec/audit.py stays under its 3000-line ceiling. It sits near the ceiling, so the key's logic goes in a module of its own where it does not fit.

This could not land with #4310, because another open group held spec/audit.py and tests/test_audit_helpers.py at the time.

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    on Nov 20, 2026
  2. ptr727 commented on Nov 20, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (2026-11-20 attended run, round 2, group 3): branch burndown/merge-bot-stub-types-audit.

    Issues: #4313.

    Predicted file set:

    • spec/audit.py
    • spec/audit_contract.py
    • spec/files.json
    • spec/files.schema.json
    • spec/validate.py
    • tests/test_audit_helpers.py
    • tests/test_audit_size.py (the new module's own ceiling)

    Generated from those: none.

    Claim extended (2026-11-20): spec/fidelity-model.md.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions