Skip to content

Add verified unskip tests workflow package - #1254

Merged
Evangelink merged 21 commits into
mainfrom
dev/amauryleve/reusable-unskip-workflow
Oct 5, 2026
Merged

Evangelink merged 21 commits into
mainfrom
dev/amauryleve/reusable-unskip-workflow

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • Add an installable unskip-closed-tests agentic-workflow package with a deterministic Roslyn producer, source/blob/span/declaration identities, canonical GitHub issue/PR eligibility, and a read-only agent planner.
  • Gate every edit through a custom safe-output job that revalidates source and remote state, invokes a repository-owned verification hook, parses exact TRX FQN/outcome evidence, and opens at most one draft PR.
  • Add behavioral regressions, deterministic local package staging, hostile-consumer restore/build/compile validation, collection catalog entries, and consumer contract documentation.

Related issue

N/A

Validation

  • python agentic-workflows/unskip-closed-tests/tests/run_tests.py — passed, 22/22 behavioral regressions.
  • python -m unittest eng/agentic-workflows/test_validate_agentic_workflows.py — passed, 10/10 tests.
  • python eng/agentic-workflows/validate_agentic_workflows.py — passed; all active and packaged workflows strict-compiled with gh-aw v0.89.15.
  • python eng/agentic-workflows/test_unskip_closed_tests_package.py — passed; clean consumer staging, locked restore, Release build with 0 warnings/errors, UTF-8 BOM audit, and strict installed-workflow compile.
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -shellcheck= -pyflakes= .github/workflows/agentic-workflow-validation.yml — passed.
  • Concurrent microsoft/testfx consumer validation — locked staged-tool restore/build passed with 0 warnings/errors; strict compile passed; live issue resolution classified closed/not-planned and open/null references as ineligible; the configured hook executed the exact intended FQN and produced TRX evidence with total=1, passed=1, skipped=0.

Checklist

  • I searched existing issues and pull requests to avoid duplicates.
  • I kept this pull request focused and avoided unrelated refactors.
  • I added or updated tests, evals, or documentation when changing skill or agent behavior.
  • I updated CODEOWNERS when adding or moving owned content.
  • I updated all marketplace manifests when plugin metadata changed.
  • I updated eng/known-domains.txt for any new external domains referenced by skill content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 20:14

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.

Copilot review overview

🟡 Changes recommended

Duplicate-PR safeguards, credential isolation, staged-change validation, and reference parsing contain unresolved correctness and security issues.

Review effort: Balanced
Findings: 6 High severity · 2 Medium severity · 1 Low severity

Open (9)
What changed in this PR

Adds an installable agentic workflow that safely re-enables .NET tests after deterministic source, GitHub-state, and TRX verification.

Changes:

  • Adds the workflow package, Roslyn-based helper, planner, and verification hook contract.
  • Adds package staging, regression tests, integration validation, and CI coverage.
  • Registers and documents the package in the workflow collection.
File Description
eng/​agentic-workflows/​test_validate_agentic_workflows.py Tests local package staging.
eng/​agentic-workflows/​test_unskip_closed_tests_package.py Validates installed package behavior.
eng/​agentic-workflows/​stage_agentic_workflow_package.py Stages packages into consumers.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests.md Defines the agent workflow.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests.config.json Provides default consumer configuration.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-verify.sh Adds fail-closed verification placeholder.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​UnskipClosedTests.Tool.csproj Configures the helper project.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​TrxVerifier.cs Validates exact TRX evidence.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Program.cs Implements the helper CLI.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​PathRules.cs Enforces path and glob safety.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​packages.lock.json Locks helper dependencies.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Models.cs Defines configuration and result models.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​ManifestValidator.cs Validates trusted manifests.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​JsonSupport.cs Provides canonical JSON and hashing.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​IssueResolver.cs Resolves GitHub eligibility.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​InventoryEngine.cs Inventories source-bound candidates.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​global.json Pins the .NET SDK family.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​GitRepository.cs Enforces Git revision identity.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Directory.Packages.props Isolates package versioning.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Directory.Build.targets Isolates consumer build targets.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Directory.Build.props Isolates consumer build properties.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​ConfigLoader.cs Loads and validates configuration.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​ApplyEngine.cs Applies and verifies candidate edits.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-shared.md Defines read-only tools and outputs.
agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-prepare.md Collects candidates and publishes PRs.
agentic-workflows/​unskip-closed-tests/​tests/​run_tests.py Adds behavioral regressions.
agentic-workflows/​unskip-closed-tests/​tests/​README.md Documents regression testing.
agentic-workflows/​unskip-closed-tests/​tests/​fixtures/​verification_hook.py Supplies deterministic TRX fixtures.
agentic-workflows/​unskip-closed-tests/​README.md Documents installation and contracts.
agentic-workflows/​unskip-closed-tests/​aw.yml Defines the package manifest.
agentic-workflows/​unskip-closed-tests/​agents/​unskip-closed-tests.agent.md Adds the read-only planner.
agentic-workflows/​README.md Catalogs the new package.
agentic-workflows/​aw.yml Adds the package to the collection.
.github/​workflows/​agentic-workflow-validation.yml Runs package and behavioral validation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread agentic-workflows/unskip-closed-tests/workflows/unskip-closed-tests-prepare.md Outdated
Comment thread eng/agentic-workflows/stage_agentic_workflow_package.py Outdated
Comment thread eng/agentic-workflows/stage_agentic_workflow_package.py
Comment thread agentic-workflows/unskip-closed-tests/workflows/unskip-closed-tests-prepare.md Outdated
Comment thread agentic-workflows/unskip-closed-tests/README.md Outdated
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

👋 @Evangelink — this PR has 9 unresolved review thread(s). When you're ready, please address the feedback and push an update; the triage bot will pick up the next state automatically. (Add the no-stale label to silence further pings.)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 07:54

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.

Comment thread agentic-workflows/unskip-closed-tests/workflows/unskip-closed-tests-prepare.md Outdated
@Evangelink
Evangelink enabled auto-merge (squash) October 2, 2026 19:12
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 19:23
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added pr-state/ready-for-eval PR is mergeable and awaiting evaluation pr-state/evals-in-progress PR evaluations are in progress and removed waiting-on-author PR state label pr-state/ready-for-eval PR is mergeable and awaiting evaluation labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

⏭️ No skills or agents to evaluate — no changed targets with eval specs were found in this PR. View workflow run

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.

Copilot review overview

🟡 Changes recommended

Package staging can follow a symlinked grader directory outside the consumer root, and the documented exit-code contract is inconsistent with implementation.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (10)
Previously missed (2)

In code that hasn't changed since last review

Low severity Align exit-code contract with verification failure handling

agentic-workflows/​unskip-closed-tests/​README.md:151

This exit-code contract does not match the implementation: a hook nonzero exit, timeout, or malformed/missing TRX becomes a failed VerificationOutcome; when no candidate survives, apply returns code 10, not 30. Reserve 30 for failures that throw InfrastructureException (such as being unable to start the hook), or change the implementation if consumers should distinguish protocol failures.

Low severity Correct CLI help for verification failure exit code

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Program.cs:16

The CLI help also assigns verification protocol failures to exit 30, but malformed/missing TRX, hook timeouts, and hook nonzero exits are converted into candidate reverts and yield exit 10 when nothing remains. Update this text to match the implemented contract (or change the return path consistently).

Comment thread eng/agentic-workflows/stage_agentic_workflow_package.py Outdated
Copilot AI balanced review requested due to automatic review settings October 2, 2026 19:29

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.

Copilot review overview

🔵 Needs a closer look

Symlink validation and fail-closed publication cleanup remain incomplete.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Previously missed (5)

In code that hasn't changed since last review

Medium severity Clean up published PRs when read-back verification fails

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-prepare.md:282

These read-back checks run under set -e, so any draft/head/base/body mismatch aborts the step but leaves the just-created PR and branch published. That defeats the fail-closed verification these checks are meant to enforce. Handle all invariant failures like the baseRefOid mismatch above: close the PR and delete its branch before exiting.

Medium severity Reject symlinked parent directories in package includes

eng/​agentic-workflows/​stage_agentic_workflow_package.py:40

This only rejects a symlink at the final include path. A symlinked parent such as workflows -> real-workflows makes workflows/example.md.is_symlink() false, and resolve_package_include accepts it when the target remains inside the package, so staging still copies through mutable symlink indirection. Walk and reject every path component between the package root and include before resolving it.

Medium severity Check unresolved consumer destinations before symlink resolution

eng/​agentic-workflows/​stage_agentic_workflow_package.py:98

relative_destination came from staged_destination, which resolve_package_include has already resolved. If the intended consumer file is a symlink to another path inside the consumer, this check examines the target rather than the symlink and silently stages to that target. Preserve/check the unresolved install destination (including parent components) before resolution so consumer symlinks are actually refused.

Low severity Align verification failure exit behavior with documented contract

agentic-workflows/​unskip-closed-tests/​README.md:151

The documented exit contract does not match the implementation: a nonzero verification hook, missing/malformed TRX, or non-passing outcome becomes a candidate rejection, and apply returns 10 when no candidate remains; it does not return 30. The CLI help repeats the same mismatch. Clarify that candidate-level hook/TRX rejection is a clean no-op, or change the implementation and workflow handling if protocol failures should fail the run.

Low severity Count retained tests rather than Ignore-attribute candidates

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​ApplyEngine.cs:235

retained.Count counts Ignore-attribute candidates, not tests. A supported class-level candidate can contain multiple Owner.TestFqns, so one retained class currently produces the singular “Unskip test” title and multiple classes undercount the tests. Derive the count from the retained FQNs (or describe these as sites/candidates) and cover a class-level retained candidate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 19:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 15:58

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.

Copilot review overview

🟡 Changes recommended

Conditional compilation can omit affected tests, and recursive source discovery follows symlinked directories before validation.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Avoid class ignores based on mismatched preprocessor symbols

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​InventoryEngine.cs:412

These methods come from a syntax tree parsed with no preprocessor symbols. For a class-level ignore, a test declared inside #if CUSTOM is therefore absent here; if the trusted hook builds with CUSTOM, removing the class ignore enables that test while the request/TRX verifies only the methods visible to this parse. Defer class candidates containing conditional directives, or enumerate with the same project parse symbols used by verification.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 16:34
@github-actions github-actions Bot added waiting-on-review PR state label and removed waiting-on-author PR state label labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

✅ Evaluation passed for 0f34d27. cc @AbhitejJohn @JanKrivanek @YuliiaKovalova @Evangelink — please review.

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.

Copilot review overview

🟡 Changes recommended

Publication currently deletes required restore assets, while conditional compilation can leave class-level edits incompletely verified.

Review effort: Balanced
Findings: 4 High severity

Open (4)
Resolved since last review (1)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:10

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.

Copilot review overview

🟡 Changes recommended

Method-level candidates can be incorrectly authorized when consumer preprocessor symbols differ from the inventory parser’s empty symbol set.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (4)

@github-actions github-actions Bot added waiting-on-author PR state label and removed waiting-on-review PR state label labels Oct 3, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 19:13

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.

Copilot review overview

🟡 Changes recommended

Cross-project global aliases can authorize incorrect edits, data-driven TRX results are rejected, and the reported validation counts are stale.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Support multiple MSTest data-row results per test ID

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​TrxVerifier.cs:103

MSTest data-driven tests can emit several UnitTestResult elements with the same method-level testId—one per data row. This check rejects the second row even when every row passed, so the configured DataTestMethodAttribute support can never authorize a multi-row test. Allow multiple results for a mapped ID while requiring every result to pass and every definition to have at least one result; use executionId/row identity if duplicate-result detection is still required.

Low severity Rerun validation commands against the current test suite

eng/​agentic-workflows/​test_validate_agentic_workflows.py:212

The PR validation says this command passed 10/10 tests, but the current file now contains 17 test methods (including this newly added staging suite). The behavioral suite likewise contains 36 methods while the description reports 22/22. Those counts show the cited runs predate the current head; rerun the listed validation commands and update the PR validation results so the added regressions are actually covered.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 19:51

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.

Copilot review overview

🔵 Needs a closer look

The security-sensitive publication pipeline still has unresolved staging, alias-resolution, and contract-documentation defects.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Normalize leading global:: in source aliases

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​InventoryEngine.cs:750

Source aliases retain a leading global::, but this normalizer never removes it. As a result, valid aliases such as using MSTest = global::Microsoft.VisualStudio.TestTools.UnitTesting; make [MSTest.Ignore] resolve to a nonmatching global::...IgnoreAttribute string and the candidate is silently missed. Normalize the global alias prefix just as the direct-attribute path already does.

Medium severity Reject non-file destinations before reading

eng/​agentic-workflows/​stage_agentic_workflow_package.py:125

An existing directory or other non-regular entry at a destination reaches read_bytes() here, which raises an uncaught IsADirectoryError/OSError instead of the documented conflict RuntimeError (and a FIFO can block). Reject non-files before reading so staging fails deterministically and main() can report the normal concise error.

Low severity Correct exit semantics for TRX evidence and authorize

agentic-workflows/​unskip-closed-tests/​README.md:159

The table conflicts with the behavior documented above and covered by the regression suite: malformed, missing, skipped, or mismatched TRX evidence reverts candidates and yields exit 10 when none remain, not exit 30. It also describes only apply, although authorize uses the same 0/10 result semantics.

Low severity Update CLI exit descriptions for authorize and materialize

agentic-workflows/​unskip-closed-tests/​workflows/​unskip-closed-tests-tool/​Program.cs:18

These exit descriptions omit the new authorize and materialize commands, and classify verification-protocol rejection as exit 30 even though malformed/missing/non-passing TRX evidence is deliberately converted to a clean no-op (exit 10). Align the CLI help with the implemented and tested semantics.

@github-actions github-actions Bot added waiting-on-review PR state label and removed waiting-on-author PR state label labels Oct 3, 2026
@Evangelink
Evangelink merged commit 1a94cec into main Oct 5, 2026
56 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/reusable-unskip-workflow branch October 5, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-review PR state label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants