Skip to content

Skip detection for patchless no-op expert reviews - #12329

Merged
Amaury Levé (Evangelink) merged 1 commit into
mainfrom
evangelink-detection-run-failures
Nov 10, 2026
Merged

Amaury Levé (Evangelink) merged 1 commit into
mainfrom
evangelink-detection-run-failures

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Pull request

Summary

Expert-review run 42848192058 emitted only noop with has_patch=false, but unnecessarily launched detection, which timed out without a verdict. Exclude that non-publishing case in the shared guard used by ready-PR, /review, and after-autofix reviews.

Real reviews, incomplete reports, mixed outputs and every patch remain eligible. Detector model/runtime pins, credentials, permissions, firewall, output limits and failure policy are unchanged.

Relates to #12320

Design and decision record

Reuse the existing no-op eligibility contract from Pipeline Test Triage and ResourceLock rather than changing the detector, increasing timeouts, adding retries or disabling detection. The maintained troubleshooting rationale records the incident, comparison runs and regression cases; a separate feature RFC is not needed.

This is a scoped eligibility fix, not a proven repair of the engine stall. The stall's internal cause and the separate unsupported reviewer-model rejection in that run remain unresolved. Keep the automatically managed detection tracker open.

Demonstration

Nonvisual job-eligibility change; screenshots are not applicable. The authored and compiled conditions previously admitted output_types=noop, has_patch=false; they now exclude it. Mixed noop,submit_pull_request_review output and every patch remain eligible. The paired configuration-contract tests below demonstrate the difference, not a hosted model replay.

Validation and regression proof

Local Windows validation used Python 3.12.10, gh-aw v1.0.1 and native ShellCheck v0.11.0. The six validated file hashes were unchanged when committed as 3b898579dcac3024c8a02a61c617884e3df64c7a; parent/base: 129aff748a337473ebd9a2b9417a6779cd6619d3.

For the counterfactual, the current regression tests were retained while workflow inputs came from an isolated git archive of the base. $baseline below represents that task-owned archive's .github\workflows directory; only the machine-specific path is abbreviated.

Command Result
python .github\scripts\test_agentic_workflow_warning_contracts.py --workflow-root "$baseline" CompiledWarningContractTests -v Expected exit 1: 11 methods executed, 10 passed and one failed through six intended authored/compiled eligibility assertions across the three review consumers; zero skips.
python .github\scripts\test_agentic_workflow_warning_contracts.py CompiledWarningContractTests -v Exit 0: all 11 methods passed, zero skips.
gh aw compile review.agent review-on-open.agent review-after-autofix.agent --strict --dry-run --json Exit 0: all three workflows valid, zero warnings; strict source/model checks and ShellCheck passed. Diagnostic locks were preserved, then replaced by normal compiler-generated production locks.
gh aw compile review.agent review-on-open.agent review-after-autofix.agent --strict --shellcheck --json Exit 0: all three workflows valid, zero warnings; ShellCheck passed for 186 resources.
python .github\scripts\check_action_pins.py Exit 0: 2,769 references across 60 files passed. No uses: pins changed.
git diff --check Exit 0 before commit.

A parsed-YAML comparison confirmed that jobs.detection.if is the only changed executable field in each production lock. Logs, diagnostic locks and exact patch/file hashes are retained privately in session artifacts, not uploaded. No new hosted workflow/model replay or review publication was performed; optional Docker-based scanners were not run. No .NET product/package behavior changed, so product builds and package-consuming tests were not run.

Test-value evidence

Contract / test case Without eligibility fix Correct implementation
CompiledWarningContractTests.test_expert_review_detection_skips_noop_only_runs Executed: detected the original defect through six assertion failures, covering authored and compiled conditions for all three consumers. Executed: passed for all three consumers. The condition retains the patch disjunct and excludes only exact noop output.
CompiledWarningContractTests.test_expert_review_noop_skip_preserves_detection_security_controls Executed: passed. Executed: passed; detector model/engine, permissions, setup/install guards, publisher condition and non-publishing no-op policy remain intact.

This is executed configuration-regression evidence, not proof that future eligible detector runs cannot time out.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 20:14
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧪 Test quality review — PR #12329

Compared merge base 129aff748a337473ebd9a2b9417a6779cd6619d3 with head 3b898579dcac3024c8a02a61c617884e3df64c7a. Evidence applies to this head, not every intermediate commit.

Test-value evidence

Contract Test Expected outcome Evidence
Noop-only output (output_types=noop, no patch) skips detection for review, review-on-open, review-after-autofix; mixed, incomplete and patch outputs stay eligible test_expert_review_detection_skips_noop_only_runs (subTest per workflow) Authored and compiled detection.if match the gate Static prediction: it fails on the old condition output_types != '' || has_patch == 'true' and passes on the new one. The PR reports executed red/green runs, but no accessible run record binds them to these revisions, so they are unverified here.
Detection security controls and non-publishing noop policy stay intact test_expert_review_noop_skip_preserves_detection_security_controls Passes before and after Static prediction: a guard test, expected green on both revisions.
README documentation, lock regeneration n/a n/a Not applicable: non-executable or generated.

🧵 Parallel safety

Not applicable. The PR changes no C# tests and no parallelization configuration.

Per-test assessment

No C# or MSTest test methods changed, so no grading rubric applies. The changed tests are Python unittest configuration-contract tests, and I did not grade them. No inline findings.

<sub>This advisory review is heuristic and non-blocking. Nothing was executed.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~22 AIC · ⌖ ~1 AIC · ⊞ 8.1K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Copilot expert review — workflow run

Summary: No blocking findings.

  • The change in shared/review-shared.md correctly skips threat detection when output_types == 'noop' and there is no patch. The condition (output_types != '' && output_types != 'noop') || has_patch == 'true' is unchanged for mixed outputs such as noop,submit_pull_request_review, incomplete reports and patches.
  • The three regenerated lock files (review, review-on-open, review-after-autofix) match the source: the frontmatter_hash, the threat_detection.condition metadata and the detection job if: all changed consistently. I saw no changes to action pins or other uses: lines in the diff.
  • report-as-issue: false is present on the noop config in all three consumers, so a skipped detection cannot publish an issue.
  • The new Python tests cover the guard and the detection security controls for all three workflows via subTests. I could not run them here (execution was denied), so they are unverified.
  • README documentation is accurate and appropriately hedged: it says the guard avoids unnecessary detection and does not claim to repair the engine stall.

Test-value evidence: Not executed. The tests are static assertions on the authored source and the compiled locks, and they would fail on the base revision because the old guard has no noop exclusion (static prediction only).

Dependencies: None added or changed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified with the change to skip unnecessary threat detection for patchless, no-op-only reviews.

No open issues 🎉

What changed in this PR

This PR avoids unnecessary threat detection for patchless, no-op-only expert reviews across TestFx’s three review workflows. It addresses the eligibility issue tracked in #12320 without claiming to fix the underlying detector timeout.

Changes:

  • Exclude exact noop output when no patch exists, while preserving eligibility for reviews, incomplete reports, mixed outputs, and patches.
  • Regenerate all three workflow locks with the shared guard.
  • Add configuration regression checks and document the incident and remaining limitations.

Test-value evidence: The PR reports failing baseline assertions and 11 passing test methods at 3b898579dcac3024c8a02a61c617884e3df64c7a. Execution artifacts were retained privately and were not independently verified here; no hosted replay was performed.

File Description
.github/​workflows/​shared/​review-shared.md Excludes patchless no-op-only reviews from detection.
.github/​workflows/​review.agent.lock.yml Applies the guard to /review.
.github/​workflows/​review-on-open.agent.lock.yml Applies the guard to ready-PR reviews.
.github/​workflows/​review-after-autofix.agent.lock.yml Applies the guard to after-autofix reviews.
.github/​workflows/​README.md Documents the incident, eligibility fix, and unresolved causes.
.github/​scripts/​test_agentic_workflow_warning_contracts.py Adds guard and security-control checks for all three workflows.

Review effort: Balanced

@Evangelink
Amaury Levé (Evangelink) merged commit cfb2837 into main Nov 10, 2026
29 of 30 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the evangelink-detection-run-failures branch November 10, 2026 20:37
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Nov 10, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants