Skip to content

fix(ci): reduce repeated validation for unchanged inputs - #158018

Merged
vincentkoc merged 7 commits into
mainfrom
chore/ci-run-cost-reduction
Sep 25, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
chore/ci-run-cost-reduction

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Closes #158017

What Problem This Solves

Main pushes and hourly workflows allocate runners and install tools repeatedly even when their validation inputs have not changed.

User Impact

Maintainers get less repeated CI work while retaining security-fast, the required CI gate, ClawSweeper, docs publication, cache warming, and manual recovery. Product behavior is unchanged.

Stable closeout now runs on relevant release-input changes. The canonical pnpm release:stable closeout phase still waits for publication and dispatches closeout. When publishing directly from Actions after an earlier main forward-port, dispatch stable closeout explicitly after publication succeeds; the command is documented. The maintainer explicitly approved this release-closeout handoff in the task; this is the accepted release-owner decision.

Why This Change Was Made

Gate expensive workflow tooling while preserving the global conflict-marker guard, scope Testbox triggers to their actual dependencies, and remove the standalone hourly Docs run. Main's native ci.yml schedule already owns hourly docs checks for both hosted and RunsOn routing; this PR preserves that scheduler and its automatic runner, cache, locale, and Docs Agent policies.

Scaffold and conformance schedules reuse only recent successful job proof with a complete unchanged-input comparison. Unknown inputs run, decisions report their reason, and daily refresh covers external drift. Sandbox smoke becomes daily. Main independently landed the equivalent release-fixture scratch isolation; integration accepts those versions and removes the duplicate two-file change from this PR.

The shared proof-admission action and explicit input scopes account for the production growth (+314 lines); tests add +387 and docs +40 across 19 files. Dependency-cache fingerprint closure for scripts/lib/fs-safe-prebuild.mjs and scripts/windows-cmd-helpers.mjs remains a separate follow-up; their Testbox trigger inputs are included here.

Workflow Sanity also treats unavailable GitHub diff lookup as unknown scope: it emits a bounded warning and runs the full trusted workflow audits. It never converts lookup failure into a skipped audit.

Evidence

  • Final integrated head 0f80c68ef33a6ccf169c2688a0cb094b8cfb51b2 resolves the actual main conflict against a29a24123c6cb9fa815827a47ed3daab1957e2e4 by accepting its equivalent release fixtures. Independent review verified all remaining 19 PR file blobs are byte-identical to the tested candidate below; no new CI behavior was introduced. Formatting and diff checks passed.
  • Pre-integration candidate f7b669891573dff0c1746fa39f6d882ebfcdcca7: all 21 changed file hashes verified on a task-owned Blacksmith Testbox; eight focused test files passed (706 tests), one worker per command. pnpm check:workflows passed actionlint, zizmor and repository workflow guards. Targeted formatting and git diff --check passed.
  • The actual Workflow Sanity script rejected both PR and push API failures before this correction; the repaired script admitted full audits and emitted a warning for both. The focused cost suite now covers both failures alongside unchanged, changed, renamed, truncated, unavailable and stale proof inputs.
  • Independent source review approved the final two-file correction; the required fresh autoreview helper completed scoped-clean at P0. The integrated source was reviewed against pinned main 79399a653aab550016c73734c0b4e3ef46adb903, preserving its native hourly scheduler. Live GitHub job-attempt and compare response contracts were verified.
  • Previous head 41874db05cfd3cb0825d86cd8cdee7a45eca8a51 completed hosted CI successfully. Final integrated-head CI36118692452 completed successfully (86 jobs, zero failures), Workflow Sanity passed, and the required openclaw/ci-gate commit status became success at09:45:24 UTC after the security continuation. The published exact-head ClawSweeper review, reviewed at 09:54:42 UTC and published at 09:57:13 UTC, has no findings or remaining before-merge moves. The earlier completed exact-head review artifact was also read and its manifest checksums verified; it independently records zero findings and no rank-up steps.
  • Focused Testbox run: Node 24.19.0, pnpm 12.4.2, Linux, pnpm test <file> --maxWorkers=1 for each file below. The lease is stopped. The timing requirement is satisfied by these measurements; it is not deferred as optional profiling.
Test file (test/scripts/) One-worker command wall (s) Existing hosted CI test time (s)
ancillary-workflow-concurrency.test.ts 2.390 0.800
ci-hourly.test.ts 2.376 Not reported in the cited hosted jobs
ci-security-fast-workflow.test.ts 3.269 3.168
ci-workflow-cost.test.ts 1.950 0.152 (20 cases, current head)
ci-workflow-guards.test.ts 72.206 79.205
release-stable-post.test.ts 6.188 9.776
release-stable.test.ts 8.833 13.348
verify-pr-hosted-gates.test.ts 2.060 0.905

Wall times include command startup; CI test times are per-file Vitest measurements: workflow cost/admission/security/guards come from current head0f80c68; release siblings and hosted-gate contracts come from integrated predecessor4aecdf0. The final cost suite's 20 cases took 0.057 s of test time on Testbox. The existing 322-case workflow-guards file exceeds 30 s because it executes workflow planning and owner contract scenarios; this PR adjusts existing assertions and adds no cases there. A source-only string check would not preserve those executable contracts. These are validation costs, not measured post-landing runner savings.

@vincentkoc vincentkoc self-assigned this Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 25, 2026 08:25
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L labels Sep 25, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 9886b06243878e0c990d6f3652a27c1fda04d869. The follow-up is five test files: align workflow admission/path/docs expectations, retain real cancellation coverage, and isolate both release fixture families under existing checkout scratch to prevent concurrent compiler namespace changes. Production workflow changes are unchanged. Targeted formatting and independent source review passed; exact-head hosted execution is pending.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head e92928936b7306d249dcf8c568dfe8f9f4a197f9. The only change since the prior requested head is two non-null assertions for known test fixture entries, addressing the complete hosted test-type diagnostics. All four earlier failing runtime shards and the remaining lint stripe passed. Production behavior is unchanged. Required current-head CI/typechecking remains pending.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact integrated head 4aecdf0edf7999132f40c23b7e8aa833bc263fe4, now mergeable against main. It incorporates main 79399a653aab550016c73734c0b4e3ef46adb903 and preserves the new native hourly schedule, runner/cache/locale policy, and Docs Agent admission. The retired hourly-dispatch docs override is gone; scheduled docs coverage for ordinary and RunsOn routing remains tested. Other CI reductions and the reviewed test fixes are retained. Independent full integration review and a fresh required autoreview pass are clean; current-head CI/typechecking is running.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer 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 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 5:54 AM ET / 09:54 UTC (Revision 3).

ClawSweeper review

What this changes

The branch narrows when CI and Testbox workflows run, reuses recent successful scheduled validation when inputs are unchanged, and documents how stable-release closeout is dispatched after publication.

Merge readiness

✅ Ready for maintainer review

Current main still performs the repeated validation identified by the linked issue, and this PR remains its open implementation candidate. The earlier Workflow Sanity lookup finding is repaired on the reviewed head; I found no new blocking defect in the introduced changes.

Priority: P2
Reviewed head: 0f80c68ef33a6ccf169c2688a0cb094b8cfb51b2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused workflow coverage, reported boundary probes, and successful hosted checks support a sound patch, with savings observable only after landing.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The member-authored PR is exempt from contributor real-setup proof. Its body reports Linux Testbox probes of the changed Workflow Sanity lookup path and successful exact-head hosted CI; neither measures post-merge runner savings. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is exempt from contributor real-setup proof. Its body reports Linux Testbox probes of the changed Workflow Sanity lookup path and successful exact-head hosted CI; neither measures post-merge runner savings. No stored-data contract changes.
Evidence reviewed 8 items Current-main baseline: The standalone Docs workflow still has a schedule on fetched main, and the shared scheduled-change action is absent there; the central efficiency change is not already implemented.
Scheduled proof admission: The introduced action requires successful named jobs, checks their age, compares input paths, and requests fresh validation when proof or comparison is unavailable.
Earlier finding resolved: Workflow Sanity now catches failed PR-file and push-compare lookups and sets changed=true, admitting the full trusted audits. The new focused test covers both rejection paths.
Findings None None.
Security None None.

How this fits together

GitHub Actions receives pull request changes, main pushes, and hourly timers, then decides which validation jobs need runners. Those jobs produce check results; stable-release closeout separately verifies publication evidence and attaches a release manifest.

flowchart LR
  A[Pull request, push, or timer] --> B[Workflow admission]
  B --> C{Inputs changed or proof stale?}
  C -->|Yes| D[Validation jobs]
  C -->|No| E[Recent success reused]
  D --> F[Check results]
  B --> G[Stable closeout]
  G --> H[Release evidence]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +387, Docs +40, Config +314. Total +741 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 403 16 +387
Docs 2 52 12 +40
Config 11 377 63 +314
Generated 0 0 0 0
Other 0 0 0 0
Total 19 832 91 +741

Review metrics

Metric Value Why it matters
Code and validation growth production +314 lines, tests +387 lines, docs +40 lines The PR attributes production growth to shared proof admission and records focused test costs.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #158017
Summary: The linked open issue states the same CI efficiency goal; this unmerged PR is its explicit implementation candidate.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep admission and proof reuse in the existing workflows, preserve full audits when input scope is unknown, and retain explicit postpublication closeout through the release orchestrator or operator dispatch.

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

Not applicable as a bug reproduction: current-main workflow triggers and unconditional tooling setup establish the repeated-work baseline.

Is this the best way to solve the issue?

Yes. The branch changes admission at the existing workflow owners, retains daily refresh, and runs full audits when the changed-input lookup cannot establish a safe skip.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 364f1ddf3b66.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from contributor real-setup proof. Its body reports Linux Testbox probes of the changed Workflow Sanity lookup path and successful exact-head hosted CI; neither measures post-merge runner savings. No stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded CI efficiency improvement with maintainer impact and no reported user-facing outage.
  • merge-risk: 🚨 automation: Input-based admission changes when validation and stable closeout run; the linked maintainer issue specifies the direct-Actions handoff, and unknown audit scope runs full checks.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from contributor real-setup proof. Its body reports Linux Testbox probes of the changed Workflow Sanity lookup path and successful exact-head hosted CI; neither measures post-merge runner savings. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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-25T09:02:23.689Z sha 4aecdf0 :: needs changes before merge. :: [P2] Align the stable release runbook with initial manual closeout
  • reviewed 2026-09-25T09:14:51.357Z sha 41874db :: blocked before merge. :: [P2] Fall back to full workflow audits when scope lookup fails

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 41874db05cfd3cb0825d86cd8cdee7a45eca8a51. The sole change since the reviewed integrated head aligns docs/reference/RELEASING.md with the initial direct-Actions closeout procedure; orchestrated, repair/replay, and failed-publish recovery evidence checks remain intact. Independent docs review, docs listing, formatting, and diff checks passed. Integrated test types and all four affected compact shards passed on the unchanged code parent.

The optional separate one-worker benchmark and attributable post-landing CI-seconds measurement are deferred outside the approved CI-removal acceptance scope. The PR body records the available measured 36 ms test time and 82-second focused-suite wall time without presenting either as standalone one-worker timing or production savings. Current-head CI remains the enforced landing gate.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head f7b669891573dff0c1746fa39f6d882ebfcdcca7.

The scope lookup finding is fixed at its owner: GitHub PR/push lookup rejection emits a bounded warning and enables all trusted workflow audits. Actual-script before/after probes demonstrated both failures, and both new regression cases pass.

The maintainer explicitly approved the documented release-closeout handoff in this task. The canonical release:stable owner still waits for exact publisher success; direct Actions publication uses the documented initial manual closeout command. No new owner decision is pending.

The PR body now reports individual pnpm test <file> --maxWorkers=1 wall times for all eight changed test files and available per-file hosted CI seconds, with the existing workflow-guards cost explained. This corrects the earlier characterization of required timing evidence as optional. Exact candidate proof: 706 focused tests, workflow checks including actionlint/zizmor, formatting/diff checks, independent source review and scoped-clean autoreview. The task-owned Testbox is stopped. Current-head hosted CI remains a separate landing gate.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please refresh exact head 0f80c68ef33a6ccf169c2688a0cb094b8cfb51b2. Main independently landed the same release-fixture isolation, causing a merge conflict; this integration accepts those two upstream versions and drops them from the PR. Independent review verified all remaining 19 file blobs exactly match the previously tested and reviewed f7b669891573dff0c1746fa39f6d882ebfcdcca7 candidate. No new CI behavior or source finding.

The preceding request’s finding resolution remains unchanged: bounded warning plus full audits on PR/push lookup failure, explicit maintainer-approved release-closeout handoff, 706 focused tests and workflow checks, and required individual one-worker wall/available hosted CI timing evidence in the updated PR body. Current integrated-head CI is a separate landing gate.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 25, 2026
@vincentkoc
vincentkoc merged commit cbcd4df into main Sep 25, 2026
164 checks passed
@vincentkoc
vincentkoc deleted the chore/ci-run-cost-reduction branch September 25, 2026 10:00
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…8018)

* fix(ci): avoid repeated workflow and scheduled validation work

* test(ci): align workflow contracts and isolate release fixtures

* test(ci): assert known workflow fixture entries

* docs(release): clarify initial stable closeout dispatch

* fix(ci): run workflow audits when scope lookup fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

Reduce repeated CI work on unchanged inputs

1 participant