Files
ghbot/.specify/specs/001-production-hardening/tasks.md
T
lezi-fun 9e47ab339e 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.
2026-08-24 11:47:28 +08:00

Implementation Tasks: 001-production-hardening

Phase 1: Spec and audit

  • 1.1 Constitution + spec
  • 1.2 Parallel contract/security/error/docs audit

Phase 2: Production guards

  • 2.1 Merge SHA recheck + pulls.merge sha
  • 2.2 Conflict lock + git command timeout + dirty worktree reset
  • 2.3 Webhook body timeout/size and request catch
  • 2.4 API proxy abort/timeout/body cap
  • 2.5 Goose process output cap and cleanup timeouts
  • 2.6 Config cross-field validation and GHBOT_RUNTIME_DIR contract
  • 2.7 Issue comment handler isolation with AggregateError
  • 2.8 Approval permission lookup no longer swallows retryable errors
  • 2.9 Event logger child bindings

Phase 3: Verify and handoff

  • 3.1 Local gates (typecheck/lint/format/test)
  • 3.2 Webhook HTTP E2E
  • 3.3 Independent review
  • 3.4 HTML change report + skill + docs