Skip to content

Hard guardrail: block pull-request creation on direct-push-only repos #821

Description

@proagentstore

Problem: run cda38e26 (working issue #806) opened pull request #819 on ProAgentStore/platform, even though this repo's whole workflow is direct-push-to-main with no branches and no PRs. The objective text told the run not to do this, and it did anyway, apparently under pressure near its iteration limit.

Relying on the objective's prose to prevent this every single run is fragile - it already failed once. This should be enforced structurally.

Requested feature: a per-repo (or per-instance) flag, e.g. repo.disallowPullRequests, that when set causes the platform to reject/block the github_create_pull_request tool call outright (or intercept the underlying git push of a non-default branch intended for a PR) with a clear error the engine can read and recover from, rather than letting the PR get created and only catching it in a later cleanup run.

Acceptance criteria:

  1. A repo can be flagged as direct-push-only via console or MCP tool.
  2. When flagged, an attempt to create a pull request via the connector's github tool is refused with an explanit error rather than silently succeeding.
  3. The refusal message tells the engine what to do instead (push directly to the default branch once checks pass).
  4. Existing repos default to unflagged (no behavior change) unless explicitly set.
  5. Tests covering: flagged repo blocks PR creation, unflagged repo is unaffected.

Motivation: ProAgentStore/platform itself is direct-push-only, and this failure mode (a run opening a PR nobody asked for, requiring a manual cleanup pass) has already happened once and cost an extra continuation run to fix.

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