diff --git a/.env.example b/.env.example index 9987e0d7..f19bac73 100644 --- a/.env.example +++ b/.env.example @@ -5,7 +5,7 @@ # Default for Docker Compose in this repo is 7224; override locally if needed (`nub src/index.ts`) PORT=7224 # web: /health + /ready + /webhooks (enqueue only). -# worker: ack, ci-refresh, review, ask, description, triage, verification, retention. +# worker: ack, ci-refresh, review, ask, description, triage, verification, retention, code-index-build. # Local dev needs both terminals; Compose runs pr-agent-web and pr-agent-worker. ROLE=web diff --git a/README.md b/README.md index 8e5a639d..ca88426f 100644 --- a/README.md +++ b/README.md @@ -75,11 +75,11 @@ docker compose up -d That starts three services from [docker-compose.yml](docker-compose.yml): -| Service | Role | What it does | -| ----------------- | ------------- | ---------------------------------------------------------------------------------------------- | -| `postgres` | database | Durable webhook dedupe, work items, pg-boss jobs | -| `pr-agent-web` | `ROLE=web` | `POST /webhooks`, `GET /health`, `GET /ready` on port `7224` | -| `pr-agent-worker` | `ROLE=worker` | Consumes ack, review, ask, description, triage, verification, CI-refresh, and retention queues | +| Service | Role | What it does | +| ----------------- | ------------- | ---------------------------------------------------------------------------------------------------------------- | +| `postgres` | database | Durable webhook dedupe, work items, pg-boss jobs | +| `pr-agent-web` | `ROLE=web` | `POST /webhooks`, `GET /health`, `GET /ready` on port `7224` | +| `pr-agent-worker` | `ROLE=worker` | Consumes ack, review, ask, description, triage, verification, CI-refresh, retention, and code-index-build queues | Migrations run automatically when each process opens its Postgres pool. You do not run them by hand. diff --git a/docs/adr/0003-structured-review-output.md b/docs/adr/0003-structured-review-output.md index e074f194..912c799a 100644 --- a/docs/adr/0003-structured-review-output.md +++ b/docs/adr/0003-structured-review-output.md @@ -15,9 +15,9 @@ The review agent previously instructed the model to submit a GitHub pull request ## Decision -1. **`ReviewPayload`** (Valibot) is the validated summary contract for a review run. Incremental inline batches use `publish_thread`; the summary publisher consumes `ReviewPayload` via `submitReview` / `publish_summary` ([ADR 0020](0020-orchestrated-review.md), [ADR 0027](0027-replace-zod-with-valibot.md)). +1. **`ReviewPayload`** (Valibot) is the validated summary contract for a review run. Incremental inline batches use `publish_thread`; the summary publisher consumes `ReviewPayload` via `publish_summary` ([ADR 0020](0020-orchestrated-review.md), [ADR 0027](0027-replace-zod-with-valibot.md)). 2. **Server-side renderers** (`reviewRender.ts`) produce inline thread bodies (P0–P3, with `Prompt to fix` accordion), the **review pointer body** (per-specialist Files-tab pull request review header: NOTE linking to the **review progress comment** plus a specialist tagline; no Fix All accordion), and the **review summary comment** (sentinel `## PR Agent Review`, overview alert plus a unified table: size, finding rows keyed by severity, tests, security, and follow-ups; aggregate **agent fix prompt** accordion below the table; hidden **stale review metadata** HTML comment). Finding rows for inline-posted severities list title, location, and a footnote only; **detail text appears in the summary table only for summary-only placements**. P3 is inline-eligible so `/triage` can fix it; review check runs still fail only for P0–P2 (see [ADR 0021](0021-p3-inline-triage.md)). -3. **Publish** ([`publish/publishReview.ts`](../../src/review/publish/publishReview.ts) + [`github/reviewPublish.ts`](../../src/github/reviewPublish.ts)) calls Octokit directly; `createPullRequestReview` / `addPullRequestComment` are **filtered out** of the review agent tool list. +3. **Publish** ([`publish/publishFindingBatch.ts`](../../src/review/publish/publishFindingBatch.ts), [`publish/publishSummaryOnly.ts`](../../src/review/publish/publishSummaryOnly.ts), and [`github/reviewPublish.ts`](../../src/github/reviewPublish.ts)) calls Octokit directly; `createPullRequestReview` / `addPullRequestComment` are **filtered out** of the review agent tool list. 4. **Phase 3:** summary comment upsert by sentinel; optional idempotent labels (`size:`, `Possible security concern`) behind config flags. 5. **Strict bugs only** — no suggestions/improvements framing; `fixPrompt` is for coding agents, not human refactor advice. diff --git a/docs/adr/0006-durable-agent-work.md b/docs/adr/0006-durable-agent-work.md index c4ef58ba..ae98ec4f 100644 --- a/docs/adr/0006-durable-agent-work.md +++ b/docs/adr/0006-durable-agent-work.md @@ -16,7 +16,7 @@ Production failures during small bursts showed that webhook acknowledgement, Git 2. **Postgres + pg-boss** — Use Postgres for app-owned workflow state and pg-boss for delivery, retries, heartbeat, expiration, and dead-letter retention. Per-PR mutual exclusion is the **PR actor lease** ([ADR 0030](0030-pr-actor-lease.md)); work queues use the `standard` policy. -3. **Web/worker split** — `ROLE=web` serves `/health`, `/ready`, and `/webhooks`. `ROLE=worker` runs acknowledgement, CI-refresh, review, ask, description, triage, verification, and retention workers from the same image. +3. **Web/worker split** — `ROLE=web` serves `/health`, `/ready`, and `/webhooks`. `ROLE=worker` runs acknowledgement, CI-refresh, review, ask, description, triage, verification, retention, and code-index-build workers from the same image. 4. **No PR-surface I/O on webhook fibers** — GitHub reactions, progress comments, ask replies, inline reviews, labels, and failure notices run in worker jobs. Webhook fibers verify, parse, dedupe, commit, enqueue, and return. diff --git a/docs/adr/0022-remove-merge-verdict.md b/docs/adr/0022-remove-merge-verdict.md index 9c3ce09a..b81d3dbb 100644 --- a/docs/adr/0022-remove-merge-verdict.md +++ b/docs/adr/0022-remove-merge-verdict.md @@ -12,7 +12,7 @@ The review summary once included a model-authored **Merge verdict** row (score / 1. **Remove the field.** Drop `mergeVerdict` from `ReviewPayload`, prompt contracts, public-output redaction, and payload validation clamps. 2. **Remove the row.** The summary renderer no longer emits a Merge verdict table row or mechanical fallbacks. -3. **Keep other gates.** Effort, findings, relevant tests, security, CI, and follow-ups remain the overview surface. +3. **Keep other gates.** Review size (`size` / `size:`), findings, relevant tests, security, CI, and follow-ups remain the overview surface. ## Consequences diff --git a/docs/adr/0025-prompt-cache-stability.md b/docs/adr/0025-prompt-cache-stability.md index 394bd273..a7a57285 100644 --- a/docs/adr/0025-prompt-cache-stability.md +++ b/docs/adr/0025-prompt-cache-stability.md @@ -50,7 +50,7 @@ prompt-caching framework and no deferred-tool subsystem for this change. - Orchestrator and specialist tool JSON must stay byte-stable across phases and personas (persona differences live in system prompts only). Shared code-index description/schema and specialist tools are registered once at session create. -- Wrong-phase `brief` / `publish_thread` / `publish_summary` calls return +- Wrong-phase `submit_specialist_brief` / `publish_thread` / `publish_summary` calls return structured executor errors; the registered tool list does not change mid-session. Mid-session `setActiveTools` / `transitionTools` APIs are gone. - Auto-compaction stays off for orchestrator, specialist, and CI summary; ask, diff --git a/docs/adr/0028-validate-then-repair-tool-inputs.md b/docs/adr/0028-validate-then-repair-tool-inputs.md index d8beadfa..4f5341c7 100644 --- a/docs/adr/0028-validate-then-repair-tool-inputs.md +++ b/docs/adr/0028-validate-then-repair-tool-inputs.md @@ -4,6 +4,10 @@ Accepted. +Amended: the live summary tool is `publish_summary` in +[`publishSummaryTool.ts`](../../src/review/orchestrator/publishSummaryTool.ts). +`submitReview` and `submitReviewTool.ts` are gone. + ## Context Models emit structurally invalid tool arguments in a handful of predictable ways: a JSON array serialized as a string, a single object where the schema wants an array, a bare string where an array of strings is wanted, or `null` for an optional field. Before this change every parse site handled failures on its own: workspace tools threw a raw `ValiError` dump at the model, structured-output tools each formatted their own issue list, and `submitReview` ran its domain coercions unconditionally before every parse — mutating payloads that were already valid and logging `review_payload_coerced` for submissions the coercion never touched. @@ -23,7 +27,7 @@ The four failure shapes above are mechanical and deterministic. Fixing them per - Helper: [`src/agent/tools/parseToolInput.ts`](../../src/agent/tools/parseToolInput.ts) - Executor seams: [`defineWorkspaceTool.ts`](../../src/agent/tools/defineWorkspaceTool.ts), [`context7Tools.ts`](../../src/agent/tools/context7Tools.ts) - Metrics variant: [`reviewRunMetrics.ts`](../../src/review/run/reviewRunMetrics.ts) (`tool_input_repaired`) -- Validate-then-repair reorder: [`submitReviewTool.ts`](../../src/review/publish/submitReviewTool.ts); deleted domain rule in [`reviewSchema.ts`](../../src/review/reviewSchema.ts) +- Summary publish parse: [`publishSummaryTool.ts`](../../src/review/orchestrator/publishSummaryTool.ts). `coerceReviewPayloadInput` remains in [`reviewSchema.ts`](../../src/review/reviewSchema.ts) but has no production caller on the `publish_summary` path. ## Consequences diff --git a/docs/configuration.md b/docs/configuration.md index 74166167..1dc51096 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -149,45 +149,47 @@ Work item retries are controlled only by pg-boss (`QUEUE_RETRY_LIMIT`, `QUEUE_RE --- -## Code constants (`src/settings/*Constants.ts`, re-exported via `constants.ts`) +## Code constants + +Most symbols live in `src/settings/*Constants.ts` and are re-exported from `constants.ts`. Rows that name another file live there. ### Agent work (queues) -| Symbol | Value / role | -| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ACK_QUEUE` | `agent-work-ack` | -| `CI_REFRESH_QUEUE` | `agent-work-ci-refresh` — LLM CI cell refresh after `workflow_run` or `check_suite` completed | -| `CI_REFRESH_RETRY_DELAY_SECONDS` | 15, start-after delay when a refresh hits an active review and re-enqueues on the same lane | -| `CI_REFRESH_RETRY_ATTEMPT_LIMIT` | 120, max retain hops after the original delivery (30 minutes at the delay above); exhaustion stops silently | -| `REVIEW_QUEUE` | `agent-work-review` | -| `ASK_QUEUE` | `agent-work-ask` | -| `DESCRIPTION_QUEUE` | `agent-work-description` | -| `TRIAGE_QUEUE` | `agent-work-triage` | -| `VERIFICATION_QUEUE` | `agent-work-verification` | -| `ACK_DEAD_LETTER_QUEUE` | `agent-work-ack-dead` | -| `REVIEW_DEAD_LETTER_QUEUE` | `agent-work-review-dead` | -| `ASK_DEAD_LETTER_QUEUE` | `agent-work-ask-dead` | -| `DESCRIPTION_DEAD_LETTER_QUEUE` | `agent-work-description-dead` | -| `TRIAGE_DEAD_LETTER_QUEUE` | `agent-work-triage-dead` | -| `VERIFICATION_DEAD_LETTER_QUEUE` | `agent-work-verification-dead` | -| `CI_REFRESH_DEAD_LETTER_QUEUE` | `agent-work-ci-refresh-dead` | -| `RETENTION_QUEUE` | `agent-work-retention` — scheduled cleanup sweep | -| `CODE_INDEX_BUILD_QUEUE` | `code-index-build` — optional Postgres FTS index build (when `CODE_INDEX_MODE=fts`) | -| `RETENTION_QUEUE_POLLING_INTERVAL_SECONDS` | 60 | -| `DEFERRED_HEAD_SHA` | worker resolves head SHA | -| `AUTOMATED_PR_ACTIONS` | opened, synchronize, reopened, closed — `pull_request` actions accepted at webhook intake (not the auto-enqueue map); `closed` cancels in-progress reviews | -| `AUTO_TRIGGER_ACTIONS` | feature auto-trigger map: review/describe on `opened`, verification on `synchronize`; `reopened` enqueues nothing (see [features.md](features.md)) | -| `DESCRIPTION_PUBLISH_LENS` | `description` | -| `ASK_PUBLISH_LENS` | `ask` | -| `TRIAGE_PUBLISH_LENS` | `triage` | -| `VERIFICATION_PUBLISH_LENS` | `verification` | -| `VERIFICATION_STUB_MARKER` | `` HTML marker in the single verification stub reply per finding thread | -| `VERIFICATION_FAILURE_START` / `_END` | `` markers around the one in-place terminal-failure signal | -| `VERIFICATION_FAILURE_TEXT` | `Verification did not complete. Run \`/verify\` to try again.` | -| `MAX_STORED_COMMENT_TEXT_LEN` | 16384 | -| `RETENTION_DELETE_BATCH_SIZE` | 5000, rows per batch in the retention sweep (each batch is its own transaction) | -| `PR_ACTOR_LEASE_DEFER_SECONDS` | 15, delay between lease-acquisition attempts for a blocked delivery; the armed redelivery re-checks until the lease frees or lapses | -| `STALE_QUEUED_WORK_GRACE_SECONDS` | 300, age after which a queued leased-type work item with no live lease and no live pg-boss job is logged as `agent_work_queued_stale` (delivery chain dead) | +| Symbol | Value / role | +| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ACK_QUEUE` | `agent-work-ack` | +| `CI_REFRESH_QUEUE` | `agent-work-ci-refresh` — LLM CI cell refresh after `workflow_run` or `check_suite` completed | +| `CI_REFRESH_RETRY_DELAY_SECONDS` | 15, start-after delay when a refresh hits an active review and re-enqueues on the same lane | +| `CI_REFRESH_RETRY_ATTEMPT_LIMIT` | 120, max retain hops after the original delivery (30 minutes at the delay above); exhaustion stops silently | +| `REVIEW_QUEUE` | `agent-work-review` | +| `ASK_QUEUE` | `agent-work-ask` | +| `DESCRIPTION_QUEUE` | `agent-work-description` | +| `TRIAGE_QUEUE` | `agent-work-triage` | +| `VERIFICATION_QUEUE` | `agent-work-verification` | +| `ACK_DEAD_LETTER_QUEUE` | `agent-work-ack-dead` | +| `REVIEW_DEAD_LETTER_QUEUE` | `agent-work-review-dead` | +| `ASK_DEAD_LETTER_QUEUE` | `agent-work-ask-dead` | +| `DESCRIPTION_DEAD_LETTER_QUEUE` | `agent-work-description-dead` | +| `TRIAGE_DEAD_LETTER_QUEUE` | `agent-work-triage-dead` | +| `VERIFICATION_DEAD_LETTER_QUEUE` | `agent-work-verification-dead` | +| `CI_REFRESH_DEAD_LETTER_QUEUE` | `agent-work-ci-refresh-dead` | +| `RETENTION_QUEUE` | `agent-work-retention` — scheduled cleanup sweep | +| `CODE_INDEX_BUILD_QUEUE` | `code-index-build` — optional Postgres FTS index build (when `CODE_INDEX_MODE=fts`) | +| `RETENTION_QUEUE_POLLING_INTERVAL_SECONDS` | 60 | +| `DEFERRED_HEAD_SHA` | worker resolves head SHA | +| `AUTOMATED_PR_ACTIONS` | opened, synchronize, reopened, closed — `pull_request` actions accepted at webhook intake (not the auto-enqueue map); `closed` cancels in-progress reviews | +| `AUTO_TRIGGER_ACTIONS` | feature auto-trigger map: review/describe on `opened`, verification on `synchronize`; `reopened` enqueues nothing (see [features.md](features.md)) | +| `DESCRIPTION_PUBLISH_LENS` | `description` | +| `ASK_PUBLISH_LENS` | `ask` | +| `TRIAGE_PUBLISH_LENS` | `triage` | +| `VERIFICATION_PUBLISH_LENS` | `verification` | +| `VERIFICATION_STUB_MARKER` | `` HTML marker in the single verification stub reply per finding thread | +| `VERIFICATION_FAILURE_START` / `_END` | `` markers around the one in-place terminal-failure signal | +| `VERIFICATION_FAILURE_TEXT` | `Verification did not complete. Run \`/verify\` to try again.` | +| `MAX_STORED_COMMENT_TEXT_LEN` | 16384 | +| `RETENTION_DELETE_BATCH_SIZE` | 5000, rows per batch in the retention sweep (each batch is its own transaction) | +| `PR_ACTOR_LEASE_DEFER_SECONDS` | 15, delay between lease-acquisition attempts for a blocked delivery; the armed redelivery re-checks until the lease frees or lapses. Defined in `src/agentWork/prActorLease.ts`. | +| `STALE_QUEUED_WORK_GRACE_SECONDS` | 300, age after which a queued leased-type work item with no live lease and no live pg-boss job is logged as `agent_work_queued_stale` (delivery chain dead) | ### Review output @@ -195,66 +197,66 @@ Review check runs are always on. The acknowledgement worker posts `PR Agent Revi Operators using branch protection must replace required checks named `PR Agent Security Review`, `PR Agent Quality Review`, or `PR Agent Tests Review` with `PR Agent Review`. New runs no longer create the three old check names. -| Symbol | Role | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `REVIEW_SUMMARY_SENTINEL` | PR conversation summary marker | -| `LEGACY_REVIEW_SUMMARY_SENTINELS` | Historical review summary markers retained for recognition | -| `REVIEW_POINTER_BODY` | Legacy Files-tab stub copy retained for recognition / repeat-no-bugs fallback | -| `LEGACY_REVIEW_POINTER_BODIES` | Historical files-tab pointer text retained for recognition | -| `REVIEW_POINTER_NOTE_LEAD` | Legacy first-publish pointer NOTE body retained for recognition | -| `REVIEW_SIZES` | Review size scale (`XS`–`XXL`) for the Size row and `size:` label | -| `REVIEW_OVERVIEW_ALERT` / `REVIEW_FAILURE_ALERT` | GitHub alert types (`NOTE`, `CAUTION`) | -| `REVIEW_PROGRESS_NOTE` | In-progress NOTE body | -| `REVIEW_PROGRESS_QUEUED_NOTE` | Queued progress stub NOTE body (before the review worker claims the work item) | -| `REVIEW_PROGRESS_QUEUE_LABEL` | Queued progress stub table label for wait-queue rank (`Queue`) | -| `reviewProgressCancelledNote` / `reviewCancelLastError` / `reviewCancelAttributionForClosedPr` / `sanitizeGithubLogin` / `ReviewCancelAttribution` | Cancelled progress stub notice, work-item last_error, closed-PR attribution, and login sanitizer | -| `REVIEW_PROGRESS_SOURCE_AUTO` / `REVIEW_PROGRESS_SOURCE_SLASH` | Progress table source labels | -| `LIGHTWEIGHT_REVIEW_COMPLETION_*` | Docs-only auto-review skip copy | -| `REVIEW_CHECK_RUN_RESERVATION_STALE_MS` | 300000 | -| `REVIEW_CHECK_RUN_WAIT_FOR_ID_MS` / `REVIEW_CHECK_RUN_WAIT_POLL_MS` | 15000 / 100 — poll for a peer-started check run id before giving up | -| `REVIEW_CI_SUMMARY_WAIT_MS` / `REVIEW_CI_SUMMARY_WAIT_POLL_MS` / `REVIEW_CI_SUMMARY_MAX_FAILURES` | 15000 / 2000 / 3 — CI summary gate wait, poll, and max failing checks | -| `REVIEW_CI_SUMMARY_LOG_MAX_BYTES` / `REVIEW_CI_SUMMARY_LOG_PER_JOB_MAX_CHARS` / `REVIEW_CI_SUMMARY_LOG_MAX_JOBS` | 24000 / 12000 / 3 — condensed Actions log caps for the CI-summary LLM call | -| `REVIEW_CI_SUMMARY_FETCH_CONCURRENCY` / `REVIEW_CI_SUMMARY_LOG_RAW_TAIL_MULTIPLE` | 4 / 4 — parallel annotation and job-log fetches; raw log intake window is this many times the per-job char budget | -| `REVIEW_CI_SUMMARY_HEADLINE_MAX_CHARS` / `REVIEW_CI_SUMMARY_REASON_MAX_CHARS` / `REVIEW_CI_SUMMARY_FIX_HINT_MAX_CHARS` | 240 / 400 / 280 — model-authored CI field caps | -| `REVIEW_CI_SUMMARY_GRANT_CHECKS` / `REVIEW_CI_SUMMARY_GRANT_ACTIONS` / `REVIEW_CI_SUMMARY_UNAVAILABLE` | User-visible CI-row copy when Checks/Actions permission is missing, or status fetch fails | -| `REVIEW_CI_SUMMARY_INCOMPLETE` | CI-row copy when the retrieved check-run page is incomplete | -| `REVIEW_SIZE_TIER_*` | Advisory small/medium/large tier thresholds | -| `REVIEW_RISK_PATH_PATTERNS` | Path categories for trusted review context | -| `REVIEW_FINDING_FOOTNOTE_INLINE` / `REVIEW_FINDING_FOOTNOTE_SUMMARY` / `REVIEW_FINDING_FOOTNOTE_SUMMARY_P3` | Finding row footnotes (P3 summary-only points at Fix all) | -| `REVIEW_FINDINGS_NONE` | Empty findings table cell | -| `REVIEW_SECURITY_DEFAULT` | Default security row when null | -| `AGENT_FIX_PROMPT_ACCORDION_SUMMARY` | Review summary accordion title for the aggregate agent fix prompt | -| `MAX_REVIEW_FOLLOW_UPS` | 5 | -| `REVIEW_FINDING_TITLE_MAX_CHARS` | 80 | -| `REVIEW_FINDING_DETAIL_MAX_CHARS` | 4000 | -| `REVIEW_FINDING_FIX_PROMPT_MAX_CHARS` | 2000 | -| `REVIEW_FINDING_SUGGESTED_CODE_MAX_CHARS` | 2000 | -| `REVIEW_OVERVIEW_MAX_CHARS` | 8000 | -| `REVIEW_OVERVIEW_COMPACT_MAX_CHARS` | 500 | -| `REVIEW_SECURITY_CONCERNS_MAX_CHARS` | 4000 | -| `REVIEW_FOLLOW_UP_MAX_CHARS` | 2000 | -| `REVIEW_SUMMARY_BODY_MAX_CHARS` | 60000 | -| `REVIEW_SUMMARY_COMPACTION_NOTE` | Public note when summary is compacted | -| `REVIEW_SUMMARY_FINDINGS_OMITTED_SUFFIX` | Public note when finding rows are omitted | -| `MAX_REVIEW_PAYLOAD_FINDINGS` | 128 | -| `MAX_SPECIALIST_FINDINGS` | 20 findings per specialist report | -| `MAX_INLINE_REVIEW_COMMENTS` | 50 | -| `MAX_THREAD_PUBLISH_CALLS` | 8 incremental COMMENT reviews per orchestrated run | -| `REVIEW_FINALIZATION_WINDOW_MS` | 30000 reserved after model work for abort, durable writes, summary, checks, status, and labels | -| `REVIEW_CANCEL_POLL_INTERVAL_MS` | 2000; how often a running review polls durable cancel state while specialists run | -| `REVIEW_SEVERITY_RANK` | P0–P3 ordering | -| Label prefixes | `LABEL_REVIEW_SIZE_PREFIX`, `LABEL_SECURITY_CONCERN`, `LABEL_CATEGORY_PREFIX` | -| `REVIEW_FINDING_FINGERPRINT_LINE_BUCKET_SIZE` | 50 | -| `REPO_POLICY_DIRNAME` | `.pr-agent` directory at checkout root | -| `REPO_POLICY_EXTENSION` | `.mdc` | -| `MAX_REPO_POLICY_BYTES` | 32768 (aggregate content across accepted rules) | -| `MAX_REPO_POLICY_FILE_BYTES` | 8192 | -| `MAX_REPO_POLICY_FILES` | 20 | -| `MAX_REPO_POLICY_PATH_PATTERN_CHARS` | 200 | -| `MAX_REPO_POLICY_INSTRUCTION_CHARS` | 1000 | -| `AGENT_INSTRUCTION_FILENAMES` | `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` (repo-root load order) | -| `MAX_AGENT_INSTRUCTION_BYTES` | 65536 (aggregate content across accepted root files) | -| `MAX_AGENT_INSTRUCTION_FILE_BYTES` | 32768 | +| Symbol | Role | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `REVIEW_SUMMARY_SENTINEL` | PR conversation summary marker | +| `LEGACY_REVIEW_SUMMARY_SENTINELS` | Historical review summary markers retained for recognition. Defined in `src/settings/legacyReviewLenses.ts` (not re-exported from `constants.ts`). | +| `REVIEW_POINTER_BODY` | Legacy Files-tab stub copy retained for recognition / repeat-no-bugs fallback | +| `LEGACY_REVIEW_POINTER_BODIES` | Historical files-tab pointer text retained for recognition. Defined in `src/settings/legacyReviewLenses.ts` (not re-exported from `constants.ts`). | +| `REVIEW_POINTER_NOTE_LEAD` | Legacy first-publish pointer NOTE body retained for recognition | +| `REVIEW_SIZES` | Review size scale (`XS`–`XXL`) for the Size row and `size:` label | +| `REVIEW_OVERVIEW_ALERT` / `REVIEW_FAILURE_ALERT` | GitHub alert types (`NOTE`, `CAUTION`) | +| `REVIEW_PROGRESS_NOTE` | In-progress NOTE body | +| `REVIEW_PROGRESS_QUEUED_NOTE` | Queued progress stub NOTE body (before the review worker claims the work item) | +| `REVIEW_PROGRESS_QUEUE_LABEL` | Queued progress stub table label for wait-queue rank (`Queue`) | +| `reviewProgressCancelledNote` / `reviewCancelLastError` / `reviewCancelAttributionForClosedPr` / `sanitizeGithubLogin` / `ReviewCancelAttribution` | Cancelled progress stub notice, work-item last_error, closed-PR attribution, and login sanitizer | +| `REVIEW_PROGRESS_SOURCE_AUTO` / `REVIEW_PROGRESS_SOURCE_SLASH` | Progress table source labels | +| `LIGHTWEIGHT_REVIEW_COMPLETION_*` | Docs-only auto-review skip copy | +| `REVIEW_CHECK_RUN_RESERVATION_STALE_MS` | 300000 | +| `REVIEW_CHECK_RUN_WAIT_FOR_ID_MS` / `REVIEW_CHECK_RUN_WAIT_POLL_MS` | 15000 / 100 — poll for a peer-started check run id before giving up | +| `REVIEW_CI_SUMMARY_WAIT_MS` / `REVIEW_CI_SUMMARY_WAIT_POLL_MS` / `REVIEW_CI_SUMMARY_MAX_FAILURES` | 15000 / 2000 / 3 — CI summary gate wait, poll, and max failing checks | +| `REVIEW_CI_SUMMARY_LOG_MAX_BYTES` / `REVIEW_CI_SUMMARY_LOG_PER_JOB_MAX_CHARS` / `REVIEW_CI_SUMMARY_LOG_MAX_JOBS` | 24000 / 12000 / 3 — condensed Actions log caps for the CI-summary LLM call | +| `REVIEW_CI_SUMMARY_FETCH_CONCURRENCY` / `REVIEW_CI_SUMMARY_LOG_RAW_TAIL_MULTIPLE` | 4 / 4 — parallel annotation and job-log fetches; raw log intake window is this many times the per-job char budget | +| `REVIEW_CI_SUMMARY_HEADLINE_MAX_CHARS` / `REVIEW_CI_SUMMARY_REASON_MAX_CHARS` / `REVIEW_CI_SUMMARY_FIX_HINT_MAX_CHARS` | 240 / 400 / 280 — model-authored CI field caps | +| `REVIEW_CI_SUMMARY_GRANT_CHECKS` / `REVIEW_CI_SUMMARY_GRANT_ACTIONS` / `REVIEW_CI_SUMMARY_UNAVAILABLE` | User-visible CI-row copy when Checks/Actions permission is missing, or status fetch fails | +| `REVIEW_CI_SUMMARY_INCOMPLETE` | CI-row copy when the retrieved check-run page is incomplete | +| `REVIEW_SIZE_TIER_*` | Advisory small/medium/large tier thresholds | +| `REVIEW_RISK_PATH_PATTERNS` | Path categories for trusted review context | +| `REVIEW_FINDING_FOOTNOTE_INLINE` / `REVIEW_FINDING_FOOTNOTE_SUMMARY` / `REVIEW_FINDING_FOOTNOTE_SUMMARY_P3` | Finding row footnotes (P3 summary-only points at Fix all) | +| `REVIEW_FINDINGS_NONE` | Empty findings table cell | +| `REVIEW_SECURITY_DEFAULT` | Default security row when null | +| `AGENT_FIX_PROMPT_ACCORDION_SUMMARY` | Review summary accordion title for the aggregate agent fix prompt | +| `MAX_REVIEW_FOLLOW_UPS` | 5 | +| `REVIEW_FINDING_TITLE_MAX_CHARS` | 80 | +| `REVIEW_FINDING_DETAIL_MAX_CHARS` | 4000 | +| `REVIEW_FINDING_FIX_PROMPT_MAX_CHARS` | 2000 | +| `REVIEW_FINDING_SUGGESTED_CODE_MAX_CHARS` | 2000 | +| `REVIEW_OVERVIEW_MAX_CHARS` | 8000 | +| `REVIEW_OVERVIEW_COMPACT_MAX_CHARS` | 500 | +| `REVIEW_SECURITY_CONCERNS_MAX_CHARS` | 4000 | +| `REVIEW_FOLLOW_UP_MAX_CHARS` | 2000 | +| `REVIEW_SUMMARY_BODY_MAX_CHARS` | 60000 | +| `REVIEW_SUMMARY_COMPACTION_NOTE` | Public note when summary is compacted | +| `REVIEW_SUMMARY_FINDINGS_OMITTED_SUFFIX` | Public note when finding rows are omitted | +| `MAX_REVIEW_PAYLOAD_FINDINGS` | 128 | +| `MAX_SPECIALIST_FINDINGS` | 20 findings per specialist report | +| `MAX_INLINE_REVIEW_COMMENTS` | 50 | +| `MAX_THREAD_PUBLISH_CALLS` | 8 incremental COMMENT reviews per orchestrated run | +| `REVIEW_FINALIZATION_WINDOW_MS` | 30000 reserved after model work for abort, durable writes, summary, checks, status, and labels | +| `REVIEW_CANCEL_POLL_INTERVAL_MS` | 2000; how often a running review polls durable cancel state while specialists run | +| `REVIEW_SEVERITY_RANK` | P0–P3 ordering | +| Label prefixes | `LABEL_REVIEW_SIZE_PREFIX`, `LABEL_SECURITY_CONCERN`, `LABEL_CATEGORY_PREFIX` | +| `REVIEW_FINDING_FINGERPRINT_LINE_BUCKET_SIZE` | 50 | +| `REPO_POLICY_DIRNAME` | `.pr-agent` directory at checkout root | +| `REPO_POLICY_EXTENSION` | `.mdc` | +| `MAX_REPO_POLICY_BYTES` | 32768 (aggregate content across accepted rules) | +| `MAX_REPO_POLICY_FILE_BYTES` | 8192 | +| `MAX_REPO_POLICY_FILES` | 20 | +| `MAX_REPO_POLICY_PATH_PATTERN_CHARS` | 200 | +| `MAX_REPO_POLICY_INSTRUCTION_CHARS` | 1000 | +| `AGENT_INSTRUCTION_FILENAMES` | `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` (repo-root load order) | +| `MAX_AGENT_INSTRUCTION_BYTES` | 65536 (aggregate content across accepted root files) | +| `MAX_AGENT_INSTRUCTION_FILE_BYTES` | 32768 | #### Per-repo policy rules (`.pr-agent/*.mdc`) @@ -366,15 +368,15 @@ Writing policy is computed once per description run from workspace size stats (` ### Ask safety -| Symbol | Default | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `MAX_ASK_QUESTION_CHARS` | 8192 | -| `MAX_ASK_THREAD_TRANSCRIPT_CHARS` | 24000 | -| `ASK_META_REFUSAL` | meta-probe reply | -| `BOT_META_PATTERNS` | regex set | -| `BOT_SECRET_PATTERNS` | outbound redaction for auth headers, provider keys, JWTs, and secret-shaped tokens | -| `SENSITIVE_PATH_PATTERNS` | shared sensitive-path policy for ask reads, verification search, and triage reads, search, writes, staging, and commits | -| `TRIAGE_CONTROL_PATH_PATTERNS` | control-plane paths blocked by triage workspace reads, search, writes, staging, and commits, and by verification search | +| Symbol | Default | +| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `MAX_ASK_QUESTION_CHARS` | 8192 | +| `MAX_ASK_THREAD_TRANSCRIPT_CHARS` | 24000 | +| `ASK_META_REFUSAL` | meta-probe reply | +| `BOT_META_PATTERNS` | regex set | +| `BOT_SECRET_PATTERNS` | outbound redaction for auth headers, provider keys, JWTs, and secret-shaped tokens | +| `SENSITIVE_PATH_PATTERNS` | shared sensitive-path policy for ask reads, verification search, and triage reads, search, writes, staging, and commits | +| `TRIAGE_CONTROL_PATH_PATTERNS` | control-plane paths blocked by triage workspace reads, search, writes, staging, and commits, and by verification search. Defined in `src/agent/triage/triageWritePolicy.ts`. | ### GitHub API diff --git a/docs/cursor-cloud.md b/docs/cursor-cloud.md index f299e355..7fd098f2 100644 --- a/docs/cursor-cloud.md +++ b/docs/cursor-cloud.md @@ -8,7 +8,7 @@ Operator setup for Cursor Cloud VMs. Not loaded into ADR 0019 trusted review con | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | Postgres 16 | `docker run -d --name pr-agent-postgres -e POSTGRES_DB=pr_agent -e POSTGRES_USER=pr_agent -e POSTGRES_PASSWORD=pr_agent -p 5432:5432 postgres:16-alpine` | Required for both web and worker roles | | Web (webhook intake) | `ROLE=web nub src/index.ts` | Listens on `PORT` (default `3000`; `7224` in `.env.example` and Compose); `GET /health` returns `ok`; `GET /ready` pings Postgres | -| Worker (agent work) | `ROLE=worker nub src/index.ts` | Processes reviews, descriptions, asks, triage, verification, CI refresh, and retention | +| Worker (agent work) | `ROLE=worker nub src/index.ts` | Processes reviews, descriptions, asks, triage, verification, CI refresh, retention, and code-index-build | ## Gotchas diff --git a/docs/features.md b/docs/features.md index 89e96580..e5be9548 100644 --- a/docs/features.md +++ b/docs/features.md @@ -34,6 +34,5 @@ Notes: `DESCRIPTION_GENERATE_TITLE`, and the old tuning knobs) are ignored; use `FEATURE_*` only. There are no aliases. -Defaults reproduce the pre-revision out-of-the-box behavior exactly. CI enforces that every `FEATURE_*` key is documented here ([`test/settingsInventory.test.ts`](../test/settingsInventory.test.ts)). diff --git a/docs/operations.md b/docs/operations.md index dae2da68..fc5a972e 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -28,7 +28,7 @@ Architecture: [ADR 0006](adr/0006-durable-agent-work.md). - **Review pointer link:** on the second and later orchestrated runs for a PR, the Files-tab pointer links to the existing **review summary comment** when it can be verified. The first completed summary uses plain text only. - **CI summary:** the progress stub and completed summary include a **CI** gate row for external checks on the PR head (excluding PR Agent’s own check). Ack uses a lightweight non-LLM snapshot. At publish, the worker waits/polls (`REVIEW_CI_SUMMARY_WAIT_*`), selects one condensed, redacted, size-bounded CI context when CI is red (Actions job logs, or check output if logs are unavailable), and runs a small LLM turn to author `headline` / failure `reason`+`fixHint` (server still owns status facts, check-run completeness, and HTML rendering). On a red head, annotation and job-log fetches run concurrently (`REVIEW_CI_SUMMARY_FETCH_CONCURRENCY`); workflow runs are filtered to the reviewed head before job listing, with an early exit at `REVIEW_CI_SUMMARY_LOG_MAX_JOBS`; raw logs are bounded to a failure-preserving intake window (`REVIEW_CI_SUMMARY_LOG_RAW_TAIL_MULTIPLE` × the per-job char budget: tail when it has an error signal, otherwise a window that still includes the last error line) before condensation. If CI is still pending at publish, the row stays pending; a later `workflow_run` or `check_suite` **completed** webhook enqueues a CI-refresh job that edits only the CI cell on the matching **review summary comment** for that head SHA (no full re-review). A refresh that arrives while a review is still queued or running is retained and retried on the same lane until it can patch that head or the attempt cap is exhausted. An incomplete check-run page (the retrieval cap) is **unavailable**, not passing or none, and is not a missing-Checks error. Known failures in that partial view stay failing; the headline notes the partial view. A later complete poll or refresh can replace the snapshot. Missing **Checks: Read** shows a grant-Checks row; missing **Actions: Read** on a failing head keeps the failure row and adds a grant-Actions note. The review still publishes either way. Caps: `REVIEW_CI_SUMMARY_*` in `reviewConstants.ts`. See [ADR 0018](adr/0018-llm-authored-ci-summary.md). - **Review map link:** the summary links to the PR description's **review map** only when that section was published (read-first map mode). Short omit-mode descriptions have no map and no summary link. -- **Worker concurrency:** review, ask, acknowledgement, CI-refresh, description, triage, and verification jobs are capped per process by **`REVIEW_CONCURRENCY`** (default `2`), **`ASK_CONCURRENCY`** (default `1`), **`ACK_CONCURRENCY`** (default `2`, also used for `agent-work-ci-refresh`), **`DESCRIPTION_CONCURRENCY`** (default `1`), **`TRIAGE_CONCURRENCY`** (default `1`), and **`VERIFICATION_CONCURRENCY`** (default `1`) via pg-boss worker `localConcurrency` ([`src/agentWork/worker.ts`](../src/agentWork/worker.ts)). Multi-replica deployments remain at-least-once at the worker layer. **Effective cluster admission** for a queue is approximately `replicas × localConcurrency` (plus `INSTALLATION_GROUP_CONCURRENCY` for group-scoped lanes). +- **Worker concurrency:** review, ask, acknowledgement, CI-refresh, description, triage, and verification jobs are capped per process by **`REVIEW_CONCURRENCY`** (default `2`), **`ASK_CONCURRENCY`** (default `1`), **`ACK_CONCURRENCY`** (default `2`, also used for `agent-work-ci-refresh`), **`DESCRIPTION_CONCURRENCY`** (default `1`), **`TRIAGE_CONCURRENCY`** (default `1`), and **`VERIFICATION_CONCURRENCY`** (default `1`) via pg-boss worker `localConcurrency` ([`src/agentWork/worker.ts`](../src/agentWork/worker.ts)). Retention runs at `localConcurrency` 1. `code-index-build` is always consumed at `CODE_INDEX_BUILD_CONCURRENCY` (1). Worker `/ready` fails if that consumer is missing, even when `CODE_INDEX_MODE=off`. Multi-replica deployments remain at-least-once at the worker layer. **Effective cluster admission** for a queue is approximately `replicas × localConcurrency` (plus `INSTALLATION_GROUP_CONCURRENCY` for group-scoped lanes). - **GitHub rate-limit circuit (per run + shared MVP):** after three consecutive primary/secondary rate-limit retries are exhausted inside a review/ask run, nonessential GitHub tools short-circuit for the rest of that run; a successful GitHub request resets the consecutive-failure counter. Emits `github_rate_limit_circuit_opened` logs and `rate_limit_circuit_opened` review metrics. Opening a local circuit also upserts a **Postgres shared circuit** keyed by `installation_id` (`github_installation_rate_limit_circuits`: `open_until`, `last_error_kind`, default cooldown `SHARED_RATE_LIMIT_CIRCUIT_COOLDOWN_MS` = 60s). Other workers check that row at review/ask start and hydrate their local circuit open (`github_shared_rate_limit_circuit_honored`) so replicas do not immediately re-burst the same installation. Full Redis Bottleneck clustering remains optional ([ADR 0004](adr/0004-github-api-rate-limits.md)). - **Tool surface:** production review and ask agents use the local workspace tools `listChangedFiles`, `readWorkspaceFile`, `searchWorkspace`, `getWorkspaceDiff`, `getWorkspaceBlame`, and `resolveSymbol` (ephemeral per-run symbol index). When `CODE_INDEX_MODE=fts`, reviews and ask also expose `searchCodeIndex` (Postgres FTS navigation hints only — `readWorkspaceFile` remains mandatory before citing). Ask uses a ready snapshot for the PR head when one exists and otherwise registers the same tool with `{ unavailable: true }`. Verification uses the same prepared Local PR workspace: `readWorkspaceFile`, workspace `grepLiteral` search, and cached GitHub PR diffs via `getWorkspaceDiff`. Plus two Context7 tools. The review orchestrator hands off through `submit_specialist_brief`, judges reports with `publish_thread`, and finishes through `publish_summary`. Specialists submit one `submit_findings_report`. GitHub reads and writes remain server-owned. See [ADR 0011](adr/0011-agent-runner-local-pr-workspace.md), [ADR 0012](adr/0012-full-context-local-pr-workspace.md), and [ADR 0002](adr/0002-context7-docs-tool.md). - **Library docs lookup:** review and ask agents get Context7 tools (`resolveLibraryId`, `getLibraryDocs`) that use the fixed `https://context7.com/api` endpoint. The shared outbound policy validates library identifiers, trims and bounds query/topic text, redacts secret-shaped responses, and rejects URLs, multiline/prompt/comment/source/tool-output content before URL construction. **`CONTEXT7_API_KEY`** is optional and is sent only as `Authorization: Bearer ...`; empty keys use anonymous fallback. See [ADR 0002](adr/0002-context7-docs-tool.md). diff --git a/site/components/alternatives.tsx b/site/components/alternatives.tsx index e9bc029b..2ae21dbd 100644 --- a/site/components/alternatives.tsx +++ b/site/components/alternatives.tsx @@ -12,7 +12,8 @@ export function Alternatives() {

CodeRabbit, Greptile, Cursor Bugbot, and Macroscope sell hosted review. PR Agent is for - teams that want the reviewer, the AI keys, and the review data in their own account. + teams that want to run the reviewer, hold the AI keys, and choose the provider that receives + review context.

diff --git a/site/components/github-output/description-block.tsx b/site/components/github-output/description-block.tsx index c84c1551..fc0a7daa 100644 --- a/site/components/github-output/description-block.tsx +++ b/site/components/github-output/description-block.tsx @@ -1,4 +1,4 @@ -import { GhCode, GhDetails, OutputFrame } from "@/components/github-output/primitives"; +import { GhCode, OutputFrame } from "@/components/github-output/primitives"; /** Mirrors `renderDescriptionAgentBlock` under `## PR Agent Description`. */ export function DescriptionBlockMock() { @@ -26,15 +26,12 @@ export function DescriptionBlockMock() {
-

File Walkthrough

- -

- src/settings/constants.ts -

-
    -
  • Expose REVIEW_CONCURRENCY default
  • -
-
+

Review map

+
    +
  1. + src/settings/constants.ts: Expose REVIEW_CONCURRENCY default +
  2. +
); diff --git a/site/lib/content.ts b/site/lib/content.ts index f68081e9..31d96f03 100644 --- a/site/lib/content.ts +++ b/site/lib/content.ts @@ -31,15 +31,15 @@ export const FEATURES: FeatureItem[] = [ { title: "It reads what actually changed", detail: - "PR Agent looks at the branch and the changes, then hunts for bugs and correctness issues. When risky APIs show up, it also checks for security problems.", + "PR Agent looks at the branch and the changes. Every review runs four specialists for correctness, security, quality, and tests.", cue: "Review runs on your servers", summary: "Reviews run on your servers", }, { title: "Feedback shows up on the pull request", detail: - "Notes appear next to the changed lines, plus a short summary in the conversation. Want more? Comment /describe, /ask, /triage, or mention the bot. Replies stay in the same thread.", - cue: "/review · /describe · /ask · /triage", + "Notes appear next to the changed lines, plus a short summary in the conversation. Want more? Comment /describe, /ask, /triage, /verify, or mention the bot. Replies stay in the same thread.", + cue: "/review · /describe · /ask · /triage · /verify", summary: "Reviews and replies posted in the pull request", }, { @@ -74,15 +74,21 @@ export const CAPABILITIES: CapabilityItem[] = [ detail: "Get an answer in the same thread, right where the code lives.", }, { - title: "Revisit earlier findings on the pull request", + title: "Apply fixes for open bot findings", trigger: "Comment /triage, or /triage preview then /triage all, on the pull request", detail: "Preview the would-be diff, then apply the approved set. Bare /triage still fixes without a preview.", }, { - title: "Skip AI review when the PR is only docs", - trigger: "Runs automatically on small documentation-only changes", - detail: "Docs-only pull requests take a lighter path instead of a full review.", + title: "Recheck open findings after a new push", + trigger: "Runs when the pull request gets new commits, or when you comment /verify", + detail: "Fixed findings close quietly. A failed recheck leaves one note on the review.", + }, + { + title: "Take a lighter auto path on docs-only PRs", + trigger: "Runs automatically when every changed path matches the docs allowlist", + detail: + "Auto review posts a lightweight summary instead of the full orchestrated run. A truncated file list never qualifies. Comment /review still runs the full review.", }, ]; @@ -108,7 +114,7 @@ export const PRICING_PLANS: PricingPlan[] = [ title: "You own the full stack", price: "Your security rules apply", detail: - "Run it inside your network, choose your AI provider, and keep review traffic under your policies.", + "Run it inside your network, hold the model keys, and choose the provider that receives review context.", }, ]; @@ -244,12 +250,14 @@ export const APP_FIELDS = [ }, { label: "Subscribe to", - value: "Pull requests · Issue comments · Pull request review comments", + value: + "Pull requests · Issue comments · Pull request review comments · Workflow runs · Check suites", mono: false, }, { label: "Permissions", - value: "Issues and Pull requests: read/write · Contents: read/write · Metadata: read", + value: + "Issues and Pull requests: read/write · Contents: read/write · Metadata: read · Checks: read/write · Actions: read", mono: false, }, ] as const; @@ -258,9 +266,11 @@ export const SLASH_COMMANDS = [ { cmd: "/review", tip: "Run a full review on the changes" }, { cmd: "/describe", tip: "Write a readable summary into the PR body" }, { cmd: "/ask …", tip: "Ask a question about the code in that thread" }, - { cmd: "/triage", tip: "Preview with /triage preview, apply with /triage all" }, + { cmd: "/triage", tip: "Apply-mode fix for open bot findings. No preview required." }, { cmd: "/triage preview", tip: "Show the would-be unified diff. Nothing is pushed." }, { cmd: "/triage all", tip: "Apply the previewed set. Optional exclude ." }, + { cmd: "/verify", tip: "Recheck open findings against the current head" }, + { cmd: "/cancel", tip: "Stop a queued or running review" }, ] as const; export const COMPOSE_SNIPPET = `cp .env.example .env diff --git a/site/lib/llmsKnowledge.ts b/site/lib/llmsKnowledge.ts index 8bc2f471..440394a2 100644 --- a/site/lib/llmsKnowledge.ts +++ b/site/lib/llmsKnowledge.ts @@ -142,6 +142,7 @@ export const KNOWLEDGE_CHUNKS: readonly KnowledgeChunk[] = [ "describe", "ask", "triage", + "verify", "cancel", "help", "comment", @@ -215,7 +216,7 @@ export const KNOWLEDGE_CHUNKS: readonly KnowledgeChunk[] = [ "ROLE=web accepts signed webhooks, writes work to Postgres, and enqueues jobs. It returns 200 once that write succeeds.", "ROLE=worker runs the queues: reactions, progress comments, model sessions, and everything posted back to the PR.", "Flow: GitHub webhooks → web /webhooks → Postgres webhook_events dedupe → agent_work_items → pg-boss enqueue.", - "Queues: ack, ci-refresh, review, ask, description, triage, verification, retention.", + "Queues: ack, ci-refresh, review, ask, description, triage, verification, retention, code-index-build.", "Ack worker posts the eyes reaction and the review progress stub.", "Review runs four specialists (correctness, security, quality, tests) under one orchestrator.", "A finding is published only when it meets the causal-publication contract: one atomic problem, a concrete trigger, PR-introduced or PR-exposed harm or a precise unprotected regression, an observable consequence, ledger-authorized reviewed-head evidence, and a bounded fix.", diff --git a/site/public/llms.txt b/site/public/llms.txt index 6d5de0e3..6fea48a0 100644 --- a/site/public/llms.txt +++ b/site/public/llms.txt @@ -68,13 +68,14 @@ Landing-page capability copy: - Catch basics before a human opens the change. Runs when a pull request opens, or when you comment /review. Comments land next to the lines that need attention. - Turn a blank PR body into a readable summary. Runs when a pull request opens, or when you comment /describe. Summary bullets and an optional diagram go into the PR body. - Ask code questions without leaving GitHub. Comment /ask … or mention the bot with your question. Get an answer in the same thread, right where the code lives. -- Revisit earlier findings on the pull request. Comment /triage, or /triage preview then /triage all, on the pull request. Preview the would-be diff, then apply the approved set. Bare /triage still fixes without a preview. -- Skip AI review when the PR is only docs. Runs automatically on small documentation-only changes. Docs-only pull requests take a lighter path instead of a full review. +- Apply fixes for open bot findings. Comment /triage, or /triage preview then /triage all, on the pull request. Preview the would-be diff, then apply the approved set. Bare /triage still fixes without a preview. +- Recheck open findings after a new push. Runs when the pull request gets new commits, or when you comment /verify. Fixed findings close quietly. A failed recheck leaves one note on the review. +- Take a lighter auto path on docs-only PRs. Runs automatically when every changed path matches the docs allowlist. Auto review posts a lightweight summary instead of the full orchestrated run. A truncated file list never qualifies. Comment /review still runs the full review. Landing-page review flow copy: - Deploy once on servers you control: Install PR Agent beside the rest of your stack. Your GitHub credentials and AI keys stay in your account, not a vendor dashboard. - Someone opens a pull request: PR Agent notices and starts a review. Your team sees a reaction on the pull request so everyone knows work has begun. -- It reads what actually changed: PR Agent looks at the branch and the changes, then hunts for bugs and correctness issues. When risky APIs show up, it also checks for security problems. -- Feedback shows up on the pull request: Notes appear next to the changed lines, plus a short summary in the conversation. Want more? Comment /describe, /ask, /triage, or mention the bot. Replies stay in the same thread. +- It reads what actually changed: PR Agent looks at the branch and the changes. Every review runs four specialists for correctness, security, quality, and tests. +- Feedback shows up on the pull request: Notes appear next to the changed lines, plus a short summary in the conversation. Want more? Comment /describe, /ask, /triage, /verify, or mention the bot. Replies stay in the same thread. - Honest limits when the change is huge: Docs-only pull requests can take a lighter path. Very large changes may get a partial review, and PR Agent says what it could not cover instead of faking completeness. ## Deploy with Docker Compose @@ -101,7 +102,7 @@ Two processes must run together. ROLE=web accepts signed webhooks, writes work to Postgres, and enqueues jobs. It returns 200 once that write succeeds. ROLE=worker runs the queues: reactions, progress comments, model sessions, and everything posted back to the PR. Flow: GitHub webhooks → web /webhooks → Postgres webhook_events dedupe → agent_work_items → pg-boss enqueue. -Queues: ack, ci-refresh, review, ask, description, triage, verification, retention. +Queues: ack, ci-refresh, review, ask, description, triage, verification, retention, code-index-build. Ack worker posts the eyes reaction and the review progress stub. Review runs four specialists (correctness, security, quality, tests) under one orchestrator. A finding is published only when it meets the causal-publication contract: one atomic problem, a concrete trigger, PR-introduced or PR-exposed harm or a precise unprotected regression, an observable consequence, ledger-authorized reviewed-head evidence, and a bounded fix. @@ -115,7 +116,7 @@ Web does not create installation tokens or post to the PR. Workers do that. Software is free. $0 from PR Agent. No credit card. No per-seat fee. Open source under MIT. You pay your own vendors. Hosting and AI usage only. Cover your server, database, and model bills. Add more developers without raising your PR Agent bill. -You own the full stack. Your security rules apply. Run it inside your network, choose your AI provider, and keep review traffic under your policies. +You own the full stack. Your security rules apply. Run it inside your network, hold the model keys, and choose the provider that receives review context. ## Model providers