Skip to content

Add static-only skill validation mode - #38573

Merged
kubaflo merged 3 commits into
mainfrom
pureween-static-only-skill-validation
Sep 19, 2026
Merged

kubaflo merged 3 commits into
mainfrom
pureween-static-only-skill-validation

Conversation

@PureWeen

@PureWeen PureWeen commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

  • Require manual live jobs to use the current default branch, a branch ref, and the current default-branch workflow source.
  • Add repository variable SKILL_VALIDATION_STATIC_ONLY; when exactly true, static validation and reporting continue while live evaluation jobs are skipped.
  • Publish successful commit statuses and Check Runs titled exactly passed (static only) when that mode is active and static validation passes.
  • Move the live jobs in both workflows to the dedicated skill-evaluation-pat-pool environment.
  • Add focused policy tests and a rollback-drill fixture covering supported refs, source matching, static-only behavior, static failures, unexpected skips, and restored live job selection.
  • Fail normal manual evaluation legs after artifact upload when evaluation does not complete successfully.

Issues Fixed

N/A

Tests

  • actionlint -shellcheck= .github/workflows/skill-validation.yml .github/workflows/skill-evaluation-soak.yml
  • ruby .github/scripts/TestSkillWorkflowModes.rb .github/workflows/skill-validation.yml .github/workflows/skill-evaluation-soak.yml .github/scripts/fixtures/skill-workflow-policy/rollback-drill.json
  • ruby .github/scripts/TestPrepareVallyEvaluation.rb .github/scripts/PrepareVallyEvaluation.rb .github/skills/try-fix/tests/eval.restore.vally.yaml .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml .github/scripts/SetupVallyRuntime.sh .github/scripts/SelectVallyToken.sh .github/workflows/skill-validation.yml
  • Strict lint of every .github/skills/**/*.vally.yaml spec with @microsoft/vally-cli@0.14.0

Administrator prerequisite

Not completed by this repository change: a dotnet/maui Actions administrator must create and configure skill-evaluation-pat-pool with the required secrets. Its deployment branch policy must allow only main and exclude tags.

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

Copilot-Session: 9e73594e-38bc-4937-80c8-cc054aa890d2
Copilot AI lite review requested due to automatic review settings September 15, 2026 20:12
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38573

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38573"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Copilot-Session: 9e73594e-38bc-4937-80c8-cc054aa890d2
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 15, 2026

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

Critical reporting paths can mark incomplete evaluations as successful, and additional workflow gating and diagnostic issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review tier: Lite
Findings: 2 High severity · 1 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Adds static-only skill validation, trusted manual workflow checks, dedicated PAT environments, result reporting, and rollback-policy tests.

Changes:

  • Adds static-only execution gates and manual source validation.
  • Publishes static-only statuses and handles evaluation failures.
  • Moves live jobs to skill-evaluation-pat-pool.
  • Adds workflow policy tests and rollback fixtures.
File Summary and final review comments
.github/​workflows/​skill-validation.yml Adds execution modes, reporting, and manual evaluation handling. Critical (1 vote): missing JUnit can be reported as a successful completed evaluation. Moderate (2 votes): policy tests validate trusted rather than PR-head workflow files. Moderate (1 vote): the comment-triggered job lacks the PR/command guard. Nit (2 votes): missing-secret diagnostics still reference the old pool. Nit (1 vote): failure wording does not distinguish threshold misses from execution errors.
.github/​workflows/​skill-evaluation-soak.yml Adds static validation, live-job gating, and status reporting. Critical (1 vote): failed or incomplete live soaks can publish successful status/check results. Moderate (1 vote): missing-secret diagnostics reference the wrong environment.
.github/​scripts/​TestSkillWorkflowModes.rb Adds workflow policy and rollback-drill test coverage.
.github/​scripts/​fixtures/​skill-workflow-policy/​rollback-drill.json Defines rollback-drill test data.

Comment thread .github/workflows/skill-validation.yml Resolved
Comment thread .github/workflows/skill-validation.yml Resolved
Comment thread .github/workflows/skill-validation.yml Resolved
@kubaflo

This comment has been minimized.

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

Four moderate workflow issues remain involving incomplete evaluation reports and incorrect workflow-versus-branch-tip SHA validation.

Review effort: Lite
Findings: None

Resolved since last review (4)

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 16, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-review-incomplete AI review did not complete all expected phases s/agent-review-in-progress AI review is currently running for this PR labels Sep 16, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15379543 is running for android.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@PureWeen — new AI review results are available based on commit e635b9e.

Gate No Tests Confidence Low Platform Android


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📋 Pre-Flight — Context & Validation

Pre-Flight: PR #38573

Pull request

  • Title: Add static-only skill validation mode
  • State: Open, not draft
  • Base / head: main (1cd2e15ba4750f1cbacb629e648cd7abc9a5b5d2) / pureween-static-only-skill-validation (e635b9e9c9c42b55b9565160ccef679648d50949)
  • Review checkout: squashed commit b3a3cf48457355e44ab64634faff8a6a2a76ef38, parent 49b62062536b4a2b957d965f76035eb56806615c
  • Issue: No linked issue; the PR is the feature specification.
  • Platform requested by review: Android. The changed behavior is GitHub Actions/Ruby/shell policy and has no Android runtime path.

Intended behavior

The PR adds a repository-variable-controlled static-only mode to the skill validation and live-soak workflows. When SKILL_VALIDATION_STATIC_ONLY is exactly true, static checks still run, live evaluation jobs do not run, and successful reports use the exact label passed (static only). Manual live runs are restricted to a branch ref sourced from the current default-branch workflow revision. Live jobs move to skill-evaluation-pat-pool, failed/incomplete evaluations must not be reported as successful, and focused policy/rollback tests cover both static-only and restored-live behavior.

Existing implementation

The PR adds an execution-mode job to both workflows. That job fetches the current default-branch tip, emits manual_source_valid, static_only, and trusted_default_sha, and live-job conditions repeat the source checks. Reporting is implemented with inline actions/github-script branches. It also:

  • makes the PAT-pool diagnostic configurable through COPILOT_PAT_POOL_NAME;
  • passes candidate workflow/fixture files to a trusted TestSkillWorkflowModes.rb;
  • propagates Vally exit/JUnit/report/verdict evidence before reporting success;
  • adds a rollback-drill JSON fixture and string-oriented Ruby policy tests.

Earlier review findings about false-success reporting, testing trusted rather than candidate workflows, and stale PAT-pool diagnostics were addressed in the current head. An alternative must not simply repeat those already-landed corrections.

Changed files

  • .github/scripts/SelectVallyToken.sh
  • .github/scripts/TestPrepareVallyEvaluation.rb
  • .github/scripts/TestSkillWorkflowModes.rb (new)
  • .github/scripts/fixtures/skill-workflow-policy/rollback-drill.json (new)
  • .github/workflows/skill-evaluation-soak.yml
  • .github/workflows/skill-validation.yml

The applicable security rules are in .github/instructions/ci-copilot-pipeline-security.instructions.md: preserve least-privilege token scope, trusted/candidate separation, persist-credentials: false, and deterministic credentialed publishing.

Gate and validation contract

The prior gate is authoritative and must not be rerun: SKIPPED — no tests detected in this PR. Do not create or overwrite gate/content.md.

Only these focused PR-listed checks are in scope; do not run a full suite:

  1. actionlint -shellcheck= .github/workflows/skill-validation.yml .github/workflows/skill-evaluation-soak.yml
  2. ruby .github/scripts/TestSkillWorkflowModes.rb .github/workflows/skill-validation.yml .github/workflows/skill-evaluation-soak.yml .github/scripts/fixtures/skill-workflow-policy/rollback-drill.json
  3. ruby .github/scripts/TestPrepareVallyEvaluation.rb .github/scripts/PrepareVallyEvaluation.rb .github/skills/try-fix/tests/eval.restore.vally.yaml .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml .github/scripts/SetupVallyRuntime.sh .github/scripts/SelectVallyToken.sh .github/workflows/skill-validation.yml

actionlint is not currently installed. Ruby 3.0.2 and PowerShell 7.6.5 are available.

Worktree/baseline warning

Before STEP 5a, four PR files already matched their base versions in the worktree: SelectVallyToken.sh, TestPrepareVallyEvaluation.rb, TestSkillWorkflowModes.rb, and the rollback fixture. Their timestamps predate the review checkout, and .github/.baseline-state.json is absent. Treat this as pre-existing harness state and do not manually clean, restore, or overwrite it.

EstablishBrokenBaseline.ps1 excludes .github/** from auto-detected fix files. Because every PR change is under .github, a compliant try-fix attempt may report Blocked: No fix files detected. If so, preserve that honest result, run the script-only restore command required by the skill, and do not bypass the baseline boundary.


🔬 Code Review — Deep Analysis

Code Review — PR #38573

Independent Assessment

What this changes: Adds a static-only operating mode to the skill validation/soak workflows, adds trusted-source gating for manual live runs, moves live jobs to skill-evaluation-pat-pool, and tightens result reporting so success requires explicit valid evaluation evidence (exit code + JUnit presence/validity + suite pass verdict). It also adds/extends Ruby policy tests and token-selector diagnostics.

Inferred motivation: Prevent false-positive “success” statuses when evaluation is skipped/incomplete/invalid, and provide an emergency static-only switch while preserving deterministic workflow trust boundaries.

Reconciliation with PR Narrative

Author claims: Static-only mode (SKILL_VALIDATION_STATIC_ONLY=true), stricter manual-source restrictions, dedicated PAT pool, exact passed (static only) status text, and better policy coverage.

Agreement/disagreement: Agrees. The submitted head implements those claims. I found no mismatch between narrative and code behavior in changed lines.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
Soak status could report success after failed/incomplete evaluation Copilot inline (.github/workflows/skill-evaluation-soak.yml) ✅ Fixed code-review job now emits eval_exit_code/junit_present/report_valid/eval_passed; report-status requires all success predicates before publishing success title.
Manual result could pass without valid evaluation report Copilot inline (.github/workflows/skill-validation.yml) ✅ Fixed evaluate now emits report_valid + eval_passed; manual failure step now fails on nonzero exit OR invalid/missing verdict evidence.
Policy tests validated trusted workflows instead of candidate workflows Copilot inline (.github/workflows/skill-validation.yml) ✅ Fixed Static-check now passes candidate workflow/fixture paths from workspace while test harness script remains trusted.
PAT diagnostics referenced old pool name Copilot inline (.github/workflows/skill-validation.yml) ✅ Fixed SelectVallyToken.sh now uses validated COPILOT_PAT_POOL_NAME with compatibility default and workflows set skill-evaluation-pat-pool.

Blast Radius Assessment

  • Runs for all instances: No (affects only skill-validation/soak workflow execution and reporting paths).
  • Startup impact: No (CI workflow only).
  • Static/shared state: Yes (execution-mode outputs and workflow-level status synthesis affect all downstream jobs in a run).

CI Status

  • Required-check result: undetermined via gh pr checks --required (CLI unauthenticated in this environment).
  • Additional observable evidence: anonymous commit-status API for head SHA e635b9e... reports skill-validation = error (Evaluation infrastructure failed).
  • Classification: undetermined (could be environment/admin prerequisite vs PR behavior; not enough authenticated required-check detail here).
  • Action taken: confidence capped low; no LGTM.

Findings

No actionable file:line defects were validated on the submitted diff after full changed-file review and prior-review reconciliation.

Failure-Mode Probing

  • If static-only is enabled (SKILL_VALIDATION_STATIC_ONLY=true): live evaluation jobs are gated out (needs.execution-mode.outputs.static_only != 'true'), while static validation and status publication still run with explicit passed (static only) outcomes.
  • If manual run source is not current default-branch workflow SHA/ref: manual_source_valid becomes false; live jobs are blocked and reporter paths surface unsupported/manual-invalid state rather than silently succeeding.
  • If Vally exits 0 but JUnit is missing/invalid: reporters now classify as incomplete/invalid (not success), and manual runs fail after artifacts upload.

External Output Contract

Consumer token/pattern Producer location Producer emission condition Consumer assumption Ordinary negative case Downstream effect
eval-results.junit.xml existence (find ... eval-results.junit.xml) Vally eval invocation in workflow Run live soak / Run skill evaluation steps File exists only if Vally emitted JUnit output to results path Existence alone is insufficient for success Vally run with ordinary test failures may still emit JUnit Consumer now requires additional parsed suite verdict + exit-code checks before success
JUnit suite property passed=true/false via Ruby REXML parser JUnit XML generated by Vally (--junit) Per-suite passed property present and boolean for valid report Valid report must have parseable suites and explicit pass/fail values Missing property or malformed XML with completed run Treated as invalid report (report_valid=false) and blocks success publication
eval_exit_code == 0 Shell capture of Vally process return code (rc=$?) Zero only when evaluator command succeeded Nonzero means evaluation failure/incomplete for status purposes Ordinary failing eval trial set (nonzero) Reporter publishes failure/incomplete; manual run step hard-fails post-artifact

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: Code-level review found no actionable file:line defects in the submitted fix; prior concrete review findings appear addressed. However, required-check status could not be authoritatively resolved with gh pr checks --required in this environment, and anonymous status evidence shows skill-validation currently erroring on the head commit. Given undetermined/failed CI state, LGTM is not appropriate.


🛠️ Try-Fix — Analysis & Comparison

Aggregate Try-Fix Results: PR #38573

Candidate 1 — Centralized Policy Contract

Model: gpt-5.3-codex

Approach: Replace duplicated workflow-mode and reporter branching with one canonical policy output contract, such as live_enabled plus an exact outcome label, consumed by every live and reporting job. This would make static-only gating and success classification a single source of truth.

Prior approach avoided: The PR's execution-mode outputs are supplemented by repeated job-level source checks and separate inline reporter truth tables. Their shared risk is branching drift: logically equivalent conditions can diverge across two workflows and multiple result paths.

Mechanism-level difference: A canonical truth-table contract would decide live eligibility and reporting classification once; downstream jobs would consume those decisions rather than independently reconstructing them, so a later condition change could not silently produce inconsistent skip/success behavior.

Files changed: None.

Result: Blocked

Test results: Not run. EstablishBrokenBaseline.ps1 rejected the pre-existing dirty worktree (SelectVallyToken.sh, TestPrepareVallyEvaluation.rb, TestSkillWorkflowModes.rb, and the rollback fixture). The attempt did not manually clean or overwrite that state. Required restore ran and reported No baseline state found / Restored False, which is expected because baseline creation never completed and no attempt edits were made.

Failure analysis: The mandatory restoration boundary could not produce a RevertedFiles allow-list, so implementing or testing the candidate would have violated the try-fix contract.

Self-review: 0 findings; the candidate diff is empty.

Candidate diff: Empty.

Full narrative: ../try-fix-1/content.md

Candidate 2 — Structurally Partitioned Static/Live Graphs

Model: gpt-5.6-sol

Approach: Make static-only and live execution disjoint dependency subgraphs with separate reporters. The static-only reporter would depend only on successful static validation, be eligible only when the repository variable is exactly true, and have the sole success label passed (static only). The live graph would authenticate its source at entry and terminate in a live-only reporter that requires zero exit code plus present, valid, explicitly passing evidence.

Prior approaches avoided: The PR treats mode/source as execution-mode data followed by repeated conditions and shared reporter truth tables. Candidate 1 would instead centralize that data into canonical live_enabled and label outputs. Both retain mode as downstream-consumed data; candidate 2 avoids both designs.

Mechanism-level difference: Candidate 2 treats mixed-mode reachability as the failure mechanism. A static-only success and a live success terminate in different jobs, so missing, invalid, failed, or skipped live evidence has no path to the static reporter, and the live reporter has no static-only success branch. Source authentication guards only entry to the live graph rather than contributing to a shared outcome contract.

Files changed: None.

Result: Blocked

Test results: Not run (0 executions and 0 correction/retests). EstablishBrokenBaseline.ps1 rejected the same four pre-existing dirty paths before creating a RevertedFiles allow-list. The attempt did not probe beyond or bypass that boundary. Required restore ran and reported No baseline state found / Restored False.

Failure analysis: Without baseline state or a modification allow-list, any tracked implementation would violate the try-fix restoration contract. Candidate 2 therefore remained a bounded design candidate rather than manufacturing an untestable patch.

Self-review: 0 findings; the candidate diff is empty.

Candidate diff: Empty.

Full narrative: ../try-fix-2/content.md

Aggregate outcome

Two candidates were attempted in the required order. Both are distinct at the mechanism level, but neither could be implemented or tested because the mandatory baseline script rejected pre-existing dirty harness state before producing a safe modification boundary. No candidate changed tracked files, no primary gate was rerun, and both attempts completed the exact script-only restore step.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winning candidate: pr

The raw submitted PR is the only complete, reviewable implementation. Its six-file diff couples the workflow changes with token-selection support, evaluation-policy tests, and the rollback-drill fixture. The expert review found no actionable file:line defect, confirmed that earlier error-level findings are fixed, and found the title/description consistent with the submitted behavior.

Approval is not supported by the available evidence: the trusted Gate is SKIPPED — no tests detected, and the expert review could not authoritatively resolve required checks while the anonymous head status reported skill-validation as error (Evaluation infrastructure failed). This is an evidence/CI blocker rather than a reason to prefer an alternative implementation.

Candidate comparison

Rank Candidate Implementation Validation and regression evidence Assessment
1 pr Complete six-file submitted fix, including focused Ruby policy coverage and rollback fixture Trusted Gate skipped; author-listed checks are not independently recorded as passing in these artifacts; current status evidence includes a skill-validation error Best candidate. Expert review found no actionable defect and verified prior review errors were addressed.
2 pr-plus-reviewer No reviewer change (reviewer.patch is empty). Under the required trusted overlay, its diff against the review base contains only the two workflow files and omits four supporting submitted files. git diff --check passed; targeted validation was not run because there was no actionable refinement Not an improvement over pr, and incomplete as a standalone candidate diff.
3 try-fix-1 Proposed a centralized policy contract, but produced no implementation and an empty diff Blocked before testing by the mandatory dirty-worktree baseline guard; 0 test executions Conceptually reduces branching drift, but cannot outrank working code without a patch or evidence.
4 try-fix-2 Proposed disjoint static/live job graphs, but produced no implementation and an empty diff Blocked before testing by the same baseline guard; 0 test executions Mechanically distinct, but unimplemented, unvalidated, and potentially more workflow-complex than the submitted approach.

No candidate has a recorded regression-test pass or regression-test failure, so the rule requiring failed candidates to rank below passing candidates does not distinguish this field. Both try-fix candidates are nevertheless ranked below the submitted implementation because they are blocked design sketches with empty diffs and no validation.

Expert evaluation

  • Inline findings: none (inline-findings.json is []).
  • Code verdict: NEEDS_DISCUSSION, low confidence, solely because required-check state is undetermined/erroring rather than because of a validated code defect.
  • Prior findings: false-success reporting, candidate-vs-trusted workflow testing, and stale PAT-pool diagnostics are fixed in the submitted head.
  • External-output contract: success now requires exit-code, JUnit presence/validity, and explicit passing-suite evidence; ordinary failed or malformed runs cannot publish success.

Decision

Keep the raw PR implementation rather than replacing it with any candidate. Request changes at this stage because the trusted Gate does not permit approval and the current skill-validation error remains unresolved; no additional source refinement is recommended from this review.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Sep 18, 2026
@kubaflo

kubaflo commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.

@kubaflo
kubaflo merged commit ae2b441 into main Sep 19, 2026
17 of 31 checks passed
@kubaflo
kubaflo deleted the pureween-static-only-skill-validation branch September 19, 2026 12:00
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Sep 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 20, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — e635b9e9 Deployed Sep 16, 2026 by PureWeen via evaluate (code-review) #23348
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants