Skip to content

fix(ci): avoid Windows allocation for unneeded proof contracts - #1886

Draft
vincentkoc wants to merge 4 commits into
openclaw:mainfrom
vincentkoc:fix/ci-proof-pool-admission-managed-20261027
Draft

vincentkoc wants to merge 4 commits into
openclaw:mainfrom
vincentkoc:fix/ci-proof-pool-admission-managed-20261027

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: PRs without proof-boundary changes still allocate a Windows runner before deciding whether proof-pool regressions are needed.

User Impact

Contributors keep required proof validation while unaffected PRs can avoid one Windows job allocation. Product behavior is unchanged. Runner-minute and billing savings have not been measured.

Why This Change Was Made

The existing canonical selector now runs in Ubuntu classification, which publishes one fail-closed fact before Windows admission. CI Gate requires selected proof to succeed and unselected proof to be skipped. Explain/Human plans use the same selector with the original inputs; default impact JSON and the trigger inventory stay unchanged. The independent Windows PowerShell 5.1 / PowerShell 7 malformed-contract matrix and release dependencies remain intact.

The orchestration/scripts change is +26 net lines (runtime: 0), justified by explicit selector inputs and canonical planner reuse; tests are +141 net lines.

Current main integration

The signed candidate integrates main 8d31176d. Both Ubuntu classification steps now check the exact base and head of pull requests and merge groups. The independent Windows job runs its full contract matrix when selected. Out of 25 workflow jobs, 22 match main exactly. The original selector step, its merge-group inputs, the aggregate job dependencies and the release jobs are preserved.

The complete change-classifier and CI Gate suites passed in PowerShell 7.7.0. Six additional event/path combinations exercised the actual selector. The initial integration failed the workflow contract's queue-base assertion. After the test was moved to its new owner, both Ubuntu step assertions passed. On macOS the whole workflow and documentation suites subsequently reached Windows-specific path checks in unchanged helpers. A full-range independent source review found no P0–P3 issues.

Hosted Windows validation passed on cdf376ff with 19 successful jobs and seven skipped release-only jobs. The Mock Gateway scenarios, shared and tray test jobs, hosted workflow and documentation checks, packaging jobs and CI Gate passed. The selected Windows proof job rejected 80 invalid contracts using three validation modes. The default All/Debug build and a hosted pull request that omits the unselected Windows job remain unverified. The receipts below describe their named earlier revisions.

Evidence

Full candidate owner and shared P0–P3 reviews were clean at 369047ee1b6400ea1218994ce9bdc047d51af703. Independent owner review and mandatory shared P0–P3 review also found no defects in the test-only CRLF repair at current head d68e0ef884f1704ff60481fb6189330e10df46a8 (tree 3822f9aee9e5b68bf794c86df0dae19820054fe8). Production is unchanged by that repair. These are source assessments, not runtime proof.

Initial hosted fast-validation passed classifier and CI Gate suites, then exposed a CRLF-only regex defect in the new workflow-contract test. The repair explicitly validates extraction and runs the actual admission truth table for both LF and CRLF; current-head hosted execution passed.

The separate native closeout attempt is blocked. Initial offline Git preparation exceeded the native hard limit before allocation. The supported fresh-PR attempt then failed during lease acquisition on a TLS transport error; the native tool verified durable cancellation of that exact create request. Neither attempt ran the payload; no active lease or successful shutdown is inferred from the canceled request. No transport, authentication, backend, or limit override was applied.

Existing hosted Windows CI supplies substantial current-source native proof below. The remaining unexecuted closeout command is the default, unpackaged full-repository ./build.ps1 invocation; its parameterized Release Dev-package invocation did pass. No replacement allocation or duplicate test run was started.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • none: this changes CI admission and explanatory planning; no capacity-dependent product, hardware, UI, containment, WSL, or Gateway proof pool is selected.

Validation

  • git diff --check: passed. Full original candidate and focused CRLF repair both passed independent owner review and mandatory shared P0–P3 review without findings.
  • Current hosted Windows run: PR head d68e0ef884f1704ff60481fb6189330e10df46a8; tested merge commit 6dd417c1c6415c66a6f9a16a12a00e0b4a7ab96e has the identical source tree 3822f9aee9e5b68bf794c86df0dae19820054fe8.
  • Fast validation: test-ci-change-classifier.ps1, test-ci-gate-results.ps1, and test-ci-workflow-contract.ps1 passed, including the original CRLF failing surface. validate-docs.ps1 passed 66 Markdown files, both normal/fallback validate-proof-pools.ps1 paths (7 pools), and test-validate-docs-proof-pool-flow.ps1.
  • Proof-pool regressions: test-proof-pool-validator.ps1 rejected 80 invalid contracts across all 3 validation modes.
  • Shared tests: 4,674 discovered; 4,666 executed and passed; 0 failed; 8 permitted ordinary skips. Tray tests: 4,561 executed and passed; 0 failed or skipped. Both projects were built first and the existing CI wrapper validated fresh unique TRX files, nonzero execution and counters using TestResultContract.ps1. Results are in test-results-core / test-results-tray artifacts on that run; log/result-contract evidence was inspected, not an independent download of the TRX bytes.
  • Native build owner: actual .\build.ps1 -Project WinUI -Configuration Release -Msix Dev succeeded for Shared and WinUI. Other hosted test jobs build the Debug project graphs, but neither is described as the default All/Debug build invocation.
  • Still blocked: default ./build.ps1 full-repository closeout. Ordinary CI subsequently passed on cdf376ff as recorded above. Hosted ordinary skips do not establish the skipped behavior or custom proof. The failed separate transport attempt supplies no build/test result.

Real Behavior Proof

  • Environment tested: actual GitHub-hosted native Windows, ordinary PR CI.
  • PR head / tested source: d68e0ef884f1704ff60481fb6189330e10df46a8 / CI merge 6dd417c1c6415c66a6f9a16a12a00e0b4a7ab96e, identical tree 3822f9aee9e5b68bf794c86df0dae19820054fe8.
  • Observed result: classification succeeded, the selected native proof-pool job completed its full three-mode malformed-contract matrix, changed workflow admission tests passed for LF and CRLF, and Shared/Tray produced validated nonzero fresh test reports.
  • The previous Windows CRLF test failure is retained in the linked initial run; it is repaired on the current head.
  • Not verified / blocked: default full-build invocation, hosted unselected-job omission, custom proof, latency and billing savings. The separate native payload never ran because lease transport failed; cancellation was verified.

Security Impact

  • New permissions or capabilities? No.
  • Secrets or tokens handling changed? No.
  • New or changed network calls? No.
  • Command or tool execution surface changed? Yes: existing proof selection moves before Windows allocation; existing proof commands and gates remain required when selected.
  • Data access scope changed? No.
  • If any answer is Yes, explain the risk and mitigation: only a successful explicit false suppresses Windows proof. Selector failures retain proof; missing or malformed effective facts fail CI Gate. Release proof dependencies remain strict.

Compatibility and Migration

  • Backward compatible? Yes; the existing selector adds internal explicit-path input, and all CI Gate callers pass the new selection fact.
  • Config or environment changes? No.
  • Migration needed? No.
  • If yes, list the exact upgrade steps: none.

Ordinary PR/main validation does not directly enter publication. Scheduled alpha automation can later include merged main; no release, Store, or deployment dispatch is part of this PR.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR selects proof-pool regressions during Ubuntu classification so unrelated PRs can skip allocating the Windows proof job.

Example: A pull request changes only README.md.

  • Before: Windows allocates the proof-pool job, which checks selection and skips the regression step.
  • After: Ubuntu reports proof_pool_required=false, the Windows job is skipped, and CI Gate requires that skip.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, useful changes with no actionable source findings; hosted selected-path execution is verified, but complete admission evidence and declared native validation remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor-proof gate; current-head hosted metadata verifies selection and selected Windows execution, while the body records native qualification as pending and detailed hosted logs were inaccessible.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Unrelated pull requests allocate a Windows runner solely to decide that proof regressions are unnecessary.
Reason: The maintainer-authored direction removes avoidable allocation while preserving existing selection and release contracts; billing savings are appropriately unclaimed.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: main still allocates the Windows proof job unconditionally, and the proposed optimization preserves fail-closed selection without an actionable source defect.

Priority: P3
Reviewed head: d68e0ef884f1704ff60481fb6189330e10df46a8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supplied evidence does not demonstrate a hosted unrelated PR skipping Windows allocation, or a baseline-failure/head-pass run for the new admission regression.
Agent review details

How this fits together

GitHub Actions classification consumes event and changed-path inputs, selects validation jobs, and passes their results to CI Gate before release publication.

flowchart TD
  A[Event and changed paths] --> B[Ubuntu classification]
  B --> C[Canonical proof selector]
  C --> D[Effective selection output]
  D --> E[Conditional Windows proof job]
  D --> F[CI Gate]
  E --> F
  F --> G[Release publication gate]
Loading

Technical review

Best possible solution:

Reuse the canonical selector before Windows admission and preserve strict selected-success and unselected-skip checks in CI Gate.

Do we have a high-confidence way to reproduce the issue?

Current-main workflow source directly shows unconditional Windows allocation before proof selection; no local reproduction was run.

Is this the best way to solve the issue?

