Skip to content

fix(ci): keep Telegram shards alive after the first isolated file - #123576

Merged
obviyus merged 1 commit into
mainfrom
t3code/fix-telegram-ci-import-timeout
Aug 14, 2026
Merged

obviyus merged 1 commit into
mainfrom
t3code/fix-telegram-ci-import-timeout

Conversation

@obviyus

@obviyus obviyus commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Related: #123514, #123534, #123410
Unblocks: #123528

What Problem This Solves

Resolves a problem where Telegram changed-extension CI would pass the first file in a five-file shard, then stay silent until the 300-second watchdog killed the job. That currently blocks otherwise-ready Telegram PRs, including #123528.

Why This Change Was Made

Telegram keeps isolate: true because its files have conflicting module mocks. A second isolated file in the same Vitest process re-imports the Telegram graph in silence. Hosted logs on #123528 showed file 1 finishing in 118ms-1.5s against the warm cache, then no output through 300s on file 2; the retry repeated the same stall.

This change recycles the Vitest process after each Telegram file and keeps five files packed in one CI job. Same-config sequential processes share the restored transform cache so later files do not pay a cold import. No provider or Telegram runtime behavior changes.

User Impact

No product behavior change. Telegram extension CI jobs should finish their remaining files instead of dying after the first passing file.

Evidence

  • Before: checks-node-changed-extensions-config-14/15 on fix(telegram): retry abandoned messages instead of dropping them #123528 run 31783075633 exited 143 after a 300s silence following the first passing file; retry repeated the stall.
  • Planner probe after the fix: 210 Telegram files remain 42 CI jobs of 5 files; a 5-file include file becomes 5 one-file run specs that share one cache path.
  • node scripts/run-vitest.mjs test/scripts/test-projects.test.ts test/scripts/ci-changed-node-test-plan.test.ts test/scripts/test-extension.test.ts test/vitest-scoped-config.test.ts — 562 passed.
  • Rebase onto origin/main (8865c2539b1, including improve(ci): shorten hosted PR path #123570) and rerun: 304/304 owner tests passed.
  • pnpm tsgo scripts: passed.
  • Hosted exact-head CI on this PR is the real proof that the 5-file shards stay under the 300s watchdog.

Production/script-support: +81/-16. Tests: +132/-9. The script growth is the process-lifetime vs CI-job split; collapsing them would mint 210 Telegram jobs.

Five-file Telegram jobs finished the first file, then isolate re-imported
the next graph in silence until the 300s watchdog killed the worker.
Recycle the Vitest process after each file and keep five files per CI job.
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@obviyus
obviyus marked this pull request as ready for review August 14, 2026 09:13
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 14, 2026
@obviyus
obviyus merged commit fc87337 into main Aug 14, 2026
199 checks passed
@obviyus
obviyus deleted the t3code/fix-telegram-ci-import-timeout branch August 14, 2026 09:20
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 14, 2026, 5:19 AM ET / 09:19 UTC.

ClawSweeper review

What this changes

The PR keeps Telegram CI jobs at five files while running each file in a separate Vitest process to avoid the isolated-suite watchdog stall.

Regression provenance

Possible regression — probable (failure trace; reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked by patch quality or review findings - 6 items remain

Keep open. The CI repair is focused, but it bypasses the runner’s existing rule that forwarded Vitest options make a run unsplittable; this can change scoped-run semantics before the hosted proof completes.

Priority: P2
Reviewed head: 7ef9cec9d49bb1865940d4618e45d8197e6b4643

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 5 items Scoped runner bypasses its split-safety rule: The changed external-include branch splits scoped targets unconditionally, while the shared helper permits process splitting only with no forwarded Vitest arguments because they can carry suite-wide semantics.
Caller carries forwarded arguments into the changed branch: Explicit config targets preserve non-target arguments as forwarded arguments before calling the bounded extension planner, so the bypass is reachable through supported invocation syntax.
Existing regression coverage omits forwarded arguments: The new external-include tests exercise only a plain Telegram config and therefore do not protect the no-split contract for a scoped run with a suite-wide option such as --bail.
Findings 1 actionable finding [P2] Honor forwarded Vitest options before splitting scoped jobs
Security None None.

How this fits together

Changed-extension CI groups plugin test files into GitHub Actions jobs, then the test-project runner turns each job’s include file into Vitest invocations. This PR separates job size from process lifetime for the Telegram suite.

flowchart LR
  A[Changed Telegram files] --> B[Changed-extension planner]
  B --> C[Five-file CI include list]
  C --> D[Test-project runner]
  D --> E[One-file Vitest processes]
  E --> F[CI job result]
Loading

Before merge

  • Honor forwarded Vitest options before splitting scoped jobs (P2) - The external-include branch calls splitExtensionTestProcessTargets unconditionally, bypassing the adjacent rule that any forwarded argument makes an extension run unsplittable. A scoped --bail run therefore becomes several independent processes and continues into later files after the first failure; use shouldSplitExtensionTestProcesses(config, forwardedArgs) here and cover that case.
  • Resolve merge risk (P1) - A scoped Telegram run with a forwarded suite-wide Vitest option can be converted into independent one-file runs, changing option semantics such as global bail behavior.
  • Resolve merge risk (P1) - The exact-head changed-extension job is still in progress, so the claimed five-file watchdog recovery has not yet been demonstrated.
  • Resolve merge risk (P1) - The bug fix adds production script-support code; the distinct CI-job and process-lifetime limits justify that boundary, but the duplicate split decision must not remain.
  • Complete next step (P2) - A narrow mechanical repair can preserve the established forwarded-option contract and add direct regression coverage before hosted CI proves the intended recovery.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.

Findings

  • [P2] Honor forwarded Vitest options before splitting scoped jobs — scripts/test-projects.test-support.mts:990
Agent review details

Security

None.

PR surface

Tests +125, Other +63. Total +188 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 134 9 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 79 16 +63
Total 7 213 25 +188

Review metrics

Metric Value Why it matters
Production versus test LOC delta production/script-support +81/-16; tests +132/-9 The process-lifetime and CI-job split adds a substantial CI support boundary, so its scope and retained safety contract matter before merge.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/test-projects.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #123576
Summary: This PR addresses the remaining isolated-process reuse failure after two merged Telegram CI planner repairs.

Members:

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

Merge-risk options

Maintainer options:

  1. Preserve forwarded-option semantics (recommended)
    Gate external include-file splitting through the existing split-eligibility check and add a scoped include-file regression with a forwarded suite-wide Vitest option.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Gate external include-file splitting on shouldSplitExtensionTestProcesses(config, forwardedArgs) and cover a forwarded suite-wide Vitest option.

Technical review

Best possible solution:

Use the existing split-eligibility predicate for external include files as well as broad roots, retain the separate five-file job and one-file process limits, and then capture an exact-head CI trace covering all five files.

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

Yes, source-reproducible: invoke the Telegram config with an external multi-file include JSON and a forwarded suite-wide Vitest argument; the changed branch splits it despite the established no-forwarded-arguments rule.

Is this the best way to solve the issue?

No: one-file Telegram process lifetimes are the right owner-level mitigation, but external include files must use the same split-eligibility rule as every other invocation path.

Full review comments:

  • [P2] Honor forwarded Vitest options before splitting scoped jobs — scripts/test-projects.test-support.mts:990
    The external-include branch calls splitExtensionTestProcessTargets unconditionally, bypassing the adjacent rule that any forwarded argument makes an extension run unsplittable. A scoped --bail run therefore becomes several independent processes and continues into later files after the first failure; use shouldSplitExtensionTestProcesses(config, forwardedArgs) here and cover that case.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8865c2539b19.

Labels

Label changes:

  • add P2: This is a bounded CI reliability repair whose incorrect option handling can affect test execution but not shipped runtime behavior.
  • add merge-risk: 🚨 automation: The PR changes CI job planning and process execution, so an incorrect split can alter coverage or cause unexpected test behavior after merge.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Label justifications:

  • P2: This is a bounded CI reliability repair whose incorrect option handling can affect test execution but not shipped runtime behavior.
  • merge-risk: 🚨 automation: The PR changes CI job planning and process execution, so an incorrect split can alter coverage or cause unexpected test behavior after merge.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs test/scripts/test-projects.test.ts test/scripts/test-extension.test.ts test/scripts/ci-changed-node-test-plan.test.ts.
  • [P1] pnpm tsgo:scripts.
  • [P1] Attach redacted exact-head Telegram changed-extension job output showing every file in a five-file shard completes.

What I checked:

  • Scoped runner bypasses its split-safety rule: The changed external-include branch splits scoped targets unconditionally, while the shared helper permits process splitting only with no forwarded Vitest arguments because they can carry suite-wide semantics. (scripts/test-projects.test-support.mts:990, 7ef9cec9d49b)
  • Caller carries forwarded arguments into the changed branch: Explicit config targets preserve non-target arguments as forwarded arguments before calling the bounded extension planner, so the bypass is reachable through supported invocation syntax. (scripts/test-projects.test-support.mts:3635, 7ef9cec9d49b)
  • Existing regression coverage omits forwarded arguments: The new external-include tests exercise only a plain Telegram config and therefore do not protect the no-split contract for a scoped run with a suite-wide option such as --bail. (test/scripts/test-projects.test.ts:2153, 7ef9cec9d49b)
  • Prior merged fixes establish the same owner boundary: The current planner path was recently changed by the merged Telegram watchdog and scoped-include repairs, making this PR a continuation of that CI-owner work rather than a duplicate. (scripts/lib/extension-test-plan.mts:95, d4ee874feaed)
  • Current main and release provenance: The checkout is current main at the merge commit for the hosted-CI planner improvement; the Telegram process-recycling change is only on this PR, and no release contains it. (scripts/lib/extension-test-plan.mts:95, 8865c2539b19)

Likely related people:

  • obviyus: Authored the two immediately preceding merged Telegram CI planner repairs and this follow-on branch. (role: recent area contributor; confidence: high; commits: 14882ac44dcd, d4ee874feaed, 7ef9cec9d49b; files: scripts/lib/extension-test-plan.mts, scripts/test-projects.test-support.mts)
  • steipete: Current-main history attributes the surrounding changed-extension planner path to this contributor before the Telegram-specific follow-ups. (role: adjacent CI planner contributor; confidence: medium; commits: db4379bd2f16, 8865c2539b19; files: scripts/lib/ci-changed-node-test-plan.mts, scripts/test-projects.test-support.mts)

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.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…enclaw#123576)

Five-file Telegram jobs finished the first file, then isolate re-imported the next graph in silence until the 300s watchdog killed the worker. Recycle the Vitest process after each file and keep five files per CI job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: M 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