Skip to content

ci: repair long-tail test jobs and refresh their timing weights - #149665

Merged
steipete merged 1 commit into
mainfrom
ci-burden/tails-refit
Sep 16, 2026
Merged

steipete merged 1 commit into
mainfrom
ci-burden/tails-refit

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Main compact CI repeatedly spent 30–32 minutes in one Gateway bin, and broad PR fallback hid more than twenty minutes of database-worker tests inside a roughly four-minute estimate. This is the maintainer-requested Lane T repair from the September 16 CI burden analysis.

User Impact

CI retains test coverage, timeouts, worker limits, and admission budgets. Plugin fallback now includes migrated database-worker tests when their original plugin changes and keeps their actual file scope when packing jobs. There is no runtime product change.

Why This Change Was Made

The Gateway fallback proof paid nine real backoff delays in each of eleven cases. A suite-scoped spy now delegates to the original abortable sleep with a one-millisecond delay, then restores it after the suite. All ten primary HTTP attempts, registered Gateway calls, storage, and fallback/pinning assertions remain real.

Plugin fallback grouped files by plugin root, missing exact-file database ownership. A singleton then lost its include list and executed the whole database config. File ownership now comes from the existing resolver, every process-bounded envelope retains its scope, and unequal chunks are priced by their own file counts with the existing rates. No tests are removed.

The canonical timing reducer refits only the two downloaded successful main CLI jobs, preserving the independent-run, outlier, and 15% replacement rules. agentic-cli changes from 136 to 595 seconds; its exact process companion receives an 89-second measurement. No unobserved keys are pruned.

Evidence

Source runs: 35042635751, 35044335386, 35045292864, and 35046146611.

Tail Attribution and before Repair / measured local result
Compact small-4 In run 35045292864, runtime-state spans 1,676.732s; server.visible-spawn-fallback.product-proof.test.ts accounts for 1,538.261s of case time. The unrelated tasks-list assertion fails later in this run. Same fallback scenario: 232.449→25.475s case time and 321.81→67.15s wall on the loaded local host, retaining ten primary requests. Host load and transform-cache state differ. All eleven cases pass in 132.958s of case time / 250.26s wall.
Plugin bundle-25 Database workers: 1,333.86s across 32 subprocesses/278 files; Signal: 89.26s. The largest database subprocess covers Memory Core, Workboard, Team Reports, and Logbook: 181 files/567.05s. Current 283 database files occur exactly once across 17 explicit envelopes, including built-in plugins without package manifests. Broad plugin jobs 43→40. Matched historical work in the largest replacement bin totals approximately 659s, versus 1,423s before; this is a forecast, not new native timing.
Plugin bundle-16 Three Codex envelopes: approximately 154/108/263s; total job 569s. run-attempt.test.ts accounts for 160.504s of test bodies. Already below twelve minutes in the fetched run. Weights retained: the compact refit does not collect plugin fallback jobs, and PR-only observations do not satisfy its main-run provenance rules.
CLI Successful main child spans 569.841s and 620.791s; largest file is update-cli.test.ts at 195.044/252.765s of case bodies. Canonical rounded median 595s. Hybrid CLI becomes standalone at 518 predicted seconds, replacing the 219-second CLI-plus-companion bin. Compact descriptor count remains 29 including dist.

Local validation: all 11 Gateway fallback cases, all 385 required planner/timing tests, and all 189 extension-planner sibling tests pass. The broad database regression demonstrably fails before the repair. Docs inventory and git diff --check pass. Independent review reports no actionable P0–P2 findings. The full check-changed run passed types, core lint, and all earlier guards, then caught the mapper’s map-spread lint rule. The mapper now uses Object.assign; the scoped changed-file rerun and remaining root-test lint complete that validation. Branch autoreview is scoped-clean at P0–P2. Head: bd33097d6eddaabc55d47ddb76101acfd9608985. All affected jobs and the full exact-head CI workflow passed. This PR is not requested for merge.

Native CI measurements

Run 35053574908 validates head bd33097d6eddaabc55d47ddb76101acfd9608985 in merge checkout 953456518e744e6b2e3aa0e026d98966dfd0acd9. All affected jobs and the full CI workflow passed. The single five-minute-interval watcher finished GREEN.

Work Cited job wall New job wall Executed child evidence
Compact small-4 1,973s 378s Runtime-state 1,676.732→93.559s; all eleven fallback cases 1,538.261→12.738s.
Database-worker fallback 1,465s (bundle-25) 583s (bundle-23) Explicit 183-file root envelope 475.298s; Signal 68.965s; one Mattermost worker 3.500s.
Former Codex bundle-16 569s 278s / 425s (bundles 14/15) All 36 original files are present across these two jobs, which also carry other work. The slow run-attempt.test.ts file is in bundle-15 and takes 127.941s of case time.
Full CLI 721s / 740s 437s (small-11) CLI runs alone; complete child span 405.038s. The committed 595-second weight remains based on two main runs, not this single PR observation.

Runner classes remain 32 for compact small-4, 16 for CLI, and 8 for plugin jobs. These are observed results from one PR run with newer main commits included; lower child costs outside the backoff repair are not attributed solely to this patch. Plugin fallback emits 41 rows in this native merge checkout versus the 40-row local dry run; bundle numbering differs, so the comparisons above use decoded config/file inventories. At the ten-minute checkpoint, 143 of 146 jobs had completed with no failures; the full workflow subsequently finished successfully.

Before/after emitted bins for the affected compact and database groups

Before

Job Predicted seconds Children
checks-node-compact-small-12 219 agentic-cli (cli/whole config); agentic-cli-process-hosted-4 (cli-process/5 files)
checks-node-compact-small-4 360 agentic-commands-doctor-sessions-cron-memory (commands/1 files); agentic-control-plane-agent-chat-hosted-2 (gateway-server/38 files); agentic-control-plane-auth-node-hosted-1 (gateway-server/27 files); agentic-plugin-sdk-hosted-2 (plugin-sdk-light, plugin-sdk/110 files); agentic-control-plane-runtime-state (gateway-server/35 files)
checks-node-changed-extensions-bundle-25 239 changed-extensions-config-45 (extension-database-workers/whole config); changed-extensions-config-58 (extension-signal/whole config)

After

Job Predicted seconds Children
checks-node-compact-small-11 518 agentic-cli (cli/whole config)
checks-node-compact-small-4 360 agentic-commands-doctor-sessions-cron-memory (commands/1 files); agentic-control-plane-agent-chat-hosted-2 (gateway-server/38 files); agentic-control-plane-auth-node-hosted-1 (gateway-server/27 files); agentic-plugin-sdk-hosted-2 (plugin-sdk-light, plugin-sdk/110 files); agentic-control-plane-runtime-state (gateway-server/35 files)
checks-node-changed-extensions-bundle-8 238 changed-extensions-config-9 (extension-providers/whole config); changed-extensions-config-78 (extension-telegram/10 files); changed-extensions-config-50 (extension-database-workers/2 files)
checks-node-changed-extensions-bundle-9 239 changed-extensions-config-10 (extension-providers/whole config); changed-extensions-config-13 (extension-misc/whole config); changed-extensions-config-57 (extension-database-workers/3 files)
checks-node-changed-extensions-bundle-10 239 changed-extensions-config-11 (extension-providers/whole config); changed-extensions-config-76 (extension-telegram/10 files); changed-extensions-config-61 (extension-database-workers/3 files)
checks-node-changed-extensions-bundle-11 240 changed-extensions-config-12 (extension-providers/whole config); changed-extensions-config-77 (extension-telegram/10 files); changed-extensions-config-48 (extension-database-workers/2 files); changed-extensions-config-49 (extension-database-workers/2 files)
checks-node-changed-extensions-bundle-12 240 changed-extensions-config-14 (extension-browser/whole config); changed-extensions-config-100 (extension-zalo/whole config); changed-extensions-config-46 (extension-database-workers/2 files)
checks-node-changed-extensions-bundle-19 232 changed-extensions-config-32 (extension-codex/12 files); changed-extensions-config-68 (extension-msteams/whole config); changed-extensions-config-7 (extension-acpx/whole config); changed-extensions-config-65 (extension-matrix/33 files); changed-extensions-config-58 (extension-database-workers/9 files); changed-extensions-config-55 (extension-database-workers/5 files)
checks-node-changed-extensions-bundle-20 240 changed-extensions-config-39 (extension-discord/whole config); changed-extensions-config-60 (extension-database-workers/15 files); changed-extensions-config-51 (extension-database-workers/12 files)
checks-node-changed-extensions-bundle-21 240 changed-extensions-config-42 (extension-imessage/whole config); changed-extensions-config-67 (extension-memory/whole config); changed-extensions-config-15 (extension-codex/12 files); changed-extensions-config-59 (extension-database-workers/8 files)
checks-node-changed-extensions-bundle-22 240 changed-extensions-config-52 (extension-database-workers/183 files); changed-extensions-config-74 (extension-signal/whole config); changed-extensions-config-54 (extension-database-workers/1 files)
checks-node-changed-extensions-bundle-23 237 changed-extensions-config-69 (extension-provider-openai/whole config); changed-extensions-config-41 (extension-messaging/whole config); changed-extensions-config-47 (extension-database-workers/13 files)
checks-node-changed-extensions-bundle-37 240 changed-extensions-config-94 (extension-telegram/9 files); changed-extensions-config-96 (extension-telegram/9 files); changed-extensions-config-17 (extension-codex/12 files); changed-extensions-config-56 (extension-database-workers/9 files); changed-extensions-config-45 (extension-database-workers/5 files)
checks-node-changed-extensions-bundle-40 240 changed-extensions-config-99 (extension-whatsapp/whole config); changed-extensions-config-98 (extension-voice-call/whole config); changed-extensions-config-16 (extension-codex/12 files); changed-extensions-config-53 (extension-database-workers/9 files)

@clawsweeper

clawsweeper Bot commented Sep 16, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 16, 2026, 12:19 AM ET / 04:19 UTC (Revision 2).

ClawSweeper review

What this changes

The branch repairs plugin test selection and job estimates, refreshes CLI timing weights, and shortens waits in the Gateway fallback test.

Merge readiness

⛔ Needs changes before merge - 2 items remain

The planner and timing repairs remain useful and have native CI evidence. The previously reported redundant Gateway sleep spy remains unresolved; the merged zero-retry fixture already handles that optimization.

Priority: P2
Reviewed head: bd33097d6eddaabc55d47ddb76101acfd9608985

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, natively exercised CI repairs remain blocked by the previously identified duplicate test control.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.
Evidence reviewed 8 items Remaining planner repair: The planner resolves ownership per test file, preserves explicit scope for singleton process-bounded groups, and estimates unequal groups using their own file counts. Comparison with fetched main shows these changes and the timing refresh remain absent there.
Verified merge preserves the existing optimization: Raw merge parents are the pinned base followed by the exact PR head. The merge fixture retains both retry.provider.maxRetries = 0 and the assertion requiring one primary request, alongside the introduced sleep spy. The exact merge file was read through GitHub because its local blob was unavailable.
Merged Gateway repair: GitHub confirms #149613 merged on September 16. Its patch deliberately disables provider retries in this fallback proof and adds the one-primary-request assertion, leaving retry pacing to focused coverage.
Findings 1 actionable finding [P1] [P1] Remove the superseded Gateway retry-sleep spy
Security None None.

How this fits together

The CI planner turns changed repository paths, test inventories, and timing measurements into runner jobs. Those jobs execute scoped test groups and report results to the CI gate.

flowchart LR
  A[Changed repository paths] --> B[Test configuration ownership]
  C[Test file inventory] --> B
  B --> D[Scoped test groups]
  E[Recorded timing weights] --> F[Job packing]
  D --> F
  F --> G[Runner test execution]
  G --> H[CI results]
Loading

Before merge

  • [P1] Remove the superseded Gateway retry-sleep spy (P1) - The verified test merge retains the zero-retry fixture and one-primary-request assertion from fix(ci): stop spawn fallback proof from taking 25 minutes #149613. Consequently this spy cannot exercise the nine provider retry waits claimed here: the existing configuration already eliminates them. Keeping the spy introduces a competing pacing control and misleading coverage claims. Remove its imports/hooks, preserve main's fixture and assertion, and correct the PR body's Gateway attribution. This remains the outstanding finding from the previous review.
  • Complete next step (P2) - Remove the redundant Gateway sleep spy, preserve main's zero-retry configuration and one-request assertion, and correct the PR body's Gateway coverage claims.

Findings

  • [P1] [P1] Remove the superseded Gateway retry-sleep spy — src/gateway/server.visible-spawn-fallback.product-proof.test.ts:237-244
Agent review details

Security

None.

PR surface

Tests +72, Docs +22, Other +20. Total +114 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 86 14 +72
Docs 2 24 2 +22
Config 0 0 0 0
Generated 0 0 0 0
Other 3 46 26 +20
Total 7 156 42 +114

Review metrics

Metric Value Why it matters
Native job duration Database fallback 583s; standalone CLI 437s Native execution supports the repair, although the database job still exceeds the eight-minute objective.

Technical review

Best possible solution:

Retain the planner and timing repairs while using main's existing zero-retry Gateway fixture as the sole pacing control.

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

Yes, source establishes the planner's root-only ownership and singleton scope defects, and the verified merge establishes the redundant spy. No tests were executed during this read-only review.

Is this the best way to solve the issue?

Partly: reusing the existing ownership resolver and preserving file scopes is appropriate, but the additional Gateway pacing control duplicates the already-merged fixture configuration.

Full review comments:

  • [P1] [P1] Remove the superseded Gateway retry-sleep spy — src/gateway/server.visible-spawn-fallback.product-proof.test.ts:237-244
    The verified test merge retains the zero-retry fixture and one-primary-request assertion from fix(ci): stop spawn fallback proof from taking 25 minutes #149613. Consequently this spy cannot exercise the nine provider retry waits claimed here: the existing configuration already eliminates them. Keeping the spy introduces a competing pacing control and misleading coverage claims. Remove its imports/hooks, preserve main's fixture and assertion, and correct the PR body's Gateway attribution. This remains the outstanding finding from the previous review.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded CI coverage and scheduling repair without a user-facing runtime outage.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.

Label justifications:

  • P2: This is a bounded CI coverage and scheduling repair without a user-facing runtime outage.
  • 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 (linked_artifact): The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.
  • proof: sufficient: Contributor real behavior proof is sufficient. The actual CI planner and runner path executed successfully for this head, with recorded scoped database groups and standalone CLI execution corroborated by native job metadata. This supports the planner/timing repair; the Gateway speedup does not independently validate the redundant spy because the tested merge already disables retries.

Evidence

What I checked:

  • Remaining planner repair: The planner resolves ownership per test file, preserves explicit scope for singleton process-bounded groups, and estimates unequal groups using their own file counts. Comparison with fetched main shows these changes and the timing refresh remain absent there. (scripts/lib/ci-changed-node-test-plan.mts:392, bd33097d6edd)
  • Verified merge preserves the existing optimization: Raw merge parents are the pinned base followed by the exact PR head. The merge fixture retains both retry.provider.maxRetries = 0 and the assertion requiring one primary request, alongside the introduced sleep spy. The exact merge file was read through GitHub because its local blob was unavailable. (src/gateway/server.visible-spawn-fallback.product-proof.test.ts, 953456518e74)
  • Merged Gateway repair: GitHub confirms fix(ci): stop spawn fallback proof from taking 25 minutes #149613 merged on September 16. Its patch deliberately disables provider retries in this fallback proof and adds the one-primary-request assertion, leaving retry pacing to focused coverage. (src/gateway/server.visible-spawn-fallback.product-proof.test.ts, 1a5ea15e008a)
  • Re-review continuity: The previous completed review identified the same redundant spy and requested corrected Gateway evidence attribution. Its reviewed SHA equals the current head; the comparison is empty, and both requested corrections remain outstanding. (src/gateway/server.visible-spawn-fallback.product-proof.test.ts:239, bd33097d6edd)
  • Native CI execution: GitHub confirms run 35053574908 completed successfully for the exact PR head. Job metadata independently confirms 437 seconds for the standalone CLI job, 378 seconds for compact small-4, and 583 seconds for database bundle-23. The captured PR body supplies decoded inventory and child-span observations; the Gateway result includes main's existing zero-retry repair. (bd33097d6edd)
  • Proof inspection limit: The captured body and native job metadata were inspected. Fetching the database job's raw log redirected to an Azure storage host blocked by the review environment, so individual child spans were not independently reread; this does not invalidate the supplied observations. (bd33097d6edd)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • RomneyDa: 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.

  • Remove the sleep spy while retaining main's zero-retry fixture and one-request assertion.
  • Update the PR body to distinguish the planner/timing results from the already-merged Gateway optimization.

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 (1 earlier review cycle)
  • reviewed 2026-09-16T04:03:59.484Z sha bd33097 :: blocked before merge. :: [P1] [P1] Remove the superseded Gateway retry-sleep spy

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 16, 2026
@steipete
steipete merged commit 85f6539 into main Sep 16, 2026
219 checks passed
@steipete
steipete deleted the ci-burden/tails-refit branch September 16, 2026 04:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S 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