The change uses the existing selector and gate owners, removes post-allocation selection, and keeps explanatory plans aligned without introducing a parallel trigger inventory.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ed1444b0de69.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Scott Hanselman: Raw commit 3a71e5f adds scripts/Get-CiProofPoolRegressionDecision.ps1:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a71e5f98eef; files: scripts/Get-CiProofPoolRegressionDecision.ps1)
  • Barbara Kudiess: Raw commit 3977f82 adds scripts/Get-CiChangeClassification.ps1:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3977f8206ed4; files: scripts/Get-CiChangeClassification.ps1)

Review metrics

Metric Value Why it matters
Change size Orchestration/scripts +26 net lines; tests +141; documentation +9 Growth is focused on canonical planner reuse, strict gate wiring, admission truth tables, malformed outputs, and rename/delete boundaries; product runtime code is unchanged.

Labels

Label changes:

  • add P3: This reduces CI runner overhead without changing product behavior or establishing an urgent user-facing regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This reduces CI runner overhead without changing product behavior or establishing an urgent user-facing regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 27, 2026, 7:11 AM ET / 11:11 UTC.

@roboclaw-bot

Copy link
Copy Markdown
Contributor

PR cleanup review

Reviewed head: d68e0ef884f1704ff60481fb6189330e10df46a8. Main comparison: e59374c064f43d68f5c72d070d4c89ef2d20ec3b.

The change remains distinct from current main: proof selection still occurs after allocating the Windows job there. The new effective output and CI Gate pairing preserve fail-closed behavior, and the added cases cover selector failure, invalid outputs, non-PR events and proof-boundary rename/deletion. This looks like a good small landing candidate after reconciliation with the newer Gateway fixture lane, focused PowerShell contracts and exact-head required CI. I have not run those tests here or measured the hosted timing saving. This is still a conflicted draft; the successful selected-path checks do not clear the default full-build or hosted unselected-job evidence gaps.

Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass.

@roboclaw-bot

Copy link
Copy Markdown
Contributor

Refreshing #1886 (fix(ci): avoid Windows allocation for unneeded proof contracts) by merging current main into the existing contributor branch. I will preserve the draft and body, retain the fail-closed proof selection and newer separate Gateway fixture lane, resolve only the necessary conflicts, and report exact-head validation and any unavailable Windows proof. This is a branch refresh, not merge approval.

@roboclaw-bot roboclaw-bot added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 12, 2026
Resolve the changelog by retaining the proof-pool entry and current main entries. Preserve the newer Gateway fixture lane alongside fail-closed preallocation proof selection.

Co-authored-by: bkudiess <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Contributor

Main refresh complete

Updated #1886 (fix(ci): avoid Windows allocation for unneeded proof contracts) on its existing contributor branch with a non-force merge commit.

  • Original head: d68e0ef884f1704ff60481fb6189330e10df46a8
  • Main merged: 3d5f14270dd6bd8b260a723ff2e73a68ea858ca8
  • New head: edd336ec4f6899a2025599a627c323c3644d892d

Conflict choices: CHANGELOG.md was the only textual conflict; both the proof-pool entry and newer main entries are retained. Reviewed the auto-merged workflow, selector, classifier and gates. Fail-closed preallocation selection, strict selected-success/unselected-skip results, the separate Gateway fixture lane/result gate, and release dependencies remain intact. YAML parsing verified 22 jobs; the 19 unaffected job definitions match main. Draft state, body, and attribution are unchanged. GitHub currently reports the refreshed branch mergeable, not approved to land.

Source review: independent GPT-6 Astra P0-P3 review covered all 10 changed files with no actionable findings, including 250 static admission combinations and LF/CRLF extraction. The shared Astra autoreview invocation also exited 0 and reported no findings, but persistent JSON/status artifacts were not requested, so its full artifact closeout is unverified. These are source assessments, not runtime proof.

Validation: git diff --check 3d5f14270dd6bd8b260a723ff2e73a68ea858ca8 HEAD passed. ./build.ps1 was attempted but could not execute on this Linux host; its PowerShell invocation is blocked because pwsh is missing. Both required dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore and dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore are blocked because dotnet is missing: 0 tests executed. The focused test-ci-change-classifier.ps1, test-ci-gate-results.ps1, test-ci-workflow-contract.ps1, documentation validator, and prerequisite setup-dev.ps1 -CheckOnly were attempted through pwsh and are likewise blocked: 0 PowerShell suites executed. No packages or remote proof hosts were installed/allocated.

Hosted validation: exact-head Build and Test run 43296217206 is in progress. Previous-head checks do not validate this merge candidate. Full native closeout, hosted unselected Windows-job omission, and timing/billing savings remain unverified. Returning the refreshed draft for required CI and maintainer review; no merge, ready transition, body edit, or re-review request was performed.

@roboclaw-bot roboclaw-bot removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@github-actions github-actions Bot added the stale label Nov 27, 2026
@vincentkoc vincentkoc added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 27, 2026
@vincentkoc vincentkoc removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Nov 27, 2026
@github-actions github-actions Bot removed the stale label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants