feat: sync ghbot-Nodeloc v1.2.0 capabilities into upstream

Merges all 33 commits from lza6/ghbot-Nodeloc (v1.0.0 through v1.2.0)
while keeping both sides' features in every conflicted file:

- EventRouter dispatch extracted from runReview.ts (7.1), with the
  runtime environment block preserved on the review-start comment
- Unified command ack messages (6.3) combined with the collapsed
  runtime environment block and bot signature on /recheck replies
- Status banner and collapsible unposted findings in review bodies (6.1)
- Centralized runtime directories behind GHBOT_RUNTIME_DIR (D-13);
  webhook knowledge cache now lives under tempRootDirectory()
- Production hardening for merge races, timeouts, webhook ops;
  atomic temp-file rename for R2 cache restores kept from upstream
- Webhook parity retained: triage events gated by WEBHOOK_TRIAGE_ENABLED,
  read-only command guidance, repository knowledge injection,
  runtime environment block on webhook chat replies
- Sanitization/secret redaction centralization, error-aware retry,
  duplicate merge prevention, in-process webhook retries, /metrics
- Infra: eslint/prettier gates with CI verify workflow, docs archives

typecheck, eslint, prettier format:check, and 164 tests all pass.
This commit is contained in:
lezi-fun committed 2026-08-24 11:47:28 +08:00
commit 9e47ab339e
180 files changed
+15130 -1209

No files matched your search

@@ -0,0 +1,43 @@
---
name: ghbot-production-hardening
description: Production close-out workflow for ghbot: spec, audit, fix P0/P1 guards, gates, webhook HTTP smoke, independent review, docs.
metadata:
last_verified: "2026-08-23"
repo_baseline: "v1.1.0-hardening"
---
# ghbot production hardening skill
## When to use
Closing a production iteration of this GitHub review bot. Not for adding unrelated SaaS features.
## Do not use
- Changing AUTO_MERGE default
- Reusing old review cache as a new-head approval
- Running paid LLM E2E without budget
- Pushing to remotes without write permission
## Inputs
Current repo, CLAUDE.md red lines, `.specify/memory/constitution.md`.
## Steps
1. Read constitution, CLAUDE.md, workflow_status.md, last verification record.
2. Rebuild facts: git status, typecheck, test.
3. Audit contract/security/error/docs before coding.
4. Fix P0 then P1 with tests. Skip 1700-line processor extraction unless an event-loop harness exists.
5. Gates: typecheck, lint, format:check, test, build, npm audit --omit=dev.
6. Webhook HTTP smoke on a spare port: /healthz, HMAC 202, bad sig 401, duplicate, /metrics.
7. Independent critic. Repair only confirmed Blocking/Required.
8. Sync README/.env.example/workflows. Write HTML report under docs/reports/.
## Stop
Missing credentials, origin 403, paid API, production deploy, no progress after two review loops.
## Verify
Never claim LLM review E2E or origin push without command evidence.
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/nodejs-backend-patterns
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/nodejs-best-practices
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/typescript-advanced-types
+1
View File
@@ -0,0 +1 @@
../../.agents/skills/zod