Skip to content

ci: add code impact fast paths - #1315

Merged
shanselman merged 2 commits into
mainfrom
shanselman-ci-code-fast-paths
Sep 4, 2026
Merged

shanselman merged 2 commits into
mainfrom
shanselman-ci-code-fast-paths

Conversation

@shanselman

Copy link
Copy Markdown
Collaborator

Summary

Reduce ordinary code pull request latency by selecting conservative validation lanes from explicit path-impact booleans while preserving fail-closed full validation for infrastructure, setup, connection, shared protocol, unknown, main, and tag changes.

Required proof pools

  • none: this changes GitHub-hosted CI orchestration and contracts, not a product surface that requires a custom Windows host class.

Old and new lane mapping

Change class Previous New
Docs or agent-skill prose Fast validation only Fast validation only
CLI or WinNode CLI Full serialized tests, all E2E, x64 and ARM64 publish Core and CLI tests only
Tray or UI Full serialized tests, all E2E, x64 and ARM64 publish Tray plus UI/accessibility lanes, with E2E only for setup/connection paths
Setup, connection, Shared/protocol Full serialized tests, all E2E, x64 and ARM64 publish Required unit/UI lanes plus relevant or comprehensive existing E2E shards
Workflow/build/package/installer/classifier or unknown Full serialized tests, all E2E, x64 and ARM64 publish Fail-closed full tests and E2E plus x64 publish smoke
Main and tags Full validation and both publishes Full validation and x64 plus ARM64 publishes

The former serialized Windows test job is now three clean-runner lanes: core/CLI, tray/setup/integration, and UI/functional/accessibility. Each restores and builds its own project graph, preserves all eight test projects and TRX artifacts, retains coverage on push/tag, settings isolation, integration gating, and WindowsAppRuntime installation. The existing three E2E shards are not multiplied.

Preserved invariants

  • Unknown paths, invalid SHAs, empty diffs, mixed unrecognized changes, workflow/build/package/installer/classifier contracts, main, and tags fail closed.
  • The proof-pool malformed-contract matrix remains governed by Get-CiProofPoolRegressionDecision.ps1, now in an independent job.
  • GitVersion preserves semVer, majorMinorPatch, isPrerelease, isStableCorrection, and stable-correction validation.
  • Release publish preserves native dependency and assembly metadata checks.
  • The stable always-running CI Gate requires success for every selected lane, requires intentional skips for unselected lanes, and rejects failed classification, missing outputs, failures, cancellation, or unexpected results.
  • Existing PR-scoped concurrency is unchanged. CodeQL is unchanged.

Expected timing

Measured baseline: full PR run 33815204229 spent 22m11s in the serialized test job, including 6m48s in proof contracts and 3m28s in accessibility. Existing E2E shards took 9m33s to 14m43s; x64 and ARM64 publish took 5m13s and 6m17s. Docs fast-path run 33819700640 completed in 51s.

Change class Expected wall-clock
Docs or skill prose About 1 minute
CLI-only 5 to 7 minutes
Tray/UI 8 to 12 minutes
Setup/connection/Shared 10 to 16 minutes, governed by required E2E
Build/workflow infrastructure 10 to 16 minutes

The full infrastructure path duplicates checkout, SDK setup, and cache restore across three test runners, but removes the serialized proof matrix and parallelizes lanes. Estimated full-path runner minutes stay within 15% of the prior full run, below the 30% rejection threshold. Ordinary code paths use substantially fewer runner minutes.

Validation

  • OPENCLAW_REPO_ROOT=<worktree>; .\build.ps1 - passed
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore - 3,905 passed, 32 skipped
  • isolated dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore - 2,833 passed
  • all eight split-lane test project graphs restored and built on clean project boundaries
  • classifier, CI Gate, workflow, release-ordering, docs, skill, and proof-decision contracts - passed
  • malformed proof-pool matrix - 75 invalid contracts rejected by 3 modes
  • actionlint .github/workflows/ci.yml - only the documented pre-existing intentional build-msix if: false diagnostic
  • git diff --check - passed
  • rubber-duck review - two clean-runner/conservative mapping findings fixed; final review reported no findings

Real behavior proof

Current-head classifier output for this CI infrastructure pull request:

{"classification":"full","core_tests":true,"tray_tests":true,"ui_tests":true,"setup_e2e":true,"revocation_e2e":true,"network_e2e":true,"x64_release":true,"arm64_release":false,"full":true}

Table-driven classifier contracts also prove representative CLI-only changes omit E2E/UI/release, UI-only changes require tray/UI/accessibility without setup E2E/release, setup/connection changes require E2E, Shared/protocol and infrastructure changes take full paths, and main/tags require both release architectures.

Rollback boundary

Revert this commit to restore the merged docs-only/full classifier, serialized test job, full E2E matrix, and release build matrix. No product runtime or persisted data format changes are involved.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 3, 2026, 10:00 PM ET / September 4, 2026, 02:00 UTC.

ClawSweeper review

What this changes

This PR replaces the broad serialized CI path with conservative path-selected test, E2E, metadata, and release lanes guarded by a stable CI Gate.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open. The CI split and full-path run are supported by the exact-head workflow results, but the remaining P2 documentation blocker is still present: the release guide does not identify the complete tagged-run job inventory and expected outcomes after replacing the former serialized jobs.

