Skip to content

Restore isolated Vally evaluation workspace - #38789

Merged
kubaflo merged 3 commits into
mainfrom
pureween-restore-vally-runtime
Sep 25, 2026
Merged

kubaflo merged 3 commits into
mainfrom
pureween-restore-vally-runtime

Conversation

@PureWeen

@PureWeen PureWeen commented Sep 22, 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!

Summary

  • copy the prepared evaluation checkout into a private workspace under RUNNER_TEMP, preserving the working tree and complete Git object database
  • sanitize and protect the copied Git configuration while keeping repeated detached worktree operations functional
  • route Vally, model probes, baseline evaluation, revalidation, and live evaluation through the copied workspace
  • allow Copilot runtime state files to be created, removed, and recreated while keeping policy files and installed plugins read-only
  • extend focused runtime and workflow-ordering coverage without changing Vally versions, models, selection logic, or evaluation policies

Validation

  • ruby .github/scripts/TestPrepareVallyEvaluation.rb ... — 86 tests, 541 assertions
  • ruby .github/scripts/TestSkillWorkflowModes.rb ... — 17 tests, 181 assertions
  • all mandatory Vally specifications validated with the candidate workflow and trusted refs
  • actionlint -shellcheck= -pyflakes= .github/workflows/skill-validation.yml .github/workflows/skill-evaluation-soak.yml
  • shellcheck .github/scripts/SetupVallyRuntime.sh
  • Linux container runtime self-check with Vally 0.14.0, including copied prepared content, dangling fixture commit availability, repeated worktree operations, runtime-state lifecycle, immutable configuration, wrapper workspace routing, and unchanged original checkout metadata

CI note

The pull_request_target live-evaluation jobs load the runtime setup script from the current default branch. Those jobs therefore continue to exercise the pre-change setup while this PR is open and cannot validate the candidate runtime script before merge. The candidate script is covered by the focused tests and Linux container self-check listed above.

The two PowerShell test failures also reproduce on unrelated pull requests and are outside the files changed here.

Operational note

The existing skill-evaluation-pat-pool environment and its configured token pool remain required; this change adds no new environment provisioning.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 22:22
@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 -- 38789

Or

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

@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.

@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 22, 2026 22:23 — with GitHub Actions Failure

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

Protected control paths remain writable, and tests do not enforce the intended permission boundary.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Restores an isolated temporary workspace for Vally evaluations while preserving Git state and routing evaluation workflows through the copied workspace.

Changes:

  • Sanitizes copied Git configuration and protects runtime policy files.
  • Routes validation and soak evaluations through the isolated workspace.
  • Expands runtime isolation and workflow-ordering tests.
File Findings
.github/​workflows/​skill-validation.yml Routes validation workflows through the isolated workspace.
.github/​workflows/​skill-evaluation-soak.yml Routes soak evaluation through the isolated workspace.
.github/​scripts/​TestSkillWorkflowModes.rb Verifies workspace routing and workflow ordering.
.github/​scripts/​TestPrepareVallyEvaluation.rb Moderate finding (1 vote): permission-boundary assertions were weakened and should verify writable versus protected paths.
.github/​scripts/​SetupVallyRuntime.sh Critical finding (3 votes): copied checkout control paths remain writable, allowing protected configuration or hooks to be modified.

Comment thread .github/scripts/SetupVallyRuntime.sh Resolved
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Skill Validation Results

@PureWeen — new skill validation results are available based on this last commit: 07f3da3.
To request a fresh validation after new comments or commits, comment /evaluate-skills.

Overall Needs attention Static Passed LLM Needs attention Skills 25 Agents 6

⚠️ Skill Validation Results — 07f3da3 · Restore isolated Vally evaluation workspace · 2026-09-24T22:26:48Z

✅ Static Checks Passed

