Skip to content

feat(review): dispatch and coordinate acceptance-triggered labeling #5412

Open

Description

@purp

User Story

As an OpenShell maintainer coordinating accepted work, I need issues and PRs labeled automatically when acceptance is established so relevant subscribers and reviewers receive accurate classification without a separate manual labeling step.

Description

Dispatch the shared end-to-end labeling runner on explicit acceptance of an issue or PR. Cover human-applied acceptance and automated acceptance from #5260, including draft PRs. The GITHUB_TOKEN acceptance writer must explicitly invoke the same entry point after a successful acceptance-label write; do not depend on its label event launching another workflow. Dispatch must not be lost if subsequent reviewer routing fails.

Close the coverage gap for implicitly accepted maintainer/write-access-authored issues: obtain a human decision on how their acceptance signal is materialized, then implement that deterministic path using shared policy. The classifier never decides acceptance. Creation or reopening alone must not dispatch classification.

Retain authorized human PR-comment invocation, including force, and human/agentic triager invocation. Use current permission checks for human commands, trusted default-branch code, and the shared eligibility gate on every run. Do not execute PR-head code or interpret item/comment text as shell commands.

Coordinate per-item execution across automatic, human, and triager paths, including separate hosts. The shared helper's local lock is insufficient by itself. Avoid an external datastore and reuse verified label-event checkpoints for unchanged skips and reconciliation. Duplicate delivery and partial failures must not cause blind mutation replay or recursive triggering through bookkeeping labels.

Ensure successful classification reaches the existing reviewer reconciler when required, including paths whose token suppresses downstream label workflows. Preserve draft and existing reviewer protections. Roll out with preview first and an explicit application gate; keep routine successes and skips silent on the item.

Context

Human Steps

Approve the acceptance-signal policy for implicitly accepted issues. Configure required workflow/runtime credentials and deployment settings. Inspect preview-only executions across all trigger paths, then explicitly enable automatic application after successful observed end-to-end runs.

Definition of Done

  • Human and automation-applied issue/PR acceptance reaches the runner, including drafts and the explicit feat(review): automatically label new PRs for accepted work #5260 hook.
  • A reviewed deterministic path materializes acceptance for implicitly accepted issues without delegating disposition to the model.
  • Authorized human comment/force and triager paths use the same runner and eligibility checks.
  • All mutation entry points share per-item coordination across hosts; duplicate deliveries and bookkeeping events do not produce conflicting or recursive writes.
  • Reviewer routing follows relevant classification changes even when label-event workflows are suppressed, preserving existing protections.
  • Automated tests cover event/authorization selection, current eligibility, duplicate delivery, serialization, and failure handoffs.
  • Preview-only and gated-application rollout are documented and observed; routine operation posts no labeling comments.
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

    state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions