Skip to content

fix(ci): avoid redundant release validation work and delayed failures - #167356

Merged
vincentkoc merged 5 commits into
mainfrom
fix/frv-efficiency-20261008
Oct 8, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/frv-efficiency-20261008

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes avoidable full release validation work, repeated artifact builds, late producer-failure detection, and oversized Node test jobs.

User Impact

Release maintainers get fewer scheduled jobs, authenticated reuse of retained publication artifacts, and earlier actionable failures. There is no runtime product change. Existing qualification, artifact integrity, coverage, worker limits, and release gates remain enforced.

The observed hour-long updater/Doctor hangs and Kova memory overage still need separate investigation. This change improves their diagnostics and bounds; it does not claim to fix those root causes. Existing frozen release cuts need an intentional backport or new qualification to consume these changes.

Why This Change Was Made

  • Preserve measured timing generations, split long hosted release groups, and pack compatible short groups serially. The frozen plan drops from 159 to 145 jobs, preserving all 12,461 file/config/environment/build/runner contracts. The largest predicted job is 719 seconds; this is a planning estimate, not a measured FRV wall-time saving.
  • Revalidate whole-parent reuse with the admitted verifier and reuse only authenticated, available publication artifacts. Preserve original producer attempts when selecting SDK and package archives. Missing or expired payloads, including the separate SDK evidence archive for the original qualified attempt, select a fresh build; identity or digest drift fails.
  • Detect failed artifact producers while their workflows are still running, move updater compatibility rejection before expensive builds, retry the observed transient GitHub HTTP/2 cancellation, and preserve phase diagnostics and timeout classification.

Evidence

  • Blacksmith Testbox run: 1,925 cases executed; 1,910 passed. Fifteen failures were traced to four fixture/input problems: dispatch environment and workflow expectations (7), registry teardown holding a diagnostic pipe open (6), the additional timing-discovery query (1), and publication JSON canonicalization in the new decision fixture (1). All 15 failures are corrected and passed focused native replays (35 cases across the affected owners).
  • Native boundary reproductions demonstrated early producer failure detection in 0.185/0.199 seconds, correct original-attempt archive selection, and registry teardown completing in 3.4–4.7 seconds. No retries, timeouts, or assertions were relaxed to obtain these results.
  • Independent review identified the missing 90-minute fallback for completely unmeasured CLI/chat/config rows; restored it and verified the three fallback owners with an injected native planner check.
  • ClawSweeper identified a missing SDK archive availability check. Three CLI regressions failed before the fix; the corrected artifact suite passes all 41 cases. Missing, expired, or wrong-attempt SDK evidence now selects fresh preparation.
  • PR CI exposed stale workflow expectations and fixture lint/type errors; corrected their contracts without relaxing assertions. The separate Docker cron cleanup failure came from an unchanged catalog-generation race: a remote catalog refresh superseded cron's prepared runtime before lease acquisition, then the fixture spent 120 seconds waiting for an impossible probe PID. The runtime owners and fixture are unchanged from the base; this is recorded as a follow-up.
  • Changed-file checks passed: formatting, ratchets, dependency guards, workflow security/syntax, script and affected root-test TypeScript graphs, coercion/export guards, scripts and changed-test lint, shell syntax, and Docker scheduler dry plan. Final focused replay uses the native PR checkout's own frozen dependencies after Testbox allocation collisions and AWS quota rejection. No proof workflow was dispatched or rerun solely to get green.
Measured focused test costs

Commands used pnpm test test/scripts/<file> --maxWorkers=1; wall seconds include startup.

File Wall seconds Initial result
full-release-artifacts.test.ts 11.04 38 passed
full-release-validation-state.test.ts 5.17 96 passed
full-release-validation-state.qualification.test.ts 2.60 15 passed, 1 fixture failure
find-reusable-release-validation.test.ts 8.70 50 passed
release-ci-summary.test.ts 12.90 137 passed
release-ci-summary.qualification.test.ts 3.50 18 passed
release-tooling-identity.test.ts 8.34 104 passed
package-acceptance-workflow.test.ts 240.78 555 passed, 7 fixture failures
npm-onboard-channel-agent-shell.test.ts 127.44 14 passed, 6 fixture teardown timeouts
upgrade-survivor-recovery-phase.test.ts 3.12 17 passed
docker-all-scheduler.test.ts 41.85 58 passed; cold transform approximately 30s
ci-release-node-test-plan.test.ts 6.58 5 passed before fallback correction
ci-shard-timings-refresh.test.ts 5.21 9 passed
ci-test-timings.test.ts 51.51 210 passed, 1 stale query expectation
ci-workflow-planning.test.ts 213.15 583 passed

The existing packed-runner sibling-continuation case passed separately in 2.15 seconds.

Final native replays passed: artifact CLI 41 cases/22.52s, continuation workflow 21/6.70s, publication qualification 18/5.30s, and state qualification 16/4.66s (96 cases). Earlier corrected-case replay passed package workflow 8/10.31s, npm shell 20/46.84s, timing discovery 1/55.84s (42.7s cold transform), planner 5/16.83s, and decision 1/8.91s. The corrected planner and artifact suites also passed together, 43 cases/24.85s before the SDK regression was added.

Initial PR CI measured the continuation file at 1.625s inside a 105.11s compact shard. Its one stale literal-condition assertion is replaced with the passing fresh/retry/reuse truth table above. The three added SDK cases cost 3.53s against the original defect and fail on that version; the final 41-case cost above includes their passing replay.

@vincentkoc vincentkoc self-assigned this Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 8, 2026 17:29
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: XL labels Oct 8, 2026
@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 Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 1:55 PM ET / 17:55 UTC (Revision 2).

ClawSweeper review

What this changes

The PR packs measured release tests, reuses authenticated retained publication artifacts, detects producer failures earlier, and preserves failure diagnostics.

Example: A release maintainer waits for npm qualification while another producer job continues running

  • Before: The waiter can continue polling after the dependency-check job has failed.
  • After: The waiter reports the failed job and its GitHub link while allowing the other producer jobs to continue.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The useful patch resolves the prior blocker and has focused boundary validation, with limited confidence in complete release-workflow execution.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The maintainer-authored PR is outside the external-contributor proof gate. Reported native CLI replays cover SDK fallback and producer diagnostics; a complete changed release workflow was not demonstrated. Existing artifact formats and historical preparation routes remain compatible without an operator-state migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release maintainers repeat artifact preparation and wait unnecessarily after producer failures, while long test jobs lose useful timing estimates.
Reason: The change addresses concrete release-automation failures within existing owners. Prior merged work and the author's established area history support the direction without adding product configuration.

Merge readiness

✅ Ready for maintainer review

The previous SDK archive blocker is resolved, and no new actionable defect was found. This maintainer-authored PR remains useful; the available validation supports the implementation without establishing complete release-workflow behavior or measured end-to-end savings.

Priority: P2
Reviewed head: 6c6fcb93a0dc9062cc8fdf210f83ac10f129e479

Before merge

None.

Findings

None.

Provenance

  • scripts/ci-build-manifest.mjs matrix metadata: original intent not found (unknown: Historical content searches could not hydrate required blobs because the promisor remote returned 403; the exact introduction reason was not established.)
  • scripts/e2e/lib/upgrade-survivor/run.sh and scripts/e2e/npm-onboard-channel-agent-docker.sh: original intent not found (unknown: Path history identifies prior diagnostic-preservation work, but historical content searches returned 403 and did not establish introduction of the exact changed phase and trap behavior.)
  • scripts/test-docker-all.mts and scripts/full-release-validation-policy.mjs failure classification: original intent not found (unknown: Path history was inspected, but historical content searches returned 403 and the exact introduction reasons for these classifications remain unknown.)

Tests

  • Missing end-to-end proof: No complete nonpublishing Full Release Validation run is shown exercising the new retained-artifact workflow and packed jobs together; CLI and workflow fixtures support these contracts, but do not establish actual release wall-time savings.
Agent review details

How this fits together

Full Release Validation coordinates tests and prepares package and container artifacts for an exact release candidate. Publication workflows consume its authenticated evidence and original artifact descriptors before publishing.

flowchart TD
 A[Exact release candidate] --> B[Release validation coordinator]
 C[Retained validation evidence] --> D[Admission and artifact verification]
 D --> E{Complete reusable artifacts?}
 E -->|Yes| F[Original qualified artifacts]
 E -->|No| G[Fresh artifact preparation]
 B --> D
 F --> H[Publication gates]
 G --> H
Loading

Technical review

Best possible solution:

Keep release evidence authentication in the existing verifier and reuse only complete original artifacts while preserving fresh preparation and publication authority checks.

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

Yes, source and executable regression scenarios establish the redundant preparation, delayed producer-failure detection, and original-attempt selection paths; this review did not execute them.

Is this the best way to solve the issue?

Yes, the patch extends the existing release owners and preserves their authentication and fallback contracts; complete workflow timing improvement remains unmeasured.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness. Added test files: 15.

Security

None.

Evidence

What I checked:

  • Previous SDK finding resolved: Reuse now looks up plugin-sdk-api-release-diff using the qualified producer's original run and attempt, checks retention and artifact binding, and falls back to fresh preparation when it is unavailable. (scripts/full-release-artifacts.mjs:490, 6c6fcb93a0dc)
  • Focused SDK regression coverage: The artifact CLI scenarios cover expired, missing, and wrong-attempt SDK archives and require publication_artifacts_reused=false; changed receipt or digest scenarios reject reuse. The captured maintainer comment reports that the three SDK regressions failed before repair and all 41 artifact cases passed afterward. (test/scripts/full-release-artifacts.test.ts:488, 6c6fcb93a0dc)
  • Publisher preserves original qualification attempt: The publisher selects the recorded qualified producer attempt for both the preflight output and SDK archive, rather than using a newer receipt-only attempt. (.github/workflows/openclaw-release-publish.yml:595, 6c6fcb93a0dc)
  • Reuse retains qualification authority: The strict verifier authenticates current admission and compares candidate, qualification, publisher, coverage, and inputs before accepting a retained root. Added qualification cases reject changed inputs, candidate, publisher, and revoked publisher authority. (scripts/release-ci-summary.mjs:2664, 6c6fcb93a0dc)
  • Final publication authority remains separate: The existing publication consumer authenticates publish-purpose qualification and exposes process-local authority revalidation; npm lineage verification refreshes that authority after awaited evidence work. Artifact reuse does not itself grant publication permission. (scripts/validate-full-release-validation-evidence.mjs:594, 6c6fcb93a0dc)
  • Planner preserves execution contracts: Packing is limited to measured, non-dist rows with matching runner, preparation, environment, and timeout requirements; groups retain their timing identities, separate processes, serial admission, and two-worker ceilings. (scripts/lib/ci-node-test-plan.mts:3450, 6c6fcb93a0dc)

Likely related people:

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

PR surface

Tests +1178, Docs +1, Config +119, Other +891. Total +2189 across 37 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 17 1369 191 +1178
Docs 1 1 0 +1
Config 4 138 19 +119
Generated 0 0 0 0
Other 15 982 91 +891
Total 37 2490 301 +2189

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/run.sh, unknown-data-model-change: scripts/full-release-artifacts.mjs. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This is a bounded release-automation improvement with no demonstrated urgent product-runtime regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T17:38:22.904Z sha 5eb5ec0 :: needs changes before merge. :: [P2] Check SDK archive availability before accepting publication reuse

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Fixed the SDK availability finding in f37b84f. Reuse now requires the separate SDK evidence archive for the original qualified producer attempt. Missing, expired, and wrong-attempt regressions fail against the prior implementation and pass after the fix; all 41 artifact CLI cases pass. The corrected workflow/qualification replay passes 96 cases, and fixture lint/type corrections are included.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc enabled auto-merge (squash) October 8, 2026 17:52
@vincentkoc
vincentkoc merged commit 11f0d10 into main Oct 8, 2026
136 of 137 checks passed
@vincentkoc
vincentkoc deleted the fix/frv-efficiency-20261008 branch October 8, 2026 18:02
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…openclaw#167356)

* fix(ci): preserve release failure diagnostics and bounded recovery

* fix(ci): bound and pack measured full-release test jobs

* fix(ci): reuse authenticated release publications and fail waits early

* fix(ci): require complete retained publication inputs

* fix(ci): narrow artifact and workflow error contracts
RomneyDa pushed a commit that referenced this pull request Oct 13, 2026
…#167356)

Backport of 11f0d10 (#167356) adapted for 2026.10.3.

Timing refit keeps the release line's push-event main sampling; the hosted
release planner keeps its historical-wall floor but retires it once the current
selection is measured and leaves continuity owners to the ported retention.
Ports the completed-producer-success archive policy (from #165856) needed by
publication reuse, and guards an empty Bash 3.2 array in the reuse finder.

(cherry picked from commit 11f0d10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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