Skills: 25 | Eval specs linted: 17

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
Vally collects pseudonymous usage telemetry (command name, version, outcome, duration, persistent device identifier (when available), and coarse OS/runtime info) to improve the product. No prompts, datasets, file paths, or arguments are collected.
Opt out any time by setting VALLY_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.
Learn more: https://aka.ms/vally/telemetry
✔ .github/skills/agentic-labeler/tests/eval.vally.yaml is valid
── .github/skills/analyze-sessions/tests/eval.vally.yaml
✔ .github/skills/analyze-sessions/tests/eval.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.ownership.vally.yaml
✔ .github/skills/ci-fix/tests/eval.ownership.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.vally.yaml
✔ .github/skills/ci-fix/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/eval.inline-findings.vally.yaml
✔ .github/skills/code-review/tests/eval.inline-findings.vally.yaml is valid
── .github/skills/code-review/tests/eval.producer-trace.vally.yaml
✔ .github/skills/code-review/tests/eval.producer-trace.vally.yaml is valid
── .github/skills/code-review/tests/eval.trim-aot.vally.yaml
✔ .github/skills/code-review/tests/eval.trim-aot.vally.yaml is valid
── .github/skills/code-review/tests/eval.vally.yaml
✔ .github/skills/code-review/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/hermeticity.vally.yaml
✔ .github/skills/code-review/tests/hermeticity.vally.yaml is valid
── .github/skills/code-review/tests/soak.capability.vally.yaml
✔ .github/skills/code-review/tests/soak.capability.vally.yaml is valid
── .github/skills/evaluate-pr-tests/tests/eval.vally.yaml
✔ .github/skills/evaluate-pr-tests/tests/eval.vally.yaml is valid
── .github/skills/pr-review/tests/eval.gh-auth.vally.yaml
✔ .github/skills/pr-review/tests/eval.gh-auth.vally.yaml is valid
── .github/skills/review-test-failures/tests/eval.vally.yaml
✔ .github/skills/review-test-failures/tests/eval.vally.yaml is valid
── .github/skills/try-fix/tests/eval.restore.vally.yaml
✔ .github/skills/try-fix/tests/eval.restore.vally.yaml is valid
── .github/skills/try-fix/tests/eval.vally.yaml
✔ .github/skills/try-fix/tests/eval.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml is valid

⚠️ LLM Evaluation Incomplete

No valid JUnit suite results were found for: agentic-labeler, analyze-sessions, ci-fix, code-review, evaluate-pr-tests, pr-review, review-test-failures, try-fix, verify-tests-fail-without-fix.

🔍 Full results and investigation steps

@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 22, 2026
@kubaflo

kubaflo commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15422128 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.

@azure-pipelines

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

@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.

Expert Review — 2 findings

See inline comments for details.

Comment thread .github/scripts/SetupVallyRuntime.sh Outdated
exit 1
fi
sudo -n chown -R "$workspace_owner:$eval_user" "$workspace_root"
sudo -n chmod -R g+rwX,o-rwx "$workspace_root"

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-Generated Review (multi-model)

❌ Error — chmod -R g+rwX on the copied evaluator workspace grants the evaluator identity write/rename/delete capability across repository-control paths (for example .mcp.json, .github/hooks/*, .github/copilot/settings*.json, .claude/settings*.json) via writable parent directories. Concrete failure: after pre-run validation, the evaluator can replace those files before/during execution, so immutability of trusted repository-control inputs is no longer enforced.

assert_includes content, 'sudo -n setfacl -m "u:$eval_user:r-x" "$GITHUB_WORKSPACE"'
assert_includes content, 'sudo -n -u "$eval_user" /usr/bin/test -r "$GITHUB_WORKSPACE/.git/HEAD"'
assert_includes content, 'sudo -n -u "$eval_user" /usr/bin/test -w "$protected_path"'
refute_match(/setfacl .*"\$GITHUB_WORKSPACE"/, content)

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-Generated Review (multi-model)

⚠️ Warning — The updated runtime tests only assert that the original checkout permissions are untouched, but they do not assert evaluator-side immutability for repository-control files inside workspace_root (replace/remove/rename attempts as eval_user). This leaves the new broad workspace write model unguarded by regression tests.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Sep 24, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2026 21:16
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool September 24, 2026 21:16 — with GitHub Actions Failure

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

An unresolved critical packed-refs permission issue may break Git operations, and runtime protection lacks a required executable Linux/ACL gate.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment on lines +191 to +194
if [ -e "$git_dir/packed-refs" ]; then
sudo -n chown "$eval_user:$eval_user" "$git_dir/packed-refs"
sudo -n chmod 660 "$git_dir/packed-refs"
fi
@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Sep 24, 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.

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

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15453260 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 07f3da3.

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

PR #38789 Pre-Flight

Context

  • Title: Restore isolated Vally evaluation workspace
  • PR: dotnet/maui#38789
  • Base / head: main / pureween-restore-vally-runtime
  • Reviewed PR SHA: 07f3da32377d832686063c1ea19f2be01ca76394, materialized locally as squashed commit e85acde1937bd0ab81d34e6556c74fc8ddd89b30
  • Requested platform: Android. The changed implementation is Linux/GitHub Actions infrastructure and has no Android-specific execution path.
  • Gate: Already skipped because no tests were detected. The gate was not rerun and gate/content.md was not created or changed.

The existing evaluator runs against the Actions checkout with narrow ACL-based access. The PR replaces that arrangement with a private copy of the prepared checkout under RUNNER_TEMP, preserving prepared working-tree content and the complete Git object database while permitting repeated detached-worktree operations. It sanitizes the copied Git configuration, reconstructs a trusted upstream remote, protects repository-control and Copilot policy paths, provisions the required mutable runtime state, and routes model selection, baseline evaluation, revalidation, live evaluation, hermeticity evaluation, and soak evaluation through the copied workspace.

Direct Diff Inspection

git diff origin/main HEAD changes six files:

File Directly observed change
.github/scripts/PrepareVallyEvaluation.rb Rejects symlinks in candidate/fixture Git trees and nested evaluator skill content before copied-workspace use.
.github/scripts/SetupVallyRuntime.sh Creates a private evaluator workspace, copies the prepared checkout, sanitizes and protects copied Git state, provisions Copilot runtime state, checks immutability and Git/worktree behavior, and emits workspace_root.
.github/scripts/TestPrepareVallyEvaluation.rb Adds focused coverage for symlink rejection, copied-workspace permissions, protected controls, Git configuration/worktree behavior, runtime-state lifecycle, and wrapper routing.
.github/scripts/TestSkillWorkflowModes.rb Adds workflow-ordering and evaluator-workspace routing assertions.
.github/workflows/skill-validation.yml Routes validation/evaluation phases through EVALUATOR_WORKSPACE and supplies a trusted upstream URL to runtime setup.
.github/workflows/skill-evaluation-soak.yml Routes soak evaluation through the emitted isolated workspace.

The submitted mechanism is a whole-checkout archival copy followed by permission repair and Git/configuration sanitization. An alternative must still preserve prepared uncommitted content, all required Git objects (including fixture commits), repeated detached-worktree operations, immutable trusted controls, writable evaluator runtime state, safe symlink/path handling, a trusted baseline-fetch path, and unchanged source-checkout metadata.

The inherited worktree already contains reverse/baseline-like tracked edits in:

  • .github/scripts/PrepareVallyEvaluation.rb
  • .github/scripts/SetupVallyRuntime.sh
  • .github/scripts/TestPrepareVallyEvaluation.rb
  • .github/scripts/TestSkillWorkflowModes.rb

No .github/.baseline-state.json existed during pre-flight. Each try-fix attempt must therefore let EstablishBrokenBaseline.ps1 decide whether a safe modification allow-list can be created; it must not manually restore, reset, stash, or clean these inherited edits.

Test Boundary

The gate supplied no detected primary test and the request supplied no separate mandatory regression list. The PR's own focused CI coverage is the only permitted verification command:

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 \
&& 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

Do not run the gate, the full repository suite, all mandatory Vally-spec validation, actionlint, shellcheck, or the container/runtime self-check in STEP 5a. Each candidate gets one implementation/test pass and at most one focused correction/retest.


🔬 Code Review — Deep Analysis

Code Review — PR #38789

Independent Assessment

What this changes: The submitted diff replaces direct evaluator access to the prepared Actions checkout with a private copy under RUNNER_TEMP. It preserves the prepared working tree and Git object database, rejects symlink-bearing evaluator inputs, rebuilds the copied repository configuration from a narrow allowlist, makes only the Git state needed for detached worktrees mutable, protects repository controls and Copilot policy files, and routes model probes and Vally execution through the copied workspace.

Inferred motivation: The previous read-only access model did not give repeated detached Vally worktrees a complete, independently mutable Git repository while also isolating the original checkout. The change creates that functional boundary without changing evaluator selection or policy.

Approach assessment: The abstraction is sound. Copying the already-prepared checkout is necessary because a fresh clone would lose patched specifications and synthetic/dangling fixture commits. The setup validates both sides of the boundary: the isolated user can perform the required Git operations, but cannot alter the copied worktree, Git configuration, repository controls, installed plugins, or Copilot policy.

Reconciliation with PR Narrative

Author claims: The PR says it restores an isolated Vally workspace, preserves the complete prepared repository, sanitizes Git configuration, permits runtime-state lifecycle operations, and routes evaluation stages through the copy.

Agreement/disagreement: The committed diff supports those claims. The workflows consume workspace_root; the runtime wrapper changes both GITHUB_WORKSPACE and the process working directory; the copied Git configuration is reconstructed and protected; and focused tests cover workspace routing, repeated worktrees, repository-control immutability, and recreated state files. No Vally version, model, or selection-policy change appears in the submitted diff.

Prior Review Reconciliation

No prior ❌ Error finding was available in the supplied review context, and the single expert-review pass produced no inline findings.

Blast Radius Assessment

  • Runs for all instances: yes — every GitHub Actions Vally runtime setup now copies and hardens the prepared checkout.
  • Startup impact: yes — setup must complete before token selection and evaluation.
  • Static/shared state: no application static state; the change does create job-scoped users, directories, Git metadata, and protected runtime state under RUNNER_TEMP.

CI Status

  • Required-check result: Gate skipped (no tests detected in this PR), as supplied by the trusted pipeline.
  • Classification: undetermined. The submitted diff does add focused Ruby/workflow coverage, but the trusted Gate did not execute it in this review.
  • Action taken: no Gate rerun, per the execution contract; confidence is capped at low.

Findings

No actionable code findings. The required inline-findings.json contains an empty JSON array.

Failure-Mode Probing

  • Prepared but unreferenced fixture objects: cp -a "$GITHUB_WORKSPACE/." copies the complete object database instead of reconstructing it from advertised refs, so dangling fixture commits remain available.
  • Candidate symlink escape: the preparer rejects symlinks in candidate and fixture Git trees, and runtime setup independently rejects non-Git symlinks in the copied worktree before granting evaluator access.
  • Repeated detach/remove cycles: the evaluator receives write access to objects, worktrees, refs, and logs; setup executes two complete detached-worktree cycles plus ref packing before exposing the runner.
  • Configuration replacement: the copied .git root and Copilot-home root use sticky directories, while configuration and policy entries are root-owned and read-only; explicit overwrite, rename, remove, and replacement probes fail closed.
  • Missing trusted upstream: only the baseline-capable validation job supplies the allowlisted upstream URL. Other jobs retain no checkout remote, and setup asserts that condition.
  • Original checkout mutation: copying and hardening occur under RUNNER_TEMP, and setup compares the original workspace and .git ownership/mode before completing.

External Output Contract

Consumer token/pattern Producer location Producer emission condition Consumer assumption Ordinary negative case Downstream effect
ls-tree mode 120000 Git ls-tree -r output consumed by PrepareVallyEvaluation.rb Git emits mode 120000 for a symbolic-link tree entry Any committed symlink is unsafe for the copied evaluator workspace A regular file/tree entry uses a non-120000 mode and is not rejected A matching candidate or fixture ref fails validation before runtime setup

Verdict: NEEDS_DISCUSSION

Confidence: low

Summary: The code review and the one expert pass found no concrete defect, and the focused coverage is aligned with the security and Git-lifecycle risks introduced by the change. The trusted Gate was skipped, however, so this review cannot produce an approval-grade verdict under the required evidence rules.


🛠️ Try-Fix — Analysis & Comparison

STEP 5a Final Aggregate — PR #38789

Exactly two alternative candidates were allocated. Both were blocked by the
mandatory baseline boundary before production edits or focused testing.

Candidate 1 — Git Object/Index Materialization

Approach

Candidate 1 proposed replacing whole-checkout archival copying with a Git
object/index-driven materialization model: a private object mirror plus
detached worktrees/checkout-index policy. Evaluator workspaces would be
produced from trusted Git data rather than by duplicating and sanitizing a full
filesystem tree.

Comparison and mechanism-level difference

PR #38789 copies the prepared checkout into private temporary storage,
sanitizes copied .git/config, reconstructs a trusted upstream, repairs and
protects paths, and routes evaluation through the copy. Candidate 1 instead
would derive state from validated Git objects/index and detached worktrees.
The causal shift was from “duplicate the filesystem, then repair its trust
boundary” to “materialize directly from the trusted Git graph under a strict
checkout policy.”

Recorded result

  • Result: Blocked
  • Baseline: pwsh .github/scripts/EstablishBrokenBaseline.ps1 failed with
    DIRTY WORKING DIRECTORY - Cannot establish baseline.
  • Inherited tracked edits listed:
    .github/scripts/PrepareVallyEvaluation.rb,
    .github/scripts/SetupVallyRuntime.sh,
    .github/scripts/TestPrepareVallyEvaluation.rb, and
    .github/scripts/TestSkillWorkflowModes.rb.
  • Allow-list: .github/.baseline-state.json was not created; there was no
    RevertedFiles allow-list.
  • Files changed: None (zero attempt-owned tracked-file edits).
  • Captured diff: Explicitly empty (attempt-1/fix.diff).
  • Test: The required focused command was not run because the attempt was
    blocked before editing/testing.
  • Self-review: 0 findings; reviewer-findings.json was [].
  • Failure analysis: Editing without a baseline allow-list would have
    violated the baseline boundary and made safe restoration impossible.
  • Artifact path:
    CustomAgentLogsTmp/PRState/38789/PRAgent/try-fix/attempt-1

Restore proof

Candidate 1 executed exactly:

pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore

It reported No baseline state found. Nothing to restore.,
Message: No baseline state found, and Restored: False, consistent with its
verified no-state/no-edit path.

Candidate 2 — Mount-Namespace OverlayFS View

Approach

Candidate 2 proposed mounting the prepared checkout read-only as an OverlayFS
lower layer with root-owned upper/work/merged paths under RUNNER_TEMP.
Trusted preparation and base fetches would write only into the upper layer. A
bubblewrap Vally runner would expose the merged view at /workspace, omit
the original checkout and backing layers from namespace reachability, and
nest read-only binds over repository controls and
.git/{HEAD,config,objects,refs}. Writable paths would be limited to
.git/worktrees, detached worktree destinations, results, and explicit
Copilot runtime state.

The design also called for a sanitized upper-layer Git config and trusted
HTTPS upstream, trusted host-side base fetches, persistent worktree metadata,
canonical component-wise mount-path validation, existing candidate/fixture
symlink rejection, root-owned Copilot policy, and an always() unmount/source
metadata verification step.

Comparison to the PR

The PR uses eager whole-tree duplication followed by sanitization and
permission repair
. Candidate 2 uses direct read-only lower-layer
reachability, lazy kernel copy-up, and namespace topology
. Prepared
uncommitted content and complete Git objects are visible without archival
copying; writes are redirected into the upper layer; and source/layer paths
are unavailable to the evaluator rather than merely protected after copying.

Explicit comparison to Candidate 1

Candidate 1 would reconstruct evaluator trees from the Git object graph and
index. Candidate 2 would not ask Git to rematerialize anything: the exact
prepared filesystem—including uncommitted or untracked prepared content—is
the OverlayFS lower layer. Thus completeness comes from direct filesystem
reachability, not a Git/index reconstruction or a separate content-capture
fallback.

Recorded result

  • Result: Blocked
  • Baseline: The exact baseline command exited 1 with
    DIRTY WORKING DIRECTORY - Cannot establish baseline and listed the same
    four inherited tracked edits.
  • Allow-list: .github/.baseline-state.json was not created; there was no
    RevertedFiles allow-list.
  • Files changed: No tracked production files.
  • Captured diff: Explicitly empty (attempt-2/fix.diff).
  • Test: The permitted focused command was not run because no implementation
    could legally be applied. attempt-2/test-output.log records this; no other
    tests or checks ran.
  • Self-review: 0 findings; reviewer-findings.json is [].
  • Failure analysis: The baseline boundary prevented empirical evaluation;
    this is not evidence that the mount/COW design passed or failed.
  • Artifact path:
    CustomAgentLogsTmp/PRState/38789/PRAgent/try-fix/attempt-2

Restore proof

Candidate 2 executed exactly:

pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore

It exited 0 and reported:

No baseline state found. Nothing to restore.
Message                        No baseline state found
Restored                       False

This is the expected no-state result because baseline establishment created no
state and Candidate 2 made no tracked-file edits.

Honest aggregate outcome

  • Candidates attempted: 2 of 2
  • Passed exact focused tests: 0
  • Failed exact focused tests: 0
  • Blocked before implementation/testing: 2
  • Production diffs: both empty
  • Aggregate verdict: Blocked

Neither candidate can be reported as passing. Candidate 1 and Candidate 2 are
mechanism-level alternatives to the PR and to each other, but the inherited
tracked edits prevented creation of the mandatory safe modification allow-list
for both. STEP 5a's second and final candidate is complete; no additional
candidate or test run was performed.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winner: pr

The raw submitted PR is the only complete implementation and is the strongest candidate on the available evidence. The single expert-review pass found no actionable defect, inline-findings.json is empty, and the code directly addresses the required isolation while retaining prepared working-tree content, the full Git object database, repeated worktree operations, trusted configuration, and controlled runtime state.

Approval is not permitted by the supplied Gate: it was skipped with no tests detected in this PR. That leaves required-check coverage undetermined even though the PR adds focused Ruby/workflow tests and its description reports successful local validation. The author should make the focused regression coverage visible to a trusted required check (or otherwise obtain equivalent trusted validation evidence); adding redundant tests is not necessary if the existing tests can be detected and executed.

Candidate Comparison

Rank Candidate Implementation Expert review Targeted/regression evidence Comparative result
1 pr Complete submitted fix across runtime setup, validation, workflows, and focused tests No actionable findings Author-reported focused validation; trusted Gate skipped, so independently undetermined Winner — complete and technically sound on review, but not approval-eligible without trusted test evidence
2 pr-plus-reviewer Logically identical to pr; reviewer delta is empty No actionable feedback to apply No validation command run because no reviewer change existed Tie on code, ranked below pr because it adds no improvement or evidence
3 try-fix-1 Proposed Git object/index materialization only; no production diff Self-review recorded no findings, but there was no code to review Blocked before tests by baseline establishment Not a viable candidate
4 try-fix-2 Proposed OverlayFS/bubblewrap copy-on-write workspace only; no production diff Self-review recorded no findings, but there was no code to review Blocked before tests by baseline establishment Not a viable candidate

No candidate failed a regression test. The two try-fix candidates were blocked before implementation and testing, so they receive no passing credit and cannot outrank either implemented PR candidate. pr-plus-reviewer also receives no additional passing credit because its reviewer patch is empty.

Expert Evaluation

  • Behavior: Copies the prepared checkout under RUNNER_TEMP, rejects unsafe symlink-bearing inputs, sanitizes the copied Git configuration, permits only required Git/runtime mutation, and routes Vally/model/baseline/revalidation/soak execution through the isolated copy.
  • Security boundary: Repository controls, Copilot settings, installed plugins, and local Git configuration are protected with ownership, mode, sticky-directory, and active mutation probes.
  • Functional boundary: Complete objects and prepared working-tree state survive the copy; repeated detached worktree and packed-ref operations are exercised during setup.
  • Review result: No concrete correctness, security, portability, workflow-ordering, or regression-test defect was found on an added/modified line.
  • Residual uncertainty: Infrastructure-wide blast radius plus a skipped trusted Gate caps confidence at low and prevents approval.

Why the Alternatives Lose

try-fix-1 and try-fix-2 are architectural sketches, not materialized fixes. Both stopped when EstablishBrokenBaseline.ps1 rejected inherited tracked edits, produced empty diffs, and ran no focused validation. Their designs also introduce materially different operational complexity (Git rematerialization or privileged mount lifecycle) without empirical evidence that they preserve every prepared artifact and security invariant better than the submitted copy-and-harden approach.

Required Follow-Up

Obtain trusted execution evidence for the existing focused Ruby/workflow regression tests, or update test detection so the Gate recognizes them. No code change is requested by the expert review itself.


🧭 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 24, 2026
@kubaflo
kubaflo merged commit a34bda4 into main Sep 25, 2026
15 of 30 checks passed
@kubaflo
kubaflo deleted the pureween-restore-vally-runtime branch September 25, 2026 14:33
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Sep 25, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026

This branch had an error being deployed

1 failed and 1 inactive (outdated) deployments
skill-evaluation-pat-pool — 07f3da32 Deployed Sep 24, 2026 by PureWeen via evaluate (pr-review) #24556
copilot-pat-pool — 3c40e985 Deployed Sep 22, 2026 by PureWeen via conclusion #2026
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