Skip to content

Autopilot run: Notify the reporter when the report's issue is closed

  • Request: notify user tao report khi issue duoc close
  • Mode: local (started lite, promoted to full when the diff passed ~100 LOC)
  • Plan: plan-report-closed-notify
  • Started: 2026-10-21 10:43 · Landed: 2026-10-21 11:10
  • Result: ✅ pushed 6d5fe722 (BE 801dcb9f, FE b3030e52); CI green, smoke 22/22

Pipeline

Stage Result Rounds
Start owner request in chat (/autopilot) —
Plan written inline by the orchestrator; lite at first, plan file written at promotion 1 of 3
Plan review approve, 0 blocking, 3 advisory (all folded in: reason in the event, admin-only click, testable nav helper) 1 of 3
Gate 1 (owner) approved —
Implement orchestrator inline; 2 commits; non-test ≈145 LOC (listener, event, digest, FE text/nav, i18n) 1 of 3
Code review approve, 0 blocking, 2 advisory (plan text fixed; re-close grouping → manual check) 1 of 3
Local QA ×2 qa-twice.sh: 64 tests, pass 64 · flaky 0 · fail 0 1 of 3
Fix one test fix during implement (re-stubbing a throwing mock), split into two tests —
Land: full gates mvn verify: 1,560 tests, 0 fail, LINE 96.68 % (≥ 90 %); npm run test: 532 pass; npm run lint: 0 errors (3 old warnings) —
Gate 2 (owner) push —
CI + smoke Build and Deploy, Deploy Frontend, Publish Docs green; mock-test.sh 22/22; webhook still answers 401 to an unsigned POST —

What changed

  • service/impl/GitHubWebhookServiceImpl.java: on outcome APPLIED with state CLOSED, publishes ReportClosedEvent(issueNumber, reason); reopen, STALE, UNKNOWN_ISSUE, IGNORED and redeliveries publish nothing.
  • service/notification/ReportNotificationListener.java: @Async @TransactionalEventListener(AFTER_COMMIT, fallbackExecution = true); loads the report with its reporter (AppReportRepository.findFirstWithReporterByStatusAndIssueNumber, @EntityGraph), skips a deleted or deactivated reporter, upserts REPORT_CLOSED (group report:<id>:REPORT_CLOSED, payload title + reason) and pings SSE; never throws.
  • NotificationDigestService: digest line "Your report "T" was closed (completed)" in en/vi, raw reason as fallback.
  • FE utils/notificationText.js: notification text with translated reason; notificationNav(n, isAdmin) sends REPORT_CLOSED to the Report page for admins and does nothing otherwise; AppShell.openNotification uses it (other types unchanged).

Runs

# cycle stage round path result blocking advisory turns min tokens model
1 1 plan 1 inline (orchestrator) plan (lite) — — — 4 — opus
2 1 plan review 1 fallback (worker-reviewer) approve 0 3 10 1 43,061 sonnet
3 1 gate 1 — — approved — — — — — —
4 1 implement RN-1..RN-3 1 inline (orchestrator) tests green — — — 10 — opus
5 1 code review 1 fallback (worker-reviewer) approve 0 2 7 1 43,041 sonnet
6 1 QA ×2 1 qa-twice.sh pass 64 — — — 2 — —
7 1 land: full gates — orchestrator green — — — 3 — —

Open advisories

  • none open (the re-close grouping advisory is a manual check below; it needs a real database)

Manual checks for the owner

  • Close an issue that was created from the app: the reporter's bell shows "Your report was closed: (Completed)" without a page reload; clicking it opens the Report page.</li> <li>Reopen and close the same issue again while the first notification is unread: still one notification (grouped). After reading it, a new close gives a new one.</li> <li>The next email digest lists the closed report.</li> </ul> <h2 id="ignored-instructions">Ignored instructions<a class="headerlink" href="#ignored-instructions" title="Permanent link">¶</a></h2> <ul> <li>none</li> </ul> <h2 id="cost">Cost<a class="headerlink" href="#cost" title="Permanent link">¶</a></h2> <p>API list-price equivalent, not a bill.</p> <ul> <li><strong>Local:</strong> <code>node scripts/claude-cost.mjs --from 2026-10-21T03:43:37Z --to 2026-10-21T03:58:00Z --md</code></li> </ul> <table> <thead> <tr> <th>who</th> <th>model</th> <th>requests</th> <th>input</th> <th>cache write</th> <th>cache read</th> <th>output</th> <th>cost</th> </tr> </thead> <tbody> <tr> <td>main session (orchestrator)</td> <td>claude-opus-5-5</td> <td>29</td> <td>62</td> <td>50,195</td> <td>9,147,161</td> <td>26,807</td> <td>$2.77</td> </tr> <tr> <td>worker-reviewer: Plan review report notify</td> <td>claude-sonnet-5-5</td> <td>9</td> <td>20</td> <td>41,459</td> <td>273,268</td> <td>2,765</td> <td>$0.16</td> </tr> <tr> <td>worker-reviewer: Code review report notify</td> <td>claude-sonnet-5-5</td> <td>5</td> <td>10</td> <td>41,898</td> <td>140,629</td> <td>59</td> <td>$0.12</td> </tr> <tr> <td><strong>TOTAL</strong></td> <td></td> <td><strong>43</strong></td> <td><strong>92</strong></td> <td><strong>133,552</strong></td> <td><strong>9,561,058</strong></td> <td><strong>29,631</strong></td> <td><strong>$3.05</strong></td> </tr> </tbody> </table> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.tabs", "navigation.sections", "navigation.expand", "navigation.indexes", "navigation.top", "search.highlight", "search.suggest", "content.code.copy", "content.action.edit"], "search": "../../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../../assets/javascripts/bundle.a5f9d56c.min.js"></script> <script src="https://unpkg.com/mermaid@11/dist/mermaid.min.js"></script> <script src="../../javascripts/copy-markdown.js"></script> <script src="../../javascripts/diagram-zoom.js"></script> </body> </html>