Repository navigation
docs(ci): record why declaration-fixture owners stay out of PR selection - #163695
Conversation
PR #162614 added a normalization-core import to src/process/exec-result.ts, one of the real owners test/scripts/tsdown-declaration-fixture.ts copies by path. PR CI never selected the four suites built on that fixture, so hourly scheduled CI caught the break after merge (repaired in 0a188c4). Measured both ways to close the gap through the canonical PR planner options (aggressive selection, release-only/PR-exempt tests deferred). URL literals in the fixture only reach owners below the 20-importer hub cutoff; the incident owner is a hub, so its replay still selected nothing. Replaying the 92 owner-touching main commits from the prior 30 days: URL literals newly cover 12 (+35 rows, +1,689 class-vCPU-minutes); full coverage newly selects 81 and starts build-artifacts for 69 (+242 rows, +11,628 class-vCPU-minutes, median +8% per affected PR) for roughly one escaped break in seven weeks. Record the rejection in the CI-limits skill and point the fixture's owner list at it so the experiment is not repeated without new evidence.
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 10:42 PM ET / October 7, 2026, 02:42 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR documents why copied runtime source files do not automatically select declaration tests in product PRs and links the fixture’s owner list to that explanation. Merge readiness✅ Ready for maintainer review Keep open: this is useful documentation of an accepted CI tradeoff, and current main lacks the decision record. No actionable patch defect or additional maintainer decision was found. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s CI planner turns changed source paths into selected tests and build jobs. Declaration tests use a fixture that copies runtime files, whose plain path strings do not establish import-graph selection edges. flowchart TD
A[Changed source files] --> B[CI test planner]
B --> C[Import graph and hub cutoff]
C --> D[Selected declaration tests]
D --> E[Build artifact job]
F[Copied runtime files] --> G[Declaration fixture]
G --> D
H[Recorded CI tradeoff] --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +2, Docs +21. Total +23 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Preserve the measured decision beside its CI policy owner and keep the fixture comment as the discovery path for future reconsideration. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR records an existing CI limitation and changes no executable behavior; its selection mechanism is supported by inspected source. Is this the best way to solve the issue? Yes: placing the dated rationale in the CI-limits owner and linking it from the fixture is a focused way to preserve the accepted decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 27ba9720f2c5. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…ion (openclaw#163695) PR openclaw#162614 added a normalization-core import to src/process/exec-result.ts, one of the real owners test/scripts/tsdown-declaration-fixture.ts copies by path. PR CI never selected the four suites built on that fixture, so hourly scheduled CI caught the break after merge (repaired in 77b0000). Measured both ways to close the gap through the canonical PR planner options (aggressive selection, release-only/PR-exempt tests deferred). URL literals in the fixture only reach owners below the 20-importer hub cutoff; the incident owner is a hub, so its replay still selected nothing. Replaying the 92 owner-touching main commits from the prior 30 days: URL literals newly cover 12 (+35 rows, +1,689 class-vCPU-minutes); full coverage newly selects 81 and starts build-artifacts for 69 (+242 rows, +11,628 class-vCPU-minutes, median +8% per affected PR) for roughly one escaped break in seven weeks. Record the rejection in the CI-limits skill and point the fixture's owner list at it so the experiment is not repeated without new evidence.
Related: #162614
What Problem This Solves
PR CI does not run the declaration-fixture suites when a product PR edits one of the real source files that fixture copies. That is how #162614 broke
write-unified-entry-dtson main. This PR records, with measurements, why we are not closing that selection gap now.User Impact
No user-visible change. Maintainers get a written decision in the CI-limits skill, and a pointer at the fixture's owner list, so nobody repeats the experiment without new evidence.
Why This Change Was Made
test/scripts/tsdown-declaration-fixture.tscopies 26 real runtime owners by path string, so the changed-test planner sees no edge from those owners to the four suites built on the fixture (write-unified-entry-dts,write-plugin-sdk-entry-dts,tsdown-declaration-resolution,dist-artifact-ownership).Rewriting the owners as
new URL("../../src/...", import.meta.url)literals does propagate through the helper to all four suites. In real PR CI, though, selection runs in aggressive mode, which stops hub modules (20 or more direct importers) at their direct consumers. The suites sit two hops away, behind the helper. Eight owners are hubs:exec-result.ts(the incident owner),errno.ts,pid-alive.ts,deferred.ts,process-env.ts,runtime-process-entrypoints.ts, and normalization-core'serror-coercion.tsandrecord-coerce.ts. A replay of the #162614 diff still selected none of the suites.Full coverage (for example, a policy watch fed by the same owner list) works for hubs. But it also turns on
build-artifactsfor most of those PRs, because these suites count as build owners inci-build-manifest.mjs. The measured cost (below) is a median +8% per affected PR, spread over about 90 PRs a month. It would catch roughly one escaped fixture break in seven weeks. Hourly scheduled CI already caught this one about 35 minutes after merge, and0a188c4f038f0repaired it within the hour. The repo's documented policy keeps maintainer-tooling suites out of product-only PRs, so the plain paths stay. The record names what would change the decision: a materially higher escape rate, or a selection that doesn't also startbuild-artifacts.Evidence
All measurements go through
scripts/lib/ci-changed-node-test-plan.mtswith the canonical PR options fromscripts/ci-build-manifest.mjs: aggressive selection, release-only and PR-exempt runtime tests deferred, Blacksmith backend. Class-vCPU-minutes means predicted shard seconds × runner label vCPUs, plus build-artifacts at 330 s on the 16-class.build-artifactsmedian is 330 s (range 216–441 s) across 12 successful PR runs onblacksmith-16vcpu-ubuntu-2404.write-unified-entry-dtsafter the 07:32 UTC merge; the fixture repair landed at 08:31 UTC. It is the only escaped owner break repaired on main since 2026-08-15; every other fixture edit in that window shipped inside the PR that needed it.oxfmt --check0.68.0 on both files,git diff --check,node scripts/docs-list.js, and Codex autoreview at P2 (scoped-clean). The code change is a two-line comment, so no test run is needed.Per-owner probe: URL literals in aggressive PR mode
Newly select all four suites (low fan-in): the four runtime-process descriptor entries other than
runtime-process-entrypoints.ts,managed-windows-job-launcher.mts,service-child-windows-job-native.ts, bothupdate-managed-service-handoff-*owners, bothfreebsd-process-identity*owners,windows-process-start.ts, the threeformat-time/*owners,runtime-dependency-ownership.ts,non-packaged-plugin-dirs.ts,package-update-activation-runtime-assets.ts, andmountinfo-path.ts. Each typically adds three 32-class rows (+137 predicted s) and flips build-artifacts on.Unchanged at zero (hubs):
exec-result.ts,errno.ts,pid-alive.ts,deferred.ts,process-env.ts,runtime-process-entrypoints.ts,error-coercion.ts,record-coerce.ts. The #162614 replay (68 paths): 407 tests in 33 shards before and after, with zero fixture suites.In default (non-aggressive) selection, a single URL literal for
exec-result.tsin the helper selected all four suites, so the propagation itself works; only aggressive mode's hub cutoff stops it.