feat(code): auto-assign code-agent PRs to a human owner#284
Conversation
Resolve assignee from the latest human /fs-code comment on the issue, then fall back to the first human issue assignee or author, so bot-authored PRs get clear review ownership without workflow TRIGGER_SOURCE plumbing. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · Started 7:50 AM UTC |
PR Summary by QodoAuto-assign code-agent PRs to a human assignee
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Rename maybe_assign_pr's local so the bundled post-code.sh no longer trips shellcheck SC2153 against post-failure-report's PR_NUMBER. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · |
Code Review by Qodo
Context used✅ Compliance rules (platform):
55 rules 1. ::warning:: echoes unsanitized vars
|
Route assignment warnings through gha_echo (no raw ::warning:: fallback) and make issue assignee/author jq parsing null-safe and fail-soft. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 7:57 AM UTC · Completed 8:08 AM UTC |
ReviewRe-review of e7f5deb (prior review at 395f0f1, provenance: app-verified). Changes since prior review: Prior findings: [protected-path] (medium) unchanged — scripts/ and harness/ still modified; [defense-in-depth] (low) resolved — regex guard Clean, well-structured feature addition. The library correctly implements the precedence chain from fullsend-ai/fullsend#1880 with proper bot filtering, idempotency guard, best-effort semantics, and defense-in-depth input validation. Test coverage is comprehensive (190 lines, 18 test cases covering null bodies, CRLF, leading whitespace, and bot filtering). FindingsMedium
Low
Previous runReviewRe-review of 395f0f1 (prior review at 2d0b158, provenance: app-verified). Changes since prior review: All prior findings addressed: [null-body-crash] (medium) resolved — jq Clean, well-structured feature addition. The library follows all established codebase conventions (idempotency guard, shellcheck directive, private function prefix, test patterns). The precedence chain, bot filtering, and best-effort semantics are correctly implemented. Integration at both the existing-PR and new-PR paths is correct. FindingsMedium
Low
Previous run (2)ReviewRe-review of 2d0b158 (prior review at c744f89, provenance: app-verified). New commit since prior review: Clean, well-structured feature addition. The library follows all established codebase conventions (idempotency guard, shellcheck directive, private function prefixes, test patterns). The precedence chain, bot filtering, and best-effort semantics are correctly implemented. Integration at both the existing-PR and new-PR paths is correct. FindingsMedium
Low
Labels: PR modifies the code agent post-script to add PR auto-assignment. Previous run (3)ReviewFindingsMedium
Labels: PR modifies the code agent post-script to add PR auto-assignment. |
|
CI is green on Addressed Qodo findings in follow-up commits (shellcheck SC2153 rename; sanitize assignment warnings via |
Keep both gitleaks-install and pr-assignee sources in post-code.src.sh and regenerate the bundled post-code.sh. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 6:24 AM UTC · Completed 6:41 AM UTC |
Null/minimized comment bodies no longer abort the whole invoker scan. Trim leading whitespace in jq to match dispatch/awk, test the production path directly, add a maybe_assign_pr bundle drift guard, and document post-script assignment in docs/code.md. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 6:45 AM UTC · Completed 7:00 AM UTC |
Add a lightweight GitHub-login regex guard and update the code harness comment to mention PR assignment. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 7:03 AM UTC · Completed 7:24 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 8:35 PM UTC · Completed 8:54 PM UTC |
Retro: PR #284 — auto-assign code-agent PRs to a human ownerTimelineHuman-authored PR by July 19: PR opened (07:49). Three review dispatches fired in quick succession — first two cancelled by concurrency group as the author pushed rapid fixes for Qodo bot findings. Third review (run 29678947790, commit July 20: Merge-conflict resolution commit What went well
First-pass review quality gapThe most notable finding: the first successful review (run #3, commit The missed Evidence for existing issues
Workflow noise30 Unresolved low-severity findingThe Proposals filed |
Summary
post-codecreates or reuses a PR, best-effort assign it to a human using: latest human/fs-codecommenter on the issue → first human issue assignee → human issue author/fs-codeinvoker via the issue comments API (no workflowTRIGGER_SOURCEplumbing)gh pr editfailureImplements fullsend-ai/fullsend#1880.
Test plan
bash scripts/pr-assignee-test.shmake script-build && make check-bundlemake script-testMade with Cursor