Repository navigation
fix(ci): select channel chunking suites for shared Markdown chunker changes - #168467
Conversation
…hanges #167958 (69bfe7b) changed packages/markdown-core/src/render-aware-chunking.ts and turned extensions/whatsapp/src/send.delivery-recovery.test.ts red on main (repaired in 281379b). Neither PR CI nor local test:changed selected any channel suite: channels import the chunker through the Plugin SDK text-chunking facade, so the format suites sit three importer hops away and the WhatsApp delivery suite five, beyond the aggressive PR walk's depth of two. Locally, the sibling test short-circuits the walk and SDK aliases are not resolved. Map the chunker, its IR dependencies (ir, ir-annotations, ir-slice, ir-spans), and the render modules the channel render callbacks use (render, render-attributed) through SOURCE_TEST_TARGETS to the markdown-core IR/render/ chunker suites, the SDK facade suites, and the Google Chat, Signal, Slack, SMS, Telegram, and WhatsApp format/send/delivery suites. PR CI receives them as explicit owners beside its import consumers (strictly additive; a chunker PR keeps 8 Node rows). Local test:changed for ir-slice/ir-spans/ir-annotations narrows from a ~12k-test core walk to the 14 targeted suites.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR selects channel chunk-contract suites when shared Markdown chunking, IR, or rendering modules change. Example: A PR changes packages/markdown-core/src/render-aware-chunking.ts.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a concrete test-selection gap through the existing shared owner, with no actionable patch findings; the earlier CI attribution question is resolved by matching main failures and a separate repair. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared test-selection owner converts changed repository paths into test targets consumed by local test:changed and CI shard planning. flowchart TD
A[Changed Markdown paths] --> B[Shared ownership map]
B --> C[Local test selection]
B --> D[CI bounded selection]
E[Import consumers] --> D
C --> F[Selected test suites]
D --> F
Technical reviewBest possible solution: Retain the focused mappings in the shared selection owner and the regression coverage at its CI consumer boundary. Do we have a high-confidence way to reproduce the issue? Source confirms the local sibling-test shortcut and aggressive CI depth limit; the PR supplies before/after planner results and reports that the added regression fails before the mapping. Is this the best way to solve the issue? The existing explicit-owner map is a narrow, coherent repair for SDK-mediated consumers without broadening global traversal or introducing a competing selector. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f968aa9fe70. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +53, Docs 0. Total +53 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 10, 2026, 10:21 AM ET / 14:21 UTC (Revision 2). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…hanges (openclaw#168467) openclaw#167958 (ff91e9f) changed packages/markdown-core/src/render-aware-chunking.ts and turned extensions/whatsapp/src/send.delivery-recovery.test.ts red on main (repaired in d17a849). Neither PR CI nor local test:changed selected any channel suite: channels import the chunker through the Plugin SDK text-chunking facade, so the format suites sit three importer hops away and the WhatsApp delivery suite five, beyond the aggressive PR walk's depth of two. Locally, the sibling test short-circuits the walk and SDK aliases are not resolved. Map the chunker, its IR dependencies (ir, ir-annotations, ir-slice, ir-spans), and the render modules the channel render callbacks use (render, render-attributed) through SOURCE_TEST_TARGETS to the markdown-core IR/render/ chunker suites, the SDK facade suites, and the Google Chat, Signal, Slack, SMS, Telegram, and WhatsApp format/send/delivery suites. PR CI receives them as explicit owners beside its import consumers (strictly additive; a chunker PR keeps 8 Node rows). Local test:changed for ir-slice/ir-spans/ir-annotations narrows from a ~12k-test core walk to the 14 targeted suites.
Related: #167958
What Problem This Solves
Fixes: channel chunking regressions escape PR CI and
pnpm test:changedwhen the shared Markdown render-aware chunker inpackages/markdown-corechanges.User Impact
No user-visible product change. Maintainers now get the Google Chat, Signal, Slack, SMS, Telegram, and WhatsApp chunk-contract suites on PRs and in
pnpm test:changedwhenever the chunker or the IR/render modules it depends on change, so a red like the WhatsApp delivery-recovery break after #167958 fails on that PR instead of surfacing later onmainor in an unrelated PR.Why This Change Was Made
#167958 (69bfe7b) changed
render-aware-chunking.ts, andextensions/whatsapp/src/send.delivery-recovery.test.tswent red onmain(repaired in 281379b). It only surfaced when #168139'spackage.jsonedit widened selection.Channels import the chunker through the Plugin SDK facade (
openclaw/plugin-sdk/text-chunking→src/plugin-sdk/text-chunking.ts→packages/markdown-core). PR CI's aggressive import walk stops at depth 2, but the channel format suites sit at depth 3 and the WhatsApp delivery-recovery suite at depth 5. Locally,test:changedshort-circuits to the sibling test and does not resolve SDK aliases, so it reached no extension test at all.This PR adds one explicit mapping in
SOURCE_TEST_TARGETS, the documented owner that bothtest:changedand the CI bounded planner already consume asexplicit-owner. It coversrender-aware-chunking, its in-package IR dependencies (ir,ir-annotations,ir-slice,ir-spans), and therender/render-attributedmodules the channel render callbacks use. Each maps to the markdown-core IR/render/chunker suites, the two SDK facade suites, and the channel format/send/delivery suites. No new mechanism, workflow, or job.Tradeoff: for
ir-slice,ir-spans, andir-annotations, localtest:changedpreviously walked about 12,024 core tests (effectively the whole core suite, yet zero extension tests). The explicit mapping replaces that with the 14 targeted suites, consistent with explicit mappings winning locally. PR CI remains strictly additive for every file.Evidence
Selection before → after, from the real owners (
resolveChangedTestTargetPlanfor localtest:changed,resolveChangedNodeTestTargetswith the PR optionsselectionMode: "aggressive"and PR-exempt/release-only excluded):test:changedrender-aware-chunking.tsir.tsir-slice.tsir-spans.tsir-annotations.tsrender.tsrender-attributed.tsnode scripts/check-changed.mjs --dry-run -- packages/markdown-core/src/render-aware-chunking.tsstill reportslanes=core, coreTests. That gate owns static checks; product test selection lives inSOURCE_TEST_TARGETS.render-aware-chunking.tsswapped back to69bfe7b645c8^,extensions/whatsapp/src/send.delivery-recovery.test.tsfails ("preserves long styles and quotes only the first chunk"). All selected channel suites pass on currentmain.changed-extensions-bundle-1row (28 → 36 files), so no extra runner registrations. These seven files were touched by 23 of 15,781maincommits in the last 30 days. Local cold run of the eight channel suites,--maxWorkers=1: 209s wall, dominated by transform (WhatsApp delivery-recovery ~6s of test time). The planner prices files without timings at its 20s default.test/scripts/ci-changed-node-test-plan.integration.test.ts› "selects channel chunk-contract suites when …" fails on the pre-change mapping (52/25 selected, no channel suites) and passes after.pnpm test test/scripts/ci-changed-node-test-plan.integration.test.ts --maxWorkers=1: 15/15 passed, 101s for the file. The two new cases take about 50ms each on the shared import-graph cache, about 6s cold when run alone.pnpm test <34 files>run (490s wall). The 34th,test/vitest-projects-config.test.ts, hit aspawnSync … ETIMEDOUTwhile resolving the full root project graph inside the 28-file paralleltoolingshard, then passed 44/44 alone in 54s. An earlier attempt'stoolingVitest process exited with SIGSEGV mid-run with no failing assertion. Both are recorded as investigated local failures in the review artifact, not claimed as passes.--max-priority P2(no actionable P0–P2 findings).check-source-contracts→lint:tmp:session-accessor-boundaryreports six legacy session reads insrc/auto-reply/reply/dispatch-from-config.test-support.ts. Onmain, 228ba9d renameddispatch-from-config.test-harness.tsto that.test-support.tsname, and the guard scans that suffix; the hourlymainrun 38056049112 fails identically. This PR touches neither that file nor the debt baseline. Fixed directly onmainin 2f968aa (baseline regenerated with the guard's generator; guard andtest/scripts/check-session-accessor-boundary.test.tspass). Every other check on this head passed. This PR lands through the native pre-existing-failure admin route instead of a CI rerun.