Skip to content

[CI] Reduce repeated test work and skip unrelated server matrices - #26711

Merged
nwparker merged 2 commits into
mainfrom
nwparker/ci-canonical-test-imports-20261008
Oct 9, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/ci-canonical-test-imports-20261008

Conversation

@nwparker

@nwparker nwparker commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​121 $\color{#cf222e}{\Huge{\mathbf{−}}}$​598 $\color{#cf222e}{\Huge{\mathbf{−}}}$​477
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​109 $\color{#cf222e}{\Huge{\mathbf{−}}}$​99

ELI5

Tests load less unrelated code, and changes to unrelated unit tests stop requesting an eleven-job Node server matrix. Fifty-five copied, private-source or unused-code cases are retired; meaningful runtime contracts remain.

What Changed

Eleven test files import existing SourceControl or socket-metadata owners directly. Their assertions, fixtures, hooks and deadlines remain byte-identical, with four full-view integration files retained.

Remove 14 legacy-ingress source scans and their test-only scanner, seven desktop flag/private-predicate cases, nine topology AST writer inventories, 24 native-cache hash-emulator repetitions, and one test of an unused hook-policy normalizer together with that unused export. Add 18 routing cases: conventional src/**/*.test.ts(x) files under broad server prefixes now use the installed dependency graph. Explicit server contracts still force the matrix; missing or broken graphs still request full validation. Production files, fixtures and other harness formats retain their existing routing.

Why

Direct imports reuse existing implementations and reduce repeated isolated module loading. Removing copied/source inventories follows the requested junk-test policy. Graph membership avoids unnecessary runner allocations without adding jobs, cache warmers or platform exclusions. Runtime, shard count, isolation, timeouts and native-cache keys are unchanged; the speculative native-cache key migration remains held for insufficient net-capacity evidence.

Linked Issue

N/A — internal maintainer work. The repository PR template exempts maintainers from opening needless issues; no existing issue applies.

Visual Proof

N/A — no rendered UI change.

Testing

  • Local macOS stock Bun/Vitest and Node/Vitest; four workers, isolation, filesystem module cache, all six setup files and original 30/60-second limits.
  • Combined import/ingress/runtime boundary commands each pass 303 cases in 23 files under Bun and Node. Original case identities and routes match; protected SQLite/runtime contracts run under Node in the hybrid command.
  • Routing qualification passes 125 cases, including all 18 new cases. All 108 selected server-module paths remain unchanged. Actual installed graphs contain 5,593 inputs and exclude the retired topology inventory.
  • Remaining native-cache, hook-policy and five real topology boundary suites pass 40 cases in seven files. The exact 24-cache/one-hook removals and first cache-case rename are independently reconciled with original results.
  • Changed-file lint, formatting, all typechecks, changed-code quality, whitespace checks and normal commit hooks pass locally.
  • Latest main dec18a8 combined locally with this head: all typechecks and 574 cases in 35 files pass, including the 468 previously qualified cases and 106 DSH status/hook cases. Dependency files and all 21 owned outputs stay unchanged; the temporary merge is aborted back to the clean candidate. Qualified combined tree: dce4d3e694092078d2318b8d1aaa98969a86ddf8.
  • All four ordinary workflows pass at head 3345340708551afc4a7fc6d14c093280be9aa022 / tested merge 65cfd0b72287ce27f613bc83d69de97ba3deaa33: five full unit shards, Linux/macOS/Windows x64 and ARM server contracts, five Linux compatibility lanes, both packaging jobs, relay integration, static/type checks and repository guards. One push; no diagnostic CI, retries or corrective pushes.

Each before/after measurement uses six counted local commands in before/after/after/before/before/after order. Every first sample counts; no retries or discarded samples. Shared caches warm across commands. SourceControl's four prior correctness commands cost 28.795 seconds and warm caches; socket's first-before warming remains included. These cohorts are separate, nonadditive local whole-command wall times, not occupied CI runner savings or proof of the overall 2× capacity goal.

SourceControl: same 14 files and 158 original cases on both sides.

Pair Before (s) After (s)
1 5.563063 4.125160
2 5.546563 4.395176
3 5.624944 4.294618
Mean 5.578190 4.271651

23.4223% less local wall time. The separate 24-binding export audit is qualification-only and excluded from timings and shipping.

Socket sweep: same one file and four filesystem/process-liveness cases.

Pair Before (s) After (s)
1 7.158996 1.695684
2 3.910376 1.805270
3 3.325541 1.674107
Mean 4.798304 1.725020

64.0494% less local wall time. The existing Windows platform skip is preserved.

Legacy ingress: four files/34 cases before, three files/20 cases after. All 20 retained cases match; the 14 approved lexical/manifest cases are deliberately removed.

Pair Before (s) After (s)
1 5.885641 1.678735
2 4.673428 1.633855
3 4.601603 1.612120
Mean 5.053558 1.641570

67.5165% less local wall time for this deliberately smaller cohort. All source restoration and case counters were independently verified.

Other deletions have actual before case reports (desktop 7; topology 9; cache 30; hook 4) and retained after reports (cache 6; hook 3; real topology companions 31). Those differing cohorts do not support an additional timing ratio.

Routing before/after: a healthy graph-nonmember topology-unit-only change previously forced the matrix through its directory prefix; now the detector says shouldRun=false and all four downstream workflow gates suppress six OS and five container allocations. The detector still runs. Historical full matrices occupied 2,169 and 2,536 runner-seconds including their 20/24-second detectors; these are reference opportunity bounds, not measured avoided cost. A bounded 40-main-commit sample found no eligible pure-prefix unit-test-only event, so frequency and fleet savings remain unproven. This PR itself correctly selects the matrix because it changes the classifier and a reachable production module.

Review

Independent source and raw-data peers verify retained cases, settings, candidate hashes and restoration. Retired alarms are intentional: global ingress spelling/census and manifest freezes; exact desktop advertisement flags; topology writer-file allowlists; copied native hash-input/installer-exclusion pins; the unused normalizer contract. Real serving/admission, IPC launch, durable replay, Pi dispatch, topology commit/move/close/ownership and actual Bash native-cache key boundaries remain. These companions are not claimed to duplicate every removed policy alarm.

The actual native-cache action and key inputs are unchanged. Arbitrarily read future .test.ts runtime fixtures still need explicit ownership in the server selector; the installed import graph cannot infer arbitrary filesystem reads.

Agent skill upstream boundary

  • No upstream skill-installer material copied.

Checklist

  • Mechanism, before/after measurements and alternatives explained.
  • Cross-platform, SSH/remote and folder-workspace impact considered; existing runtime boundaries preserved.
  • No new runner allocations, warmers, cache-key changes or timeout relaxations.
  • Local and ordinary PR checks complete; before/after tables retained.

Ordinary validation cost and review

The five full shards report 11,935 modules (11,792 passed / 143 skipped) and 116,131 cases (115,047 passed / 1,076 skipped / 5 todo / 3 expected failures), zero unhandled errors. Independent comparison accounts for all approved removals/additions and intervening upstream changes: 14 added modules, five removed modules and 26 changed count rows. All 11,895 other retained rows match, and retained module states are unchanged. SourceControl’s 158 and socket’s four original cases retain their counts and routes. These ordinary reports establish module counts and states, not a full per-case identity map.

All four ordinary workflows succeeded in one attempt: 5,955 occupied runner-seconds across 26 allocated jobs (39 declared, 13 skipped). PR Checks used 3,816; Node server 1,831; Mobile verification 302; test LoC 6. The five unit jobs used 2,908 seconds: 2,718 testing and 190 outside the test steps. Different source epochs, hosts, caches and workflow mixes prevent a causal comparison with previous PR totals or a 2× capacity claim. No cache warmer ran for this PR. Automatic main-push checks also succeeded: Node server used 1,995 occupied runner-seconds across 12 allocations, and Mobile used 232 across one. That is 2,227 additional seconds across 13 allocations (15 declared, two skipped), recorded separately from the PR total. No main-push warmer ran. These are observed costs, not a matched before/after comparison or proof of fleet savings.

CodeRabbit reviewed the 21-file scope at this head and reported no actionable findings; there are no unresolved review threads. Its linked-issue prompt is covered by the repository’s internal-maintainer exemption above.

While checks finished, main advanced only in three cloud/apps/relay/ files to ad7af63. A temporary local integration produces tree fb6cb540da60508504507f47e5cf1367d4723d7b; every non-cloud path is byte-identical to the actually tested merge tree, and all 21 owned outputs remain exact. Root test/type/dependency and workflow inputs are unchanged. This is source equivalence for the tested root scope; these checks do not qualify the separate cloud change or prove final package archive bytes identical. No additional CI push was used.

@nwparker nwparker changed the title Reduce repeated test imports and retire copied source checks Reduce repeated test work and skip unrelated server matrices Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fedcbbce-3694-4310-9d9b-761c0cc4f06b
📥 Commits

Reviewing files that changed from the base of the PR and between dec18a8 and 3345340.

📒 Files selected for processing (21)
  • config/scripts/ci-native-cache.test.mjs
  • config/scripts/node-server-change-scope.mjs
  • config/scripts/node-server-change-scope.test.mjs
  • src/main/ipc/desktop-renderer-runtime-capabilities.test.ts
  • src/main/ipc/desktop-renderer-runtime-capabilities.ts
  • src/main/persistence/terminal-topology/terminal-topology-boundary-ratchet.test.ts
  • src/main/runtime/runtime-socket-sweep.test.ts
  • src/renderer/src/components/right-sidebar/ActionButton.test.tsx
  • src/renderer/src/components/right-sidebar/CommitArea.chevron-spinner.test.tsx
  • src/renderer/src/components/right-sidebar/CommitArea.generate.test.tsx
  • src/renderer/src/components/right-sidebar/CommitArea.primary-icons.test.tsx
  • src/renderer/src/components/right-sidebar/CommitArea.test.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.commit-drafts.test.ts
  • src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts
  • src/renderer/src/components/right-sidebar/SourceControl.remote-action-errors.test.ts
  • src/renderer/src/components/right-sidebar/SourceControl.resolve-conflicts-prompt.test.ts
  • src/renderer/src/components/right-sidebar/source-control-too-many-changes-banner.test.tsx
  • src/shared/agent-status-legacy-ingress-ratchet.test.ts
  • src/shared/agent-status-legacy-source-scan.ts
  • src/shared/hook-command-source-policy.test.ts
  • src/shared/hook-command-source-policy.ts
💤 Files with no reviewable changes (5)
  • src/main/persistence/terminal-topology/terminal-topology-boundary-ratchet.test.ts
  • src/main/ipc/desktop-renderer-runtime-capabilities.test.ts
  • src/shared/hook-command-source-policy.ts
  • src/shared/agent-status-legacy-ingress-ratchet.test.ts
  • src/shared/agent-status-legacy-source-scan.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates Node server change-scope classification for ordinary source unit tests and changes native cache tests to use a configured source digest. Several tests now import entities from specific modules. The changes also remove the agent-status source scanner and ratchet tests, the terminal-topology boundary test, desktop capability tests, and hook policy normalization.

Priority: ⬇️ Low

Priority: ⬇️ Low

Priority: ⬇️ Low

Priority: ⬇️ Low

Estimated code review effort:

Merge Risk: ⚪ Minimal · up to 33453

The changes appear mergeable after normal checks. No actionable risk is established by the supplied evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 16 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the two main changes: reducing repeated test work and skipping unrelated server matrices.
Description check Passed The description is complete and well aligned with the repository template. It explains the change, motivation, testing, scope, compatibility considerations, visual impact, review notes, and maintainer…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 0e8e4e7 into main Oct 9, 2026
39 checks passed
@nwparker nwparker changed the title Reduce repeated test work and skip unrelated server matrices [CI] Reduce repeated test work and skip unrelated server matrices Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant