Skip to content

fix(ci): reject stale and empty timing sample cohorts - #143182

Merged
vincentkoc merged 1 commit into
mainfrom
fix/ci-timing-sample-provenance-34354161815
Sep 9, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/ci-timing-sample-provenance-34354161815

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Related: #142719

What Problem This Solves

Resolves a problem where maintainers refitting CI timings could select stale runs or count successful runs with no usable compact measurements, then report success because the existing timing baseline was populated.

Why This Change Was Made

The sampler now freezes one inclusive seven-day UTC window, applies both bounds to every run-list page, and validates returned run and job provenance. It enumerates attempts 1 through each captured run_attempt, preserving successful original jobs when only failed jobs are retried, while counting retries as one independent run/profile sample.

Run selection seeks actual compact contributors using the canonical parser's existing contributor sets. Fewer than two independent main contributors, or no newly eligible compact key, fails visibly without writing. Existing aggregation, pruning, unchanged-output behavior, and untouched profiles are preserved.

User Impact

Maintainers get a bounded, auditable fresh timing cohort instead of a successful no-op based on old weights. Reports distinguish main and release observations and show run, attempt, workflow SHA, creation date, parsed profiles, and job count. Release workflow SHAs identify tooling, not the measured target.

No runtime, generated timing weights, workflow, runner class, shard count, or concurrency changes are included. This repair claims no immediate CI speedup. Any later weight refresh remains a separate change and must validate the same or fewer runner allocations to avoid oversharding.

Evidence

  • Regression reproduced before repair: a populated baseline with no fresh compact contributors returned success. The new boundary test failed on the original behavior.
  • node scripts/run-vitest.mjs test/scripts/ci-test-timings.test.ts --reporter=dot: 126/126 passed, 30.84 seconds.
  • Coverage includes frozen-clock boundaries, stale/future timestamps, event/branch/SHA/attempt identity, incomplete and duplicate pagination, docs-only/unparseable logs, original successful jobs plus partial retries, retry independence, release-only rejection, unchanged bytes, untouched profiles, and the existing 25-page job budget.
  • Targeted formatting and git diff --check passed.
  • GitHub's official workflow-run contract and attempt-specific job contract were checked directly.
  • Bounded live metadata queries used the identical 2026-09-02T14:18:52.381Z..2026-09-09T14:18:52.381Z range on two run-list pages. An attempt-specific job query verified run_id, run_attempt, head_sha, completion, and runner-label fields. No bulk logs or timing artifacts were downloaded; partial-retry behavior is covered by the CLI fixture, not claimed as a live retry observation.
  • Independent source review found no blocking findings. Fresh autoreview was scoped-clean through P2 with no accepted/actionable findings. Exact-head hosted CI and the native landing gates remain required before merge.

Tooling delta: +91 net lines for cohort/provenance validation and reporting; tests: +281; docs: +20. The producer repair in the related PR remains unchanged.

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

clawsweeper Bot commented Sep 9, 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 9, 2026 14:36
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: L maintainer Maintainer-authored PR labels Sep 9, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 10:43 AM ET / 14:43 UTC.

ClawSweeper review

What this changes

The CI timing refresher selects recent usable measurements, validates run and job identity across retries, and rejects insufficient samples before changing saved timing weights.

Merge readiness

✅ Ready for maintainer review

This remains a useful, distinct repair: current main still allows retained baseline weights to mask an empty measurement cohort. No blocking defect was found in the introduced changes, and the related merged PR does not supersede this work.

Priority: P2
Reviewed head: 01ead5ddd84c45f879ae0d6f7b34eaf869158333

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful boundary coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The member-authored PR is exempt from the external-contributor proof gate. Its captured evidence reports live metadata checks and CLI fixtures for the changed sampler; it explicitly does not claim a live partial-retry run.
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 the external-contributor proof gate. Its captured evidence reports live metadata checks and CLI fixtures for the changed sampler; it explicitly does not claim a live partial-retry run.
Evidence reviewed 8 items Current main still contains the reported defect: The current-main sampler checks the aggregated timing maps after incorporating the previous baseline, so existing weights can satisfy the nonempty check without fresh measurements.
Latest release retains the same baseline check: The supplied latest release, v2026.9.3, also checks populated timing maps after loading the baseline; the reviewed repair is not present there.
Repair occurs before baseline loading: The introduced sampler validates a fresh aggregation and requires two independent main compact contributors plus an eligible compact key before loading prior weights. Attempt logs remain grouped under one run, preserving the existing aggregation rules.
Findings None None.
Security None None.

How this fits together

The CI timing refresher reads GitHub Actions job logs and produces committed duration estimates used to distribute tests across CI jobs. Its scheduled workflow proposes weight updates through a standing PR.

flowchart TD
  A[GitHub Actions runs] --> B[Seven-day sample window]
  B --> C[Validate jobs and attempts]
  C --> D[Parse successful measurements]
  D --> E{Enough independent compact samples?}
  E -->|No| F[Fail without writing]
  E -->|Yes| G[Aggregate with existing weights]
  G --> H[Report or propose timing update]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +281, Docs +20, Other +91. Total +392 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 406 125 +281
Docs 1 30 10 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 2 208 117 +91
Total 4 644 252 +392

Review metrics

Metric Value Why it matters
Tooling versus regression coverage Tooling +91 net lines; tests +281 net lines The stated tooling growth implements bounded cohort validation and reporting, with the larger test delta exercising the CLI boundary.

Technical review

Best possible solution:

Keep freshness and sample eligibility checks in the sampler while retaining the canonical aggregation, baseline preservation, and separate review of generated weight updates.

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

Yes, from source: successful runs without parsed measurements plus a populated baseline pass current main's final nonempty check. The PR reports a failing-before regression; this review did not execute it.

Is this the best way to solve the issue?

Yes. Checking fresh contributors before baseline merging fixes the misleading success at its owner and reuses existing parsing and independent-run aggregation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This repairs misleading success in a maintainer timing-refresh workflow without changing runtime behavior or current CI allocations.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 the external-contributor proof gate. Its captured evidence reports live metadata checks and CLI fixtures for the changed sampler; it explicitly does not claim a live partial-retry run.

Label justifications:

  • P2: This repairs misleading success in a maintainer timing-refresh workflow without changing runtime behavior or current CI allocations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 the external-contributor proof gate. Its captured evidence reports live metadata checks and CLI fixtures for the changed sampler; it explicitly does not claim a live partial-retry run.

Evidence

What I checked:

Likely related people:

  • 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)

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.

@vincentkoc
vincentkoc merged commit 7a1ff2c into main Sep 9, 2026
184 of 185 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-timing-sample-provenance-34354161815 branch September 9, 2026 14:50
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 9, 2026
…er-ownership-20260909

* origin/main: (147 commits)
  fix(cli): reject blank account selectors before command startup (#143088)
  fix(update): repair young runs after recorded drivers exit (#143136)
  test(telegram): close model callback fixture connections (#143197)
  improve(test): reduce Telegram policy fixture startup overhead (#143192)
  test(ci): stabilize systemd manager shim timing (#143134)
  fix(test): retire chat preview Escape listeners during teardown (#143191)
  test(memory-wiki): share visibility test callbacks (#143181)
  fix(ci): accept native iOS keychain filenames (#142968)
  fix(ci): show publication observations in FRV status (#143171)
  fix(github): point the stuck-FAQ auto-response at a live anchor (#143194)
  docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179)
  refactor(tests): remove duplicate Mistral cache-cost test (#143172)
  fix(doctor): complete canonical model-reference migration (#142284)
  fix(ci): reject stale and empty timing sample cohorts (#143182)
  fix(ui): remove first-reply confetti from chat (#143167)
  docs: split help/faq into 13 topic pages (#143150)
  refactor(docs): require caller-owned route indexes (#143164)
  fix(android): distinguish connection status from chat readiness (#143128)
  refactor: share agent-turn execution test defaults (#143166)
  fix(cli): print immutable-config refusals without crash framing (#143140)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

1 participant