New migration api/src/main/resources/db/changelog/sql/202610210001-app-report-github-state.sql: nullable github_state, github_state_reason, github_state_at columns + partial index on issue_number.
POST /v1/funny-app/webhooks/github (web/GitHubWebhookController.java), JWT-free via WHITE_LIST_PATH (utils/AppConstant.java). Check order: 503 (no secret) → 413 (> 1 MiB) → 401 (HMAC) → 400 (payload) → 204.
service/impl/GitHubWebhookServiceImpl.java: HMAC-SHA256 over the raw body, constant-time compare; only issuesclosed/reopened for this repo; state_reason whitelist; logs delivery, event, action, issue and outcome as sanitised tokens only.
repo/AppReportRepository.java: @Transactional @Modifying conditional update that only applies newer updated_at (EC-14, EC-16).
service/impl/ReportServiceImpl.javaresolveStates: a stored state wins, with no GitHub call; other rows keep the read-through. ReportDto.githubStateReason added.
webapp/src/components/report/ReportPage.jsxStateBadge: "Closed · Not planned"; new stateReason.* keys in en/vi report.json.
The plan and implement stages ran inline instead of through swarm-plan / swarm-execute workers, because the orchestrator already held the code facts from writing ADR-0026 D7 and the spec.
WH-5: repo Settings → Webhooks → Add: URL https://canh-labs.com/api/v1/funny-app/webhooks/github, content type application/json, a random secret, "Let me select individual events" → Issues only.
Add GITHUB_WEBHOOK_SECRET=<same secret> to /opt/funnyapp/.env on the VM (chmod 600), then ./stopServer.sh && ./startServer.sh.
In "Recent Deliveries": ping → 204. Close an issue that was created from the app → 204, and the Report list shows "Closed · Completed" right away. Redeliver the same event → 204 with outcome=STALE in the log.
The conditional UPDATE runs against PostgreSQL only on prod (no DB test infra), so this close/redeliver check is its real test.