Skip to content

feat(github): expand PR review context#91

Merged
chubes4 merged 1 commit into
mainfrom
feat-pr-review-context-expansion
Apr 27, 2026
Merged

feat(github): expand PR review context#91
chubes4 merged 1 commit into
mainfrom
feat-pr-review-context-expansion

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Apr 27, 2026

Summary

  • Adds explicit opt-in expanded context to pull_review_context packets without changing the default patch-first shape.
  • Fetches full changed-file, optional base-file, and explicit context-path contents through GitHub API helpers with file-count, per-file, and total-character guardrails.

Changes

  • Adds expanded_context with separate changed_files, extra_files, skipped, limits, and summary sections.
  • Wires fetch-handler settings for include_file_contents, include_base_contents, context_paths, and context size limits.
  • Extends the PR review context smoke test to cover default output, explicit expansion, truncation, skipped metadata, total limits, and packet shape separation.

Tests

  • php -l inc/Abilities/GitHubAbilities.php && php -l inc/Handlers/GitHub/GitHub.php && php -l inc/Handlers/GitHub/GitHubSettings.php && php -l tests/smoke-github-pr-review-context.php
  • php tests/smoke-github-pr-review-context.php
  • git diff --check
  • homeboy audit data-machine-code --path /Users/chubes/Developer/data-machine-code@feat-pr-review-context-expansion --changed-since origin/main

homeboy lint data-machine-code --path /Users/chubes/Developer/data-machine-code@feat-pr-review-context-expansion was also attempted, but the broad lint currently fails with 352 existing PHPStan findings across GitHubAbilities, Workspace, and smoke tests, including pre-existing undefined-static-method reports for methods present in the same class.

Closes #90

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted the implementation and smoke coverage; Chris remains responsible for review and validation.

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.

Add bounded context expansion to GitHub PR review fetch

1 participant