14 Commits

Author SHA1 Message Date
Amaury Levé f6f2751abd Clarify evaluation progress PR label (#1082)
* Clarify evaluation progress label

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d35e7696-f69c-4898-ad3e-c75fb02b993d

* Distinguish queued and running evaluations

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d35e7696-f69c-4898-ad3e-c75fb02b993d

---------

Copilot-Session: d35e7696-f69c-4898-ad3e-c75fb02b993d
2026-08-27 14:41:18 +00:00
AbhitejJohn 618d19de8d Address review: robust SHA parse + accurate dispatch doc
Parse '/evaluate <sha>' from issue comments with a bash regex instead of a
sed BRE, avoiding word-boundary escape ambiguity across sed implementations
and matching the validation used elsewhere in the gate. Reject over-length
hex strings to the guidance path (fail-safe).

Clarify the workflow_dispatch docs: the PR head travels in the head_sha
input, while a dispatched run's github.sha is the default-branch tip.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 29ef3316-14f6-4dc1-a838-40f8be09f915
2026-07-27 17:12:16 -07:00
Abhitej John 9d08a0a31d Bind PR evaluation to the reviewed commit
Harden the /evaluate pipeline in evaluation.yml so a run is always tied to
one specific reviewed commit captured when the trigger fires, instead of
resolving the live branch head downstream. Every job (gate, discover,
evaluate, report-status) now consumes the single gate-bound SHA.

- Add a pull_request_review trigger (recommended path): the run binds to
  review.commit_id, so no SHA needs to be typed. Files changed -> Review
  changes -> Submit review with /evaluate in the body.
- Comment path (/evaluate <sha>) now requires an explicit SHA that must
  belong to the PR; a bare /evaluate posts copy-paste-ready guidance and
  points to the review flow.
- Label and workflow_dispatch paths bind to the head carried in the event
  payload / passed by the triage worker.
- Warn (log + PR comment) when the bound commit is not the current head.
- Only write-access triggers (label, dispatch) may cancel an in-progress
  run; comment/review triggers queue so an authorized run finishes.
- Reachability check tolerates PRs >250 commits via a compare-ancestry
  fallback, staying fail-closed.
- discover fails closed if the bound commit can't be checked out.
- Pass inputs.plugin and actor logins via env instead of inlining.
- Update docs/design/pr-triage-workflows.md (4 entry points, commit binding).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 29ef3316-14f6-4dc1-a838-40f8be09f915
2026-07-27 16:58:57 -07:00
Jan Krivanek 15c336709e Fold Close Stale PRs into deterministic pr-triage stale sweep (#928)
Replace the agentic close-stale-prs.agent.md with a deterministic
stale-PR sweep hosted in pr-triage-batch.yml. The new stale-sweep job
runs .github/scripts/pr-stale-sweep.sh weekly (cron 17 4 * * 1) and on
manual dispatch (stale_sweep=true), warning about and closing PRs with no
non-bot activity for 30/37 days. Preserves the original policy (no-stale
and maestro exemptions, drafts included, non-bot activity timer) without
model calls or token cost.

Deletes close-stale-prs.agent.md and its compiled lock file, and updates
docs/design/pr-triage-workflows.md.

Fixes #915

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-23 16:04:13 +02:00
Jan Krivanek 0c0f6f0263 Fix PR-triage eval trigger: dispatch evaluation.yml instead of bot label (#746)
The triage worker added the 'evaluate-now' label via GITHUB_TOKEN, but label events emitted by GITHUB_TOKEN do not start workflows (GitHub's recursion guard), so evaluation.yml's pull_request_target:[labeled] entry point never fired for the bot (repro: PR #745). workflow_dispatch and repository_dispatch are the only token-initiated events exempt from that guard.

The worker now dispatches evaluation.yml directly via 'gh workflow run' with a pr_number input, routed through the existing gate job so the path is identical to /evaluate. A dispatched run's head_sha is the default branch (not the PR head), so idempotency now matches the deterministic run name 'Evaluate PR #<n> @ <sha7>'. The 'evaluate-now' label remains a valid human entry point. Worker granted actions:write for 'gh workflow run'.
2026-06-12 13:50:33 +00:00
Jan Krivanek d9e4a5e113 PR triage workflows: orchestrator, worker, and evaluate-now label (#716)
* PR triage workflows: orchestrator, worker, and evaluate-now label

Implements docs/design/pr-triage-workflows.md:
- pr-triage-batch.yml: hourly orchestrator that classifies open PRs
- pr-triage.yml + pr-triage-act.sh: per-PR worker (state recompute,
  label reconciliation, eval-trigger, ping comments with cool-down)
- evaluation.yml: gate job now also handles pull_request_target [labeled]
  with the evaluate-now label as a second entry point alongside /evaluate

* Add temporary push triggers for testing pr-triage workflows

* test: live-run pr-triage worker once

* test: re-run worker for cool-down check

* fix: age gate uses created_at and applies only before first ping

* Remove temporary test triggers and inline test marker

* Add pr-malicious-scan agent workflow; replace design doc with brief overview

- New: .github/workflows/pr-malicious-scan.agent.md + compiled .lock.yml.
  Static diff scanner for external (non-trusted) PR contributors. Triggers
  on pull_request_target [opened/synchronize/reopened] and workflow_dispatch.
  Surfaces findings as code-scanning alerts plus a single maintainer-ping
  comment per head SHA when high-severity / workflow-tamper / supply-chain
  hits. Never executes PR head code.
- docs/design/pr-triage-workflows.md replaced with a brief overview + diagram.
  The full implementation plan is kept locally as
  docs/design/pr-triage-workflows-plan.md (gitignored).
- pr-triage-batch.yml's existing dispatch-scanner branch now resolves to
  the new scanner; orchestrator unchanged.

* Fix markdownlint MD038 (pipe inside code span) in malicious-scan agent
2026-06-03 20:01:19 +00:00
Jan Krivanek 66628b651e Add triage workflows (#612) 2026-05-06 15:39:20 +02:00
Viktor Hofer a5e20a1fef Remove agentic workflows (#579)
* Remove agentic workflows

The agentic workflows were useful when CCA didn't support loading skills. That's now solved and supported. The agentic workflows come with a couple of issues (limited chars) which make it hard to use. Remove them in favor of the plugin system.

* Remove Agentic Workflows section from README

Removed section about Agentic Workflows from README.

* Remove stale /agentic-workflows references from CONTRIBUTING.md, CODEOWNERS, and docs

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/8f129e2f-156e-4ee9-9897-896cd1981513

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-23 08:13:12 +00:00
Jan Krivanek 70e2d3b333 Simplify the focus of devops health workflows (#521)
* Simplify the focus of devops health workflows

* Updated gh-aw and recompiled

* Fix scope wording to include resource usage per review feedback
2026-04-13 17:39:20 +02:00
Amaury Levé 948a9a52ef Add exp-mock-usage-analysis skill and evaluation (#483)
* Add exp-mock-usage-analysis skill and evaluation

New experimental skill that detects unused, redundant, or unnecessary
mocks in .NET test suites. Covers Moq, NSubstitute, FakeItEasy, and
manual test doubles.

- SKILL.md with 6-step workflow: gather code, classify mocks, detect
  anti-patterns, incorporate runtime data, generate recommendations,
  report findings
- eval.yaml with 10 scenarios: trivial type mocking, unused setups,
  redundant configs, stable utility mocks, well-placed mocks (no false
  positives), NSubstitute support, FakeItEasy support, setup sprawl,
  and 2 non-activation boundary tests
- Fixture files for each scenario with production + test code
- CODEOWNERS entry for @dotnet/dotnet-testing

* Remove no-headroom scenarios, increase NSubstitute timeout

Remove 4 scenarios where baseline already scores 5.0/5 (model handles
these well without skill guidance):
- Detect mocking of DTOs, records, and enums
- Recognize well-placed mocks without inventing false positives
- Decline when asked about non-mock test anti-patterns
- Decline mock framework migration request

Increase NSubstitute scenario timeout from 120s to 180s to avoid
baseline timeouts impacting scoring.

Remaining 6 scenarios all show positive skill impact (3→5, 3→4, etc).

* Document areas the model handles well without the skill

Add a subsection under 'When Not to Use' listing mock-related tasks
where the base model already scores 5.0/5 without skill guidance:
- Mocking trivial types (DTOs, records, enums)
- Recognizing well-placed mocks (no false positives)

* Fix md

* Improve
2026-04-02 10:03:17 +00:00
Amaury Levé a220f36256 Add exp-test-maintainability skill for test structure review (#418)
New experimental skill that assesses test maintainability: duplication,
test size, data-driven patterns, display names, builder/helper extraction,
and shared setup.
2026-03-26 14:28:43 +01:00
Jan Krivanek 1f02fab51f [Infra] Improve the daily health check (#215)
* Improve the daily health check

* Reflect PR comments
2026-03-05 10:23:47 +01:00
Copilot ef5330cee2 fix: correct stale path references in docs/agentic-workflows.md (#214)
* Initial plan

* fix: update stale path references in docs/agentic-workflows.md

Co-authored-by: ManishJayaswal <9527491+ManishJayaswal@users.noreply.github.com>

* Clarify workflow documentation and remove file references

Updated the documentation to clarify the location of component-specific workflows and removed references to specific files.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ManishJayaswal <9527491+ManishJayaswal@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2026-03-05 09:12:00 +01:00
Viktor Hofer 1ad154d3dd Move agentic-workflows doc under docs/ (#189)
* Move agentic-workflows doc under docs/

* fix line endings

* Fix links
2026-03-04 13:42:56 +01:00