- Adopt nodeloc v2.0 reliability/observability work (MergeGuard, failureMessages,
MetricsCollector, staleness, QueueStore, shared error helpers) and tests
- Keep upstream bilingual README convention (README.md + README-zh.md);
port nodeloc's first-principles intro and v2.0 module notes into both
- Resolve doc conflicts in favor of upstream formatting where origin was
formatting-only; drop the 计划与指南/ directory per maintainer request
Combines the oversized-prompt instructions-file fix from main with the
fork's cleanup and redaction hardening: agent container, workspace
permissions, proxy, and prompt temp directory all clean up without
aborting each other.
Linux execve caps a single argv string at MAX_ARG_STRLEN (128 KiB), so
review prompts larger than that failed to spawn goose with E2BIG before
any model call was made. Prompts above a 96 KiB safety margin are now
written to a temporary file and handed to goose through --instructions
(-i) on both the direct runner path and the Docker agent path (mounted
read-only at /prompt/goose-prompt.md). Small prompts keep using --text.
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.
Decouple Actions event dispatching from runReview.ts into a pluggable
EventRouter with independent handlers for pull_request_target, issues,
issue_comment, pull_request_review, and schedule. Add unit tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- retry: retry only 5xx/429/transport errors; fail fast on 4xx
- checks/diff/r2/cacheStore: add direct unit tests (D-08, D-10 area)
- cacheStore: validate pullNumber in history object keys
- r2: export normalizeEndpoint for testability
Webhook deliveries now run the same issue and PR triage as action mode on open/edit/reopen events, gated by WEBHOOK_TRIAGE_ENABLED; @bot answers embed the host-curated repository knowledge cache from R2 (never the uninitialized scaffold); exact /recheck and /conflict commands get a guidance reply pointing to action mode instead of silence. Cache restores write through a temporary file and rename so concurrent webhook work never reads a partial object. Documents that all webhook local writes stay inside the current working directory.
Comments in which ghbot starts or completes an operation now end with a collapsed Runtime environment block (trigger, runner, goose model and version, review policy, automation flags, cache state) followed by a Created By GHBot signature linking to this repository. The template is shared by action-mode progress, recheck, completion, and PR chat comments; the workflow exports the pinned GOOSE_VERSION so the displayed version is truthful.