Repository navigation
Commit 54a6e78
Independently moderate newly opened issues (#2030)
## Summary
Add a single independent GitHub Agentic Workflow for newly opened
issues. It starts on `issues.opened`, judges the report itself, and does
not wait for central `~spam` / `~info-needed` flags. There is no hourly
catch-up, flag-event router, automatic backlog sweep, or automatic AI
review on edits, comments, or reopening.
| Independent judgment | Action |
| --- | --- |
| Clear gibberish, explicit tracker-only test submissions, or plainly
unrelated material | Fixed polite reply, then close as `not_planned` |
| Plausible extension report without enough information, including an
empty extension template | Friendly template request, add only local
`info-needed`, leave open |
| Useful report or uncertainty | No comment, label, reaction, or state
change |
The information request is:
> Thanks for reaching out! Could you fill out the issue template in this
issue? A little more information would help us investigate and better
understand how to help.
Language, spelling, brevity, a new account, missing logs, or unfilled
optional fields are not sufficient grounds for closure. This version
creates no `moderation-review-needed` queue label.
## Follow-up responses: comments and description edits
The existing reporter-comment cleanup now works for issues even without
`triage-needed`; existing shared-action authorization remains, and pull
requests keep their previous guard.
A small deterministic `issues.edited` job also treats a genuine nonempty
description update by the authenticated human issue author as a
response. It removes **only plain `info-needed`**. It does not run AI,
post another comment, close/reopen an issue, or remove central flags.
This prevents a reporter who fills out the requested template in the
description from later being closed as unanswered.
- Title-only, whitespace-only, and empty-body changes do not clear a
pending request.
- Current body/state/author/label and timeline checks reject stale
responses, unverifiable ordering, renewed requests, or newer human
handling; a final reread guards intervening changes. Simultaneous events
with unverifiable ordering defer conservatively.
- Actual GitHub testing showed that one title-and-body update can
produce separate edited webhooks. A reporter rename matching that
response's actor, timestamp, and new title does not veto its body
update, even when the body webhook omits `changes.title`. Later or
mismatched handling remains protected. Passive mentions/subscriptions
are not treated as renewed requests.
- The existing seven-day closer is unchanged. Clearing the label
excludes the answered issue from its information-needed path; unanswered
issues retain the existing follow-up behavior.
## Independence and safeguards
- The model receives a prepared JSON file containing **title and
description only**. Labels, assignments, account metadata, and other
bots' judgments are not classification input. Both central flags, either
flag, or neither flag can be present without authorizing or vetoing a
judgment.
- Central automation remains untouched and may apply labels later. The
moderator never adds/removes central flags, rewrites assignments,
changes area/type classifications, or locks issues. Both systems may
consume inference while they coexist.
- A native preflight prepares content plus a trusted fingerprint before
inference. Human discussion, manual triage/assignment, pins/project
changes and other protected decisions, closed/locked issues, and
previous workflow replies stop automatic action. Opening-payload
template labels are neutral; later human label changes are not. Bot
metadata churn does not create a false human override or invalidate
content.
- Publication rereads state before commenting and before
labeling/closing. Changed content or intervening human handling backs
off. A previous response prevents duplicate replies and reclosure after
human reopening. Manual runs without an original opening payload
conservatively defer human-origin labels, including possible template
labels.
- The Copilot agent has GitHub/shell/editing tools disabled, plus
explicit CLI `--deny-tool shell --deny-tool write` arguments. It reads
the **whole** prepared file with native `view` and `forceReadLargeFiles:
true`; unavailable/incomplete input must produce a safe no-op. It emits
only a classification. Fixed code chooses the issue, reply, labels and
state change.
- Strict threat detection must pass before the separate write-enabled
publisher runs. Publication independently downloads the original
preflight fingerprint; the agent's copy is not trusted. API errors
propagate. Partial failure after a reply requires maintainer inspection
rather than blind duplicate publication. GitHub API reads/writes are not
atomic, so a small read/write race remains.
## Operation, budgets, and rollout
Manual dispatch accepts one issue number with the same human-protection
guards. It is **live publication, not a dry run**, not a force override,
and not a backlog sweep. The committed workflow exposes no staged
dispatch input.
Agent execution is serialized with a 20-turn, 10-minute, 500-credit
per-run limit and a separate 200-credit detector budget. The
10,000-credit daily guardrail applies to automatic runs; the pinned
runtime **exempts manual dispatch**. Daily accounting can lag in-flight
work. Missed events or failures require manual retry/review.
The source and generated executable use gh-aw v1.2.2 and pinned runtime
`53d0749e19424a918acd82b4d140264ce48f2f14`. Focused safeguard tests run
in existing Linux/Windows unit CI jobs, and the large lockfile is marked
generated. Repository/organization policy and billing must permit
`copilot-requests: write` and the pinned Actions. Administrative
upstream Actions policy could not be inspected with the available access
(HTTP 403); no settings were changed.
## Review and validation
Repeated manual lifecycle review and independent code review found and
fixed the description-only response gap and the same-response rename
edge case. The latter was tested against actual split GitHub webhooks,
not just assumed payloads. The final narrow independent review found no
remaining meaningful defect in the corrections.
- **30 focused scenario tests passed**, including edit-only responses,
actor/content validation, renewed requests, combined/split title-body
events, passive timeline events, API failures, and existing moderation
guards. In-memory mutation checks verified that the new regressions
reject the corresponding broken behaviors.
- Lint, TypeScript test compilation, and the existing unit suite passed:
**3,573 passing, 9 pending**.
- Pinned workflow compilation and policy lint passed with **zero
compiler warnings**; final no-emit compilation passed.
- Final production helper/tests, reporter-cleanup workflow, Markdown
source, and executable were compared with private candidate
`770d176407659ed9c39f80ef5f893a7251cafe87`. No identity substitutions
were used.
### Live end-to-end checks
These runs are in the private isolated fixture repository and require
access. Actual content, comments, labels and states were asserted, not
just green job conclusions.
| Scenario | Verified result / evidence |
| --- | --- |
| New incomplete report | Friendly request and local `info-needed`,
initially open.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44362637094)
|
| Author fills the requested template and clarifies the title in one
update | Actual split title/body webhooks clear only local
`info-needed`, leave open and add no reply.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44365652560)
|
| Author supplies details by editing only the description | Same
cleanup, preserving existing `~spam` / `~info-needed`.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44366004911)
|
| Title-only / whitespace-only / empty-body edits | Pending
`info-needed` retained.
[Title](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44365024251),
[whitespace](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44365889836),
[empty](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44365939620)
|
| Existing author-comment path without `triage-needed` | Label removed;
issue stayed open; original authorization logic retained.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44366085169)
|
| Answered versus unanswered information requests | Existing closer
preserved the answered fixture and closed the unanswered fixture. **Only
the private test copy used zero days; production remains seven days.**
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44366254849)
|
| 64,892-character log-heavy report with the actual problem buried in
the middle | Final candidate returned the entire report in one
native-view read; returned JSON was compared with the full prepared
input. No shell fallback was attempted. Classified `relevant`; no
comment, label, or closure. [Final
run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44366880993)
|
| Clear junk | Fixed polite reply and closure of only its own issue.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44362649587)
|
| Human reopens that handled junk issue, then explicitly requests manual
review | No automatic AI review on reopening. Manual run skipped
inference/publication, left it open, and posted no duplicate response.
[Run](https://github.com/StellaHuang95/gh-aw-trial/actions/runs/44367638093)
|
The earlier independent-flow checks also verified useful French reports
despite misleading Bot metadata, pre-inference human-pin protection,
stale-publication rejection after a body edit, and cross-issue
instruction confinement. Logs and pre-cleanup outcome snapshots are
retained locally. No upstream issue was created or modified.
Keep this PR **draft** for maintainer inspection before making it ready
for review.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent e2685bd commit 54a6e78
7 files changed
Lines changed: 3267 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
0 commit comments