perf(#1924): pass source file contents to review sub-agents - #1926
perf(#1924): pass source file contents to review sub-agents#1926fullsend-ai-coder[bot] wants to merge 3 commits into
Conversation
Site previewPreview: https://7b3f3da0-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsLow
Info
Labels: PR modifies scaffolded review orchestrator skill definitions (SKILL.md, meta-prompt.md, challenger sub-agent) Previous runReviewFindingsMedium
Low
Info
Labels: PR modifies agent harness skill definitions for the review orchestrator. Previous run (2)ReviewFindingsMedium
Low
Info
|
|
🤖 Finished Fix · ❌ Failure · Started 6:23 PM UTC · Completed 6:30 PM UTC |
15408db to
9d13f07
Compare
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
|
🤖 Review · ❌ Terminated · Started 5:51 PM UTC · Ended 6:06 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Review · ✅ Success · Started 5:51 PM UTC · Completed 6:06 PM UTC |
9d13f07 to
8b7635d
Compare
|
/fs-fix |
PR Summary by QodoPass PR-head source file contents into PR review sub-agent context Description
Diagram
High-Level Assessment
Files changed (2)
|
|
🤖 Finished Fix · ✅ Success · Started 6:47 PM UTC · Completed 6:56 PM UTC |
|
🤖 Review · |
Code Review by Qodo
Context used✅ Tickets:
🎫 Review sub-agents should receive source file contents in prompt instead of re-reading from disk✅ Compliance rules (platform):
58 rules✅ Skills:
writing-user-docs, writing-adrs 1.
|
- Filter removed files from contents API fetch loop (404 prevention) - Replace unsafe `for FILE in $(...)` with `while IFS= read -r` loop - Add binary file filtering and API error handling for 1MB limit - Remove redundant HEAD_SHA extraction (reuse from step 1) - Fix heading hierarchy: `####` → `### 2b.` to match `### 2a.` pattern - Update size guard to use API fallback instead of unsafe disk reads - Add per-dimension file selection guidance for large PRs - Align challenger.md constraint with updated meta-prompt.md wording Addresses review feedback on #1926
| ```bash | ||
| # Filter to non-removed, non-binary files | ||
| FETCH_FILES=$(echo "$PR_FILES" \ | ||
| | jq -r '.[] | select(.status != "removed") | .filename' \ |
There was a problem hiding this comment.
[low] logic-error
The bash snippet in step 2b outputs decoded file contents without filename headers or code fences, while steps 3d and 4 expect each file preceded by a #### header and fenced code block. Since this is instructional pseudocode consumed by an LLM orchestrator, the format mismatch is a clarity issue — the orchestrator reads both the fetch script and the formatting instructions.
Suggested fix: Add a note in the snippet that the orchestrator must format the output per steps 3d/4, or add headers to the bash script for clarity.
| limit (the API returns 403 for these); log a warning so the orchestrator | ||
| knows which files were omitted. | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
[low] edge-case
The binary-file extension filter includes .pb.go, which are protobuf-generated Go source files (plain text, not binary). The prose describes the filter as excluding binary files, but .pb.go files are human-readable Go code. Conflating generated files with binary exclusion is inaccurate.
Suggested fix: Either move .pb.go to a separate generated-files filter or update the prose to say binary and generated files.
| by a `### File: <relative-path>` header so sub-agents can identify file | ||
| boundaries. Generated files (lockfiles, vendor/, protobuf output) are | ||
| excluded from the concatenation. | ||
| - `source_files`: full contents of changed files at the PR head revision, |
There was a problem hiding this comment.
[low] pattern-inconsistency
File boundary heading level inconsistency between diff and source_files context package fields. The diff field uses ### File: (h3) for per-file boundaries, while source_files uses #### (h4). The h4 pattern is hierarchically correct; the existing h3 pattern creates sibling sections that break heading hierarchy.
- Filter removed files from contents API fetch loop (404 prevention) - Replace unsafe `for FILE in $(...)` with `while IFS= read -r` loop - Add binary file filtering and API error handling for 1MB limit - Remove redundant HEAD_SHA extraction (reuse from step 1) - Fix heading hierarchy: `####` → `### 2b.` to match `### 2a.` pattern - Update size guard to use API fallback instead of unsafe disk reads - Add per-dimension file selection guidance for large PRs - Align challenger.md constraint with updated meta-prompt.md wording Addresses review feedback on #1926
385900f to
31d45e2
Compare
ralphbean
left a comment
There was a problem hiding this comment.
This is an automated comment. We are moving agent content from internal/scaffold/fullsend-repo/ to https://github.com/fullsend-ai/agents -- changes should be made to agent definitions there going forwards.
|
/fs-fix rebase and fix the comments of the reviewers |
|
🤖 Finished Fix · ✅ Success · Started 10:34 AM UTC · Completed 10:55 AM UTC |
- Add size-guard conditional to bash example so it only fetches files for small PRs (<=20 files, <=5000 lines); large PRs defer to step 3d - Tighten disk-read guidance in meta-prompt.md: distinguish unchanged files (safe to read from disk) from omitted changed files (must use GitHub contents API) - Apply same clarification to challenger.md constraints - Strengthen SKILL.md large-PR fallback text: "must" instead of "should", explicit note that unchanged files are safe from disk Addresses review feedback on #1926
🔧 Fix agent — iteration 2 (human-triggered)Addressed 2 of 3 Qodo review findings (disk fallback wording and size guard mismatch). The third finding (unsafe iteration) was a false positive — the code already uses the safe while-read pattern. Noted ralphbean's repo-migration comment and the rebase request as outside the fix agent's scope. Fixed (2):
Disagreed (3):
Tests: passed Updated by fullsend fix agent |
|
/fs-fix DCO is incorrect, rebase and fix it |
|
🤖 Finished Fix · ✅ Success · Started 10:31 AM UTC · Completed 10:43 AM UTC |
🔧 Fix agent — iteration 3 (human-triggered)Rebased branch onto origin/main with corrected author email on d08cae5. The commit previously used fullsend-code@users.noreply.github.com which the DCO app did not recognize as a bot. Changed to 278716306+fullsend-ai-coder[bot]@users.noreply.github.com to match the other commits. Strategy change at iteration 3: previous iterations likely attempted code-level fixes; this iteration addresses the root cause (commit metadata) via rebase. A force push is required to update the remote branch. Fixed (1):
Tests: passed
Decision points
Updated by fullsend fix agent |
- Filter removed files from contents API fetch loop (404 prevention) - Replace unsafe `for FILE in $(...)` with `while IFS= read -r` loop - Add binary file filtering and API error handling for 1MB limit - Remove redundant HEAD_SHA extraction (reuse from step 1) - Fix heading hierarchy: `####` → `### 2b.` to match `### 2a.` pattern - Update size guard to use API fallback instead of unsafe disk reads - Add per-dimension file selection guidance for large PRs - Align challenger.md constraint with updated meta-prompt.md wording Addresses review feedback on #1926
- Add size-guard conditional to bash example so it only fetches files for small PRs (<=20 files, <=5000 lines); large PRs defer to step 3d - Tighten disk-read guidance in meta-prompt.md: distinguish unchanged files (safe to read from disk) from omitted changed files (must use GitHub contents API) - Apply same clarification to challenger.md constraints - Strengthen SKILL.md large-PR fallback text: "must" instead of "should", explicit note that unchanged files are safe from disk Addresses review feedback on #1926
19603cb to
f5d28d2
Compare
The review orchestrator already fetches full source files of changed paths but did not include them in sub-agent context packages. Sub-agents independently re-read the same files from disk, causing redundant token usage (5-6 reads of the same file across 4 agents) and false positives from reading base-branch code instead of PR head. Changes: - SKILL.md step 2: add orchestrator logic to fetch source file contents at PR head SHA via the GitHub contents API - SKILL.md section 3d: add source_files field to context packages - SKILL.md step 4 Part 4: add "Source files (PR head)" section to the sub-agent prompt template with inline instructions - meta-prompt.md: replace "read full source files" constraint with instruction to use provided source files and avoid redundant reads - Add size guard: for large PRs (>20 files or >5000 lines), include only dimension-relevant files; sub-agents fall back to disk reads Closes #1924
- Filter removed files from contents API fetch loop (404 prevention) - Replace unsafe `for FILE in $(...)` with `while IFS= read -r` loop - Add binary file filtering and API error handling for 1MB limit - Remove redundant HEAD_SHA extraction (reuse from step 1) - Fix heading hierarchy: `####` → `### 2b.` to match `### 2a.` pattern - Update size guard to use API fallback instead of unsafe disk reads - Add per-dimension file selection guidance for large PRs - Align challenger.md constraint with updated meta-prompt.md wording Addresses review feedback on #1926
- Add size-guard conditional to bash example so it only fetches files for small PRs (<=20 files, <=5000 lines); large PRs defer to step 3d - Tighten disk-read guidance in meta-prompt.md: distinguish unchanged files (safe to read from disk) from omitted changed files (must use GitHub contents API) - Apply same clarification to challenger.md constraints - Strengthen SKILL.md large-PR fallback text: "must" instead of "should", explicit note that unchanged files are safe from disk Addresses review feedback on #1926
f5d28d2 to
e417842
Compare
|
Superseeded by fullsend-ai/agents#172 |
The review orchestrator already fetches full source files of changed paths but did not include them in sub-agent context packages. Sub-agents independently re-read the same files from disk, causing redundant token usage (5-6 reads of the same file across 4 agents) and false positives from reading base-branch code instead of PR head. Changes: - SKILL.md step 2b: fetch source file contents at PR head SHA via the GitHub contents API - SKILL.md section 3d: add source_files field to context packages - SKILL.md step 4 Part 4: add "Source files (PR head)" section to the sub-agent prompt template with inline instructions - meta-prompt.md: replace "read full source files" constraint with instruction to use provided source files and avoid redundant reads - challenger.md: align constraint with meta-prompt.md - Size guard: for large PRs (>20 files or >5000 lines), include only dimension-relevant files; sub-agents fall back to API reads Port of fullsend-ai/fullsend#1926. Closes fullsend-ai/fullsend#1924 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
The review orchestrator already fetches full source files of changed paths but did not include them in sub-agent context packages. Sub-agents independently re-read the same files from disk, causing redundant token usage (5-6 reads of the same file across 4 agents) and false positives from reading base-branch code instead of PR head. Changes: - SKILL.md step 2b: fetch source file contents at PR head SHA via the GitHub contents API - SKILL.md section 3d: add source_files field to context packages - SKILL.md step 4 Part 4: add "Source files (PR head)" section to the sub-agent prompt template with inline instructions - meta-prompt.md: replace "read full source files" constraint with instruction to use provided source files and avoid redundant reads - challenger.md: align constraint with meta-prompt.md - Size guard: for large PRs (>20 files or >5000 lines), include only dimension-relevant files; sub-agents fall back to API reads Port of fullsend-ai/fullsend#1926. Closes fullsend-ai/fullsend#1924 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
The review orchestrator already fetches full source files of changed paths but did not include them in sub-agent context packages. Sub-agents independently re-read the same files from disk, causing redundant token usage (5-6 reads of the same file across 4 agents) and false positives from reading base-branch code instead of PR head.
Changes:
contents at PR head SHA via the GitHub contents API
the sub-agent prompt template with inline instructions
instruction to use provided source files and avoid redundant reads
only dimension-relevant files; sub-agents fall back to disk reads
Closes #1924
Post-script verification
agent/1924-sub-agent-source-files)4939eb52904be897ccf76b36a5f18f1130f51cb7..HEAD)