GitHub inbox: add an automation rule from any item so similar items are handled on Autopilot
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #13231 by @atomantic — merged
Assessment
This issue has not been assessed yet.
Description
Problem
Agent rules cover only three notification kinds (GITHUB_AGENT_RULE_KINDS: review-request, security-alert, issue-activity) and one action, start an agent or don't. They are created only from the Automations tab. While going through the inbox, the operator wants to tap Add automation rule on any item and have every similar item handled the same way on Autopilot. Examples: "every default-branch CI failure in this repo → mark done", "every subscribed issue in this repo → resolve with agent".
Learned rules (github_notification_rules, keyed on repo × reason × actor) already do part of this, but only by inference from Done/Mute taps. They need two matching corrections before they quiet anything, and they cannot start an agent.
Decision
Extend agent rules into automation rules and let them be created from a row.
- Kinds (
GITHUB_AGENT_RULE_KINDS,RULE_KINDS/threadAgentKindinlib/githubNotificationTriage.js,AGENT_RULE_KINDSingithubTriageLabels.js): addci-failure,own-pr,mention,releaseandotherto the existing three.threadAgentKindstays the single classifier and is derived from reason and subject type only. - Action replaces the
agent: booleanfield:action: 'agent' | 'done' | 'mute' | 'leave'. Storedagent: true/falserules are read asagent/leave. Coerce on read; validate on write. Agent rules keep their provider/model/effort pin. - Apply: Autopilot runs
agentrules through the lane selection from the generic resolve-with-agent issue. Assist and Autopilot applydoneandmuterules as automation actions (undoable, logged). The rules never override the suspect, security-alert or invitation pins (PINNED_RULES), and anagentrule on an outside thread still routes only to screened lanes. - From a row: the row's overflow gets Add automation rule…, which opens the rule form prefilled with this thread's kind and repo. "All repos" is one click away. The form shows how many open threads the rule would match right now, and offers "Apply to these N now" on save.
- Parity guard:
CANDIDATE_SQLingithubNotificationAutopilot.jsis a hand-written SQL mirror ofagentHandoff+agentRuleScope. Add a table-driven test that runs one fixture per kind × action through both the JS planner and the SQL candidate query (DB test), and fails on any disagreement. Without it, a kind added in JS silently never runs on Autopilot.
Affected files
server/lib/validation.js: the rule schema (action, the new kinds; legacyagentstill accepted).server/lib/githubNotificationTriage.js:threadAgentKind,matchAgentRule,agentRuleScope,autopilotHandoff, a newruleAction.server/services/githubNotificationAutopilot.js:CANDIDATE_SQL, rule-driven done/mute.server/services/githubNotificationAssist.js: applying done/mute rules.client/src/components/github/GitHubAgentRules.jsx,GitHubInboxTab.jsx,githubTriageLabels.js.server/services/githubNotifications.db.test.js: the parity test.
Acceptance criteria
- From an inbox row, the operator can save "CI failures in repo X → done". The next Autopilot or Assist run marks every matching open thread done, as undoable automation events.
- A stored legacy
{ agent: true }rule still hands off exactly as before. - A
donerule never acts on a suspect thread or a security alert. - The JS/SQL parity test goes red when a kind is added to
threadAgentKindwithoutCANDIDATE_SQL(verified by breaking it once).
model:heavy / effort:high: a schema change with a legacy-read contract, plus a JS↔SQL invariant that has to stay mirrored.
The agent action on kinds with no lane today depends on #13191; the done / mute actions can ship first.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 41m
- Merged PRs (30d)
- 991
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
bug effort:low model:light plan planner:gpt-6-1-sol
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area:ci bug effort:high model:heavy plan planner:gpt-6-1-sol tests
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
bug effort:high model:heavy plan planner:gpt-6-1-sol
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Isolate Vitest filesystem module caches across linked worktreesPossibly taken @atomantic claimed this today. Openbug effort:high model:medium
Difficulty 4/5 3-5 days Newbie friendliness 35/100
atomantic/PortOS#13402 · 2 comments ·
Maintainers usually reply within 1 day
-
bug effort:high model:medium plan planner:gpt-6-1-sol
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
oskarrough/dodgethis#115 ·
Maintainers usually reply within 1 day
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
external-plugin requires-submitter-fixes
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github/awesome-copilot#5396 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
chenasraf/nextcloud-forum#348 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melodic-software/claude-code-plugins#9619 ·
Maintainers usually reply within 1 day