Priority: P2
Reviewed head: f99f471a17a575ec789ec0e7a2383eec1216c3d5

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The CI behavior has strong exact-head execution evidence, but a concrete release-operator documentation blocker remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.
Evidence reviewed 5 items Introduced CI implementation: The branch adds explicit per-lane classifier outputs and uses them to split tests, E2E, and release validation, so the requested fast-path behavior is not already present on the pinned main base.
Remaining release-operator documentation gap: The added release overview names metadata and architecture publishes but not the split test, E2E, proof-pool, or CI Gate jobs that a tagged-release operator must distinguish from the removed serialized jobs.
Prior finding remains on the reviewed head: The prior completed review at the same head requested the release job inventory. The later branch commit changes only the workflow contract and full-history checkout behavior, leaving the release guide unchanged.
Findings 1 actionable finding [P2] Document the split tagged-run job inventory
Security None None.

How this fits together

GitHub Actions receives a pull request or tag, classifies changed paths, and selects validation and release lanes. Their results feed the CI Gate, which permits tagged artifact publication only after the required lanes succeed.

flowchart LR
  A[Pull request or tag] --> B[Change classifier]
  B --> C[Selected test lanes]
  B --> D[Selected E2E lanes]
  B --> E[Release metadata and publish]
  C --> F[CI Gate]
  D --> F
  E --> F
  F --> G[Tagged release publication]
Loading

Before merge

  • Document the split tagged-run job inventory (P2) - The added overview only names metadata and the architecture publish jobs. The workflow now requires separate test, E2E, proof-pool, and CI Gate jobs on a tag, while the old test, e2etests, and build jobs no longer exist. Add the current job names and expected outcomes to the release checklist so release operators can diagnose a tagged run.
  • Resolve merge risk (P1) - Without an explicit tagged-run inventory in the release guide, operators cannot reliably tell expected split-lane results from missing or removed legacy jobs during release monitoring.
  • Complete next step (P2) - Update docs/RELEASING.md with the tagged-run job inventory and required successful outcomes before merge.

Findings

  • [P2] Document the split tagged-run job inventory — docs/RELEASING.md:7-13
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Workflow surface 12 files, +1,573 and -500 lines The CI orchestration rewrite affects validation selection, release sequencing, contracts, tests, and operator documentation.
Validation lanes 3 test lanes and 3 E2E lanes The former serialized Windows test and E2E flow is replaced by independently selected clean-runner jobs.

Merge-risk options

Maintainer options:

  1. Complete the tagged-release checklist (recommended)
    Add the split test, E2E, proof-pool, metadata, CI Gate, and publish job expectations to the release guide before merge.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Update the tagged-release checklist with the exact split job inventory and required outcomes; do not change workflow behavior.

Technical review

Best possible solution:

Document the complete tagged-run job inventory and required successful outcomes in the release checklist, while retaining the conservative lane and CI Gate design.

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

Not applicable. This is CI orchestration work, and the exact-head GitHub run already exercised the full infrastructure path successfully.

Is this the best way to solve the issue?

No. The lane implementation is supported by current-head checks, but the release guide must first document the replacement tagged-run jobs and outcomes required by the prior review.

Full review comments:

  • [P2] Document the split tagged-run job inventory — docs/RELEASING.md:7-13
    The added overview only names metadata and the architecture publish jobs. The workflow now requires separate test, E2E, proof-pool, and CI Gate jobs on a tag, while the old test, e2etests, and build jobs no longer exist. Add the current job names and expected outcomes to the release checklist so release operators can diagnose a tagged run.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5d192398e8d9.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.

Label justifications:

  • P2: The remaining issue is a bounded release-operator documentation defect rather than a demonstrated failed CI path.
  • merge-risk: 🚨 automation: This PR changes the repository's CI selection and release-gating automation, so incorrect documentation can hinder safe release operations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the GitHub Actions workflow and its classifier-driven job graph. The exact-head run recorded successful classifier, selected test and E2E lanes, release metadata, x64 smoke, proof-pool contracts, and CI Gate results, directly showing the introduced full-path orchestration completes.

Evidence

Acceptance criteria:

  • [P1] ./scripts/validate-docs.ps1.
  • [P1] ./scripts/test-ci-workflow-contract.ps1.

What I checked:

  • Introduced CI implementation: The branch adds explicit per-lane classifier outputs and uses them to split tests, E2E, and release validation, so the requested fast-path behavior is not already present on the pinned main base. (.github/workflows/ci.yml:20, f99f471a17a5)
  • Remaining release-operator documentation gap: The added release overview names metadata and architecture publishes but not the split test, E2E, proof-pool, or CI Gate jobs that a tagged-release operator must distinguish from the removed serialized jobs. (docs/RELEASING.md:7, 4fe6f4d262f1)
  • Prior finding remains on the reviewed head: The prior completed review at the same head requested the release job inventory. The later branch commit changes only the workflow contract and full-history checkout behavior, leaving the release guide unchanged. (docs/RELEASING.md:7, f99f471a17a5)
  • Current-head behavior evidence: The provided exact-head check run completed successfully for the classifier, all three split test lanes, all three E2E lanes, metadata, x64 release smoke, proof-pool contracts, and CI Gate. This exercises the fail-closed infrastructure path introduced by this PR. (.github/workflows/ci.yml:878, f99f471a17a5)
  • Feature-history routing: Recent workflow history shows Scott Hanselman authored the current main classifier baseline and adjacent CI optimization work, providing a concrete routing signal for the remaining documentation repair. (.github/workflows/ci.yml:18, 5d192398e8d9)

Likely related people:

  • Scott Hanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add the current split tagged-release job inventory and required outcomes to docs/RELEASING.md.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-04T01:14:26.089Z sha 4fe6f4d :: blocked before merge. :: [P2] Update the release job inventory
  • reviewed 2026-09-04T01:38:42.601Z sha f99f471 :: blocked before merge. :: [P2] Document the replacement release job inventory

@shanselman shanselman removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Sep 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@shanselman
shanselman merged commit 969fe6d into main Sep 4, 2026
30 checks passed
@shanselman
shanselman deleted the shanselman-ci-code-fast-paths branch September 4, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant