Repository navigation
perf(ci): content-hash boundary artifact freshness and resize Telegram shards - #123649
Conversation
Hosted runners restore the extension package boundary artifact cache and then rebuild anyway: a fresh checkout stamps every input mtime, so the mtime freshness check can never pass in CI (~60s tsgo rebuild plus ~2.7m CPU per hosted lint/boundary job). Record the lane's input digest in its stamp file and accept mtime-stale artifacts whose digest still matches, repairing output mtimes on the way so later runs take the fast path again. The digest walk sees exactly the files the mtime scan sees; hashing costs ~0.2s warm.
Five files per job was sized around Telegram test files that paid a multi-minute silent import (fixed in #123607). With per-file cost back to seconds, a Telegram-touching diff fanned out ~42 jobs at ~45s runner setup each. Ten files per job halves the fanout while keeping the worst job near three minutes, off the PR critical path.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 14, 2026, 8:35 AM ET / 12:35 UTC. ClawSweeper reviewWhat this changesThe PR records content digests in extension-boundary artifact stamps so cached declarations survive checkout mtime changes, and raises Telegram changed-test job packing from five to ten files. Merge readiness⛔ Blocked by patch quality or review findings - 5 items remain Keep open: the content-digest fallback can accept stale declaration artifacts from a prefix-restored cache after a re-exported source dependency changes, because several lane digests omit their source directories. The approach is useful once each lane hashes its full declaration-input closure. Priority: P2 Review scores
Verification
How this fits togetherExtension-boundary preparation decides whether cached declaration artifacts can be reused before CI lint and boundary jobs run. The changed-test planner turns Telegram test files into isolated processes packed into bounded CI jobs. flowchart LR
A[Source and config inputs] --> B[Boundary artifact preparation]
B --> C{Mtime or digest fresh?}
C -->|fresh| D[Reuse cached declarations]
C -->|stale| E[Rebuild declarations]
F[Telegram test files] --> G[Changed-test planner]
G --> H[Packed CI jobs]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +42, Other +139. Total +181 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the digest-based mtime recovery, but define each declaration lane’s digest over every source and configuration input that can affect its emitted declarations, with a regression covering an unchanged barrel and changed re-exported source. Do we have a high-confidence way to reproduce the issue? Yes, from source: restore a digest stamp from revision A, modify a re-exported Telegram source file without changing api.ts, then run freshness evaluation; the new digest still matches and reports fresh. This read-only review did not execute that scenario. Is this the best way to solve the issue? No. Content identity is the right cache-reuse mechanism, but its current input lists are too narrow for declaration lanes whose public entrypoints re-export source modules. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d8db21e7a384. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…m shards (openclaw#123649) Hosted CI runners restored the boundary-artifact cache and rebuilt it anyway: fresh checkouts re-stamp every input mtime, so mtime freshness never passed. Stamp files now record the input content digest and byte-identical inputs skip the rebuild (~60s saved per hosted lint/boundary job, 0.17s verify). Telegram CI shards pack ten files per job instead of five now that per-file import cost is back to seconds (openclaw#123607), halving the ~42-job fanout.
What Problem This Solves
Two CI capacity losses surfaced while auditing PR wall clock after the hybrid runner backend (#123479):
changed-extensions-configjobs at 5 files each (~45s runner setup per job, ~60 runner-minutes). The 5-file cap was sized around Telegram test files that paid a multi-minute silent import, fixed in fix(telegram): resolve native command names from the loaded registry only #123607; per-file cost is back to seconds.Why This Change Was Made
.tsbuildinfofiles rewritten mid-run. The entry-shims lane's child-written timestamp stamp is overwritten by the parent with the digest after prerequisite builds settle. Legacy timestamp stamps fail the digest check once, then self-heal.TELEGRAM_EXTENSION_TEST_JOB_FILE_LIMIT5 → 10: halves the fanout (~42 → ~22 jobs) while keeping the worst job near 3 minutes, off the PR critical path. The 1-file-per-process isolate recycling from fix(ci): keep Telegram shards alive after the first isolated file #123576 is unchanged.User Impact
None at product runtime; both changes are CI/tooling. Hosted lint/boundary jobs drop ~60s each once caches carry hash stamps; Telegram-heavy PRs register ~20 fewer runners per run; local
pnpm lint/check-changedstop paying a ~58s rebuild after branch switches.Evidence
git ls-files | xargs touch(fresh-checkout mtimes) → prep run skips all 10 lanes via digest match in 0.17s (previously: full ~49s rebuild). Second run takes the repaired mtime fast path. Cold rebuild still works and mints hash stamps.test/scripts/prepare-extension-package-boundary-artifacts.test.ts19/19.ci-changed-node-test-planshard-count assertions derive from the constant;test/scripts/{ci-changed-node-test-plan,test-extension,test-projects,ci-workflow-guards}.test.ts585/585,run-oxlint.test.ts55/55.pnpm tsgo:scripts,check:test-types, oxlint, oxfmt,git diff --checkclean.