Skip to content

Conversation

@lightninglu10
Copy link
Contributor

@lightninglu10 lightninglu10 commented Jan 21, 2026

Summary

Make the review agent more autonomous and agentic by letting it fetch diffs, explore the repo, and use web search/docs tools.

Changes

  • Add web_search and web_fetch tools backed by jsdom and Turndown to retrieve and clean external documentation
  • Wire new tools into the agent system prompt and tools registry
  • Remove explicit diff plumbing; have the agent fetch PR diffs itself via gh CLI
  • Simplify configuration and local runner to require only a PR number
  • Update ReviewService to rely on agentic diff exploration instead of pre-filtered diffs
  • Extend ESLint globals and Jest transform config for new dependencies
  • Add configuration and tests around the new behavior and error paths

@lightninglu10 lightninglu10 self-assigned this Jan 21, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR makes the review agent more fully agentic and adds external research capabilities.

Key areas reviewed

  • Action inputs and GitHub Action wiring (added enable_web_search, environment wiring)
  • Agent system prompt and agent entrypoint changes (agent now fetches diffs and can use new tools)
  • New tools implementation (web_fetch and web_search built on jsdom + Turndown + DuckDuckGo HTML endpoint)
  • Configuration and local runner simplification (no more diff plumbing; PR-number based)
  • ReviewService orchestration and removal of diff prefiltering
  • Type definitions and tests updated for new behavior

Notes & rationale

  • The new tools are guarded via the ENABLE_WEB_SEARCH env var, which is set from the action input; they are only used when the model chooses to, and failures are handled as plain-text error messages, so they are non-breaking.
  • jsdom/turndown usage is encapsulated and Jest is configured to transform their dependencies, with tests mocking them to keep unit tests fast and deterministic.
  • Removing diff pre-filtering in ReviewService shifts responsibility to the agent and tools; existing ignore patterns are still respected via the bash/search tools in the agent system prompt, which is acceptable given the more autonomous design.
  • Config and local runner flows are consistent: both now require only a PR number and rely on gh CLI for diff exploration.

Decision
Approve – the changes are coherent, tested, and improve the agent’s capabilities without introducing obvious correctness or safety issues.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR makes the review agent fully agentic: it now fetches PR context and diffs via gh CLI, explores the repo with new tools (bash, search_repo, dep_graph, fetch_files/snippet), and can optionally use web_fetch/web_search powered by jsdom+turndown. The GitHub Action and local runner are simplified to only require a PR number, and ReviewService is updated to orchestrate the agent without precomputed diffs. Tests and config are updated accordingly.

Reviewed files:

  • .github/workflows/codepress-review.yml
  • action.yml
  • eslint.config.mjs
  • jest.config.js
  • package.json
  • pnpm-lock.yaml
  • src/agent/agent-system-prompt.ts
  • src/agent/index.ts
  • src/agent/tools.ts
  • src/config.ts
  • src/index.ts
  • src/local-review.ts
  • src/review-service.ts
  • src/types.ts
  • test/config.test.ts
  • test/index.test.ts
  • test/review-service.test.ts

Findings:

  • Workflow now also triggers on synchronize; action input and env plumbing for ENABLE_WEB_SEARCH are consistent.
  • Agent prompt and initial instructions clearly describe the new agentic, file-by-file review workflow.
  • Tools layer adds web_fetch/web_search on top of a richer repo exploration API and respects .codepressignore, with good timeouts and truncation.
  • Config, ReviewService, and local runner correctly drop the old diff-based pipeline in favor of PR-number-based orchestration.
  • Jest/ESLint and tests are updated to cover new providers, tools, and behavior; jsdom/turndown are mocked where needed.

I did not find blocking issues in logic, safety, or API design; the changes appear coherent and well tested.

Decision: Approve.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR makes the agent fully agentic: it now fetches PR context and diffs via gh CLI, gains repo-search and web_fetch/web_search tools, and simplifies the action/local runner configuration to require only a PR number.

Key points:

  • System prompt and agent entrypoint are aligned with the new autonomous, file-by-file workflow and todo tracking.
  • Tooling is expanded (bash, dep_graph, fetch_files, fetch_snippet, search_repo, todo, web_fetch, web_search) with sensible safety limits, caching, and .codepressignore awareness.
  • The GitHub Action and ReviewService now pass only PR/context to the agent; diff generation and filtering are delegated to the agent, and tests are updated accordingly.
  • Web tooling is feature-flagged via ENABLE_WEB_SEARCH and guarded in tests by jsdom/turndown mocks.

I did not spot correctness or safety issues in the new behavior, and tests appear to cover the critical flows and configuration paths. Approving as a solid step toward a more autonomous review agent.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Re-reviewing the latest changes that introduce agentic diff exploration, web search/fetch tools, and re-review context wiring.

Since my last approval, the PR has:

  • Added explicit re-review guidance to the system prompt and initial message
  • Wired TriggerContext through the GitHub Action, ReviewService, and agent, including environment propagation
  • Introduced web_fetch and web_search tools using jsdom/Turndown and DuckDuckGo HTML, with sane timeouts and truncation
  • Removed explicit diff plumbing in favor of the agent fetching diffs itself via gh/ bash tools
  • Tightened Jest config to transform jsdom and related dependencies; added types/globals for fetch and DOM types
  • Simplified local-review/config CLI to require only --pr and environment-based configuration, and updated tests accordingly

I carefully checked:

  • Type signatures and TriggerContext propagation for re-review behavior
  • Environment variable usage (TRIGGER_EVENT / IS_RE_REVIEW / PREVIOUS_REVIEW_STATE / PREVIOUS_REVIEW_COMMIT_SHA, ENABLE_WEB_SEARCH)
  • Error-handling and timeouts in web_fetch/web_search, including HTML parsing robustness and truncation
  • Jest and ESLint configuration changes to ensure new dependencies and globals are supported
  • Tests for index.ts, review-service, and config, verifying they match the new behavior and interfaces

I did not find any new blocking issues introduced in this commit range. The new behavior is consistent with the intended design and existing patterns, and the added tests look sound. My previous approval still stands, and this revision further improves the agentic review flow.

Decision: Approve re-review – changes look correct and maintainable.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This re-review updates the autonomous review agent to fetch diffs and repo context itself, adds web_fetch/web_search tools (jsdom + Turndown), and wires in re-review-specific behavior and configuration across the action, ReviewService, and tests.

Key areas reviewed include:

  • System prompt and workflow guidance for file-by-file, tool-driven reviews and re-reviews
  • Agent/tool wiring (including ENABLE_WEB_SEARCH gating and new repo/file/search tools)
  • Action entrypoint behavior for trigger handling, previous-bot-review detection, and env propagation
  • Local runner and config argument simplification (PR-only, no diff plumbing)
  • ReviewService orchestration updates and associated tests
  • Jest/ESLint/package deps and lockfile adjustments for jsdom/web tooling

No new functional issues, security concerns, or test gaps were found in the changes since the last approved revision. The modifications are cohesive, well-tested, and maintain backwards compatibility.

Decision: Approve – previous approval still stands and the incremental changes look solid.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Updates the review agent to be fully agentic: it now fetches diffs and file context via gh CLI and repo tools, adds web_search/web_fetch capabilities using jsdom + Turndown, and wires in re-review awareness based on previous bot reviews. The GitHub Action and local runner have been simplified to pass only PR number and environment, and tests/configs updated accordingly.

Key checks:

  • Verified new tools (fetch_files, fetch_snippet, search_repo, web_fetch, web_search) are wired into the system prompt and tool registry with sensible limits, timeouts, and error handling.
  • Confirmed re-review behavior is consistently described in both the system prompt and initial instructions, and TriggerContext is plumbed from the Action through ReviewService to the agent.
  • Checked Jest and ESLint updates for jsdom/Turndown and new @openai/agents ws dependency are correct; tests for config, index, and ReviewService cover the new behavior.
  • Ensured action inputs include enable_web_search and that env flags (ENABLE_WEB_SEARCH, TRIGGER_EVENT, IS_RE_REVIEW, etc.) are set and consumed appropriately.

No new bugs, security issues, or regressions are apparent in the additional changes since the previous approval, and the behavior improvements are coherent and well-tested.

Decision: Approve.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Incremental update to the autonomous review agent:

  • Adds web_fetch and web_search tools (jsdom + Turndown, DuckDuckGo HTML) and wires them into the toolset with ENABLE_WEB_SEARCH control.
  • Removes explicit diff plumbing so the agent always fetches diffs and file lists itself via gh/ bash tools.
  • Adds richer system prompt guidance for file-by-file reviews and re-reviews, and threads trigger/re-review context from the action through ReviewService into the agent.

New changes since my last review focus on polishing the re-review behavior, tightening the system prompt, and hardening the web tooling and Jest/env wiring. I walked through all touched files (workflow, action entrypoint, agent prompt, tools, config, review-service, and tests) plus the lockfile changes.

I didn’t spot any regressions or logical issues:

  • Re-review detection now correctly keys off previous bot reviews, and the system prompt + initial message match the behavior.
  • Web tools are feature-flagged via ENABLE_WEB_SEARCH and properly mocked in tests; jsdom globals are added to ESLint and Jest transformIgnorePatterns include jsdom’s deps.
  • Local and GitHub runners now consistently require only a PR number; diff filtering is delegated to the agent via gh.

Given this is a re-review of an already-approved PR and the new commit only refines that behavior without introducing risk, I’m happy to keep this approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants