Problem
Donkeyspace currently decides whether to begin or resume AI work primarily from issue state, labels, event type, and comment text. It does not retain or evaluate the issue author's or comment actor's identity when making that decision.
For example, any comment that does not begin with donkeyspace is currently treated as human input. On a public repository, this can allow an arbitrary commenter—or an unrelated bot—to provide clarification, resume blocked work, or authorize continuation after ai:needs-human.
Repository owners need explicit policy controls describing the conditions under which donkeyspace may begin or resume AI engagement.
Goal
Add configurable, auditable authorization gates for GitHub events that can start or resume agent work.
The design should distinguish at least:
- Initial engagement on issue creation, editing, reopening, or labeling.
- Clarification after
ai:needs-info.
- Resumption from
ai:blocked.
- Human authorization after
ai:needs-human, including plugin checkpoint resume.
- System-generated/projected issues and comments that must not recursively trigger work.
Policy considerations
Explore policy conditions such as:
- Any GitHub user.
- Original issue author.
- Repository collaborator with a minimum permission level.
- Repository owner or organization member.
- Explicit user/team allowlists.
- GitHub
author_association values.
- Trusted GitHub App or bot identities.
- Required labels combined with actor authorization.
- Different authorization requirements by event or workflow state.
The policy should make it possible to use stricter rules for a needs-human decision than for initial issue triage.
Required behavior
- Parse and retain the relevant actor identity and GitHub authorization metadata from issue and comment events.
- Evaluate authorization before creating or resuming an agent job.
- Apply the same rules to webhook and polling ingestion.
- Fail closed when required actor information is missing or cannot be verified.
- Record the authorization decision and a useful reason for audit/debugging.
- Avoid identifying donkeyspace-generated comments solely by a user-controllable body prefix.
- Preserve duplicate-job prevention and projected-work-item recursion prevention.
- Document defaults and migration/backward-compatibility behavior.
Acceptance criteria
- Policy schema supports configurable AI-engagement authorization.
- Initial engagement and human-resume paths can use different conditions.
- Unauthorized events are recorded but do not queue or resume agent work.
- Authorized issue authors or commenters can still drive the configured workflow.
- Tests cover allowed and denied users, missing actor metadata, bot/App comments, polling/webhook parity, and
needs-human checkpoint resume.
- Documentation explains recommended settings for private and public repositories.
Out of scope
- Implementing the change as part of creating this issue.
- General GitHub repository permission management.
- Changing who is allowed to merge pull requests.
Problem
Donkeyspace currently decides whether to begin or resume AI work primarily from issue state, labels, event type, and comment text. It does not retain or evaluate the issue author's or comment actor's identity when making that decision.
For example, any comment that does not begin with
donkeyspaceis currently treated as human input. On a public repository, this can allow an arbitrary commenter—or an unrelated bot—to provide clarification, resume blocked work, or authorize continuation afterai:needs-human.Repository owners need explicit policy controls describing the conditions under which donkeyspace may begin or resume AI engagement.
Goal
Add configurable, auditable authorization gates for GitHub events that can start or resume agent work.
The design should distinguish at least:
ai:needs-info.ai:blocked.ai:needs-human, including plugin checkpoint resume.Policy considerations
Explore policy conditions such as:
author_associationvalues.The policy should make it possible to use stricter rules for a
needs-humandecision than for initial issue triage.Required behavior
Acceptance criteria
needs-humancheckpoint resume.Out of scope