Skip to content

fix(#410): guard step 3f context assembly against unselected security sub-agent - #413

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/410-guard-step3f-security-dispatch
Open

fix(#410): guard step 3f context assembly against unselected security sub-agent#413
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/410-guard-step3f-security-dispatch

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

  • Auto-include the security sub-agent in step 3c when step 3c-1 produces a non-empty security_critical_files list, ensuring triage-flagged security-critical files always receive dedicated security review even when domain classification (step 3b) did not independently trigger the security dimension.
  • Add an explicit guard in step 3f so context modifications for the security sub-agent are only applied when it was selected in step 3c, making behavior deterministic rather than relying on implicit orchestrator reasoning.
  • Split the re-review dispatch rule for security from cross-repo-contracts so the triage auto-inclusion is recognized as an independent qualification path during re-review (previously both were in a combined bullet that only referenced step 3b path criteria).

Context

The review agent identified a logic gap in the two-pass review strategy (PR #190) across 4 review cycles: step 3f unconditionally assembled context for the security sub-agent when triage results existed, but step 3c conditionally dispatched it based on domain classification. A large PR could trigger triage classifying files as security-critical without step 3c selecting the security sub-agent, causing step 3f to reference a context package for an unselected sub-agent.

Testing

  • Verified the prerequisites-creates-allowed-issue test failure in post-triage-test.sh is pre-existing on main (unrelated to this change).
  • All other tests pass. This is a Markdown-only change to a skill definition file — no production code or test code is affected.
  • Validation criteria from the issue: on the next review of a PR where security triage classifies files as security-critical but the security sub-agent is not in the default dimension set, the orchestrator should auto-include the security sub-agent (Option 1).

Closes #410

Post-script verification

  • Branch is not main/master (agent/410-guard-step3f-security-dispatch)
  • Secret scan passed (gitleaks — e7a3660d8d2dffb418d747883540f78588c8c60f..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

… sub-agent

Step 3f unconditionally modified context packages for the security
sub-agent when triage results existed, but step 3c conditionally
dispatches security based on domain classification. A large PR could
trigger triage (step 3c-1) classifying files as security-critical
without step 3c selecting the security sub-agent, causing step 3f
to reference a context package for an unselected sub-agent.

Fix: auto-include the security sub-agent in step 3c when step 3c-1
produces a non-empty security_critical_files list, ensuring triage-
flagged files always receive dedicated security review. Add an
explicit guard in step 3f so context modifications for the security
sub-agent are skipped if it was not selected. Split the re-review
dispatch rule for security from cross-repo-contracts so security
can reference triage auto-inclusion as an independent qualification
path during re-review.

Note: pre-commit could not run (sandbox network restrictions).
The post-script runs pre-commit authoritatively on the runner.

Closes #410
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 23, 2026 19:31
@rh-hemartin

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 24, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:43 AM UTC · Completed 6:56 AM UTC
Commit: 46a4a32 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [design-direction] skills/pr-review/SKILL.md:346 — Step 3c's "Security triage auto-inclusion" paragraph references step 3c-1's output (security_critical_files list), but the step numbering could be read as implying 3c runs before 3c-1. The sub-step naming convention (paralleling "3a-1" at line 278) makes the ordering reasonably clear when reading top-to-bottom, but a brief clarifying note that the auto-inclusion rule is evaluated after step 3c-1 completes could improve readability.
    Remediation: Consider adding a brief note to step 3c clarifying that the auto-inclusion rule is evaluated after step 3c-1 completes, if the sub-step naming convention is not considered self-evident.

Labels: PR modifies the review agent's orchestration skill definition (skills/pr-review/SKILL.md) and touches a protected path requiring manual review

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread skills/pr-review/SKILL.md
schemas, or CLI args are modified. Skip entirely for PRs that don't
touch public API surface.

**Security triage auto-inclusion:** When step 3c-1 produces a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] design-direction

Step 3c's "Security triage auto-inclusion" paragraph references step 3c-1's output (security_critical_files list), but the step numbering could be read as implying 3c runs before 3c-1. The sub-step naming convention (paralleling "3a-1" at line 278) makes the ordering reasonably clear when reading top-to-bottom, but a brief clarifying note that the auto-inclusion rule is evaluated after step 3c-1 completes could improve readability.

Suggested fix: Consider adding a brief note to step 3c clarifying that the auto-inclusion rule is evaluated after step 3c-1 completes, if the sub-step naming convention is not considered self-evident.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment review-agent labels Jul 24, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity in the last month. It will be closed in 2 weeks if no further activity occurs. Remove the stale label to reset the inactivity timer.

@github-actions github-actions Bot added the stale label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-review skill step 3f should guard context assembly against unselected security sub-agent

1 participant