Skip to content

[CI] Reduce test teardown and scope server qualification - #27380

Merged
nwparker merged 2 commits into
mainfrom
nwparker/ci-test-cleanup-and-server-scope-20261010
Oct 11, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/ci-test-cleanup-and-server-scope-20261010

Conversation

@nwparker

@nwparker nwparker commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​293 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​246
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​47 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37

ELI5

Tests stop waiting once their own daemons have exited and prepare independent Git repositories with fewer commands. Server CI avoids widening platform qualification for unrelated modified files; affected server and harness inputs still run.

What Changed

  • During the unchanged two-second POSIX teardown grace period, check captured PIDs and finish early only when every PID reports ESRCH. Keep uncertain/permission-denied processes pending; preserve Windows behavior. Add three real-process contracts and route this suite through Node.
  • Copy one real Git seed into 30 independent repositories; preserve admission, ordering and sidebar expansion assertions. Remove one copied source-import inventory test; retain the real relay admission/snapshot case. That textual architecture reminder is intentionally lost; its marginal timing benefit is unknown.
  • Pass complete changed paths and modification-only evidence through server detection. After a successful dependency graph and proof that every path is modified, choose platforms from matched server/harness inputs. Preserve raw platform paths alongside graph matches, so unrelated daemon tests retain their platform safeguards. Keep conservative rules for additions, deletions, renames, uncertain evidence and protected inputs; fully qualify relevant main changes.

Why

Remove preparation and idle waits without shorter timeouts, mocked boundaries or production/library changes. Real Git controls verify independent refs/objects.

Linked Issue

N/A — maintainer CI-health work.

Visual Proof

N/A — no product UI change. Hidden CDP screenshots and traces retained as test evidence.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
Local whole-command comparison Before → after Wall / waited-child CPU reduction
Keyboard teardown, same case 8.697 → 6.045s 30.49% / 1.94%
Group visibility, same two cases 17.268 → 14.426s 16.46% / 6.28%

Four balanced arms used macOS/Node24.21/Bun1.4.2, earlier test source and one unchanged app build. First baseline startup was colder; warm final-arm wall reductions were 24.52%/9.88%. These historical local measurements are separate from current fresh-build correctness checks.

Six Node process cases plus the retained Bun relay case passed; policy suites passed 148/148, including two physical dependency-graph regressions. Format, lint, focused types and changed-quality passed. On merged base c2d, fresh ordinary Electron/CLI build plus all three hidden E2E cases passed once in 29.706s: zero skips/retries/errors. Correction hooks passed in 1.743s.

Review

Independent source, actual-evidence and committed-scope reviews passed. Exact corrected-head CI is green; the addressed review thread is resolved.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Notes

Counterfactual exact five-file test-only modifications select 12→2 server allocations. This policy PR deliberately retains all 12 server allocations and selects existing Node18 validation; routing selects no packages, SSH/WSL or new cache jobs. Existing conservative rules remain for uncertain evidence; relevant main changes receive full qualification. No hosted 2× claim.

Recorded local commands/hooks cost 179.36s, including failed formatting/compiler-API diagnostics, three corrective max-lines failures and fresh-base checks. Earlier detector flags were captured, but an observer error lost exit/time evidence: candidate/admin costs remain unknown. Tool-symlink/generated-output guard holds were resolved without reruns. Controller/source-inspection overhead is separate. Both ordinary validation heads completed 46 checks (27 success, 19 legitimate skips), with no unresolved reviews. First 143ef used 6,019 runner-seconds/27 allocations; corrected 4b used 5,819/27. Full lifecycle: 11,838 assigned runner-seconds/54 allocations; 491 allocated queue-seconds separately. No CI failure, rerun, cancellation or supersession. These are post-change validation waves, not a pre-optimization benchmark. Unit assigned/Test-step/longest seconds were 3,076/2,877/664→3,173/3,014/657 (+3.15%/+4.76%/−1.05%); no causal hosted or 2× gain is claimed.

Checklist

  • Small, focused testing/CI scope; explained behavior, mechanism and rationale
  • Visual proof N/A; self-reviewed; cross-platform and SSH considered
  • Local relevant checks passed; ordinary CI will cover remaining platforms

@coderabbitai

coderabbitai Bot commented Oct 11, 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: 1ee4d096-2be5-4e5e-bf50-d5ea0df1b680



📥 Commits

Reviewing files that changed from the base of the PR and between 143ef3f and 4b282ed.




📒 Files selected for processing (2)
  • config/scripts/node-server-change-scope.test.mjs
  • config/scripts/node-server-qualification.mjs



🚧 Files skipped from review as they are similar to previous changes (2)
  • config/scripts/node-server-qualification.mjs
  • config/scripts/node-server-change-scope.test.mjs



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





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The Node server test workflow now supplies modified paths to scope detection and graph checks. Qualification can use validated graph-matched files, with fallback cases covered by tests. POSIX daemon cleanup polls for process-tree exit before sending SIGKILL, with new tests for daemon and descendant behavior. The E2E visibility test initializes one repository and copies it to the remaining paths. A relay import-boundary test was removed.





Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 4b282

This change affects CI qualification scoping, test teardown and test fixtures, and does not change production behavior. The earlier concern about platform paths being dropped from qualification has been addressed, and no other merge-blocking risk is evident.

Pre-merge checks | Passed 4 | Failed 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 9 functions across 7 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 primary changes: faster test teardown and narrower server qualification. It is concise and specific.
Description check Passed The description follows the repository template and explains the changes, rationale, testing, review status, cross-platform considerations, and checklist results. The maintainer-specific Linked Issue …

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR





  • Autofix · 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c26f587-ef97-4de5-8613-6d7a8e7b24c3
📥 Commits

Reviewing files that changed from the base of the PR and between 0081ea0 and 143ef3f.

📒 Files selected for processing (9)
  • .github/workflows/node-server-tests.yml
  • config/scripts/node-server-change-scope.mjs
  • config/scripts/node-server-change-scope.test.mjs
  • config/scripts/node-server-qualification.mjs
  • config/scripts/vitest-node-runtime-files.mjs
  • src/relay/agent-status-store-relay-context.test.ts
  • tests/e2e/helpers/electron-process-shutdown.ts
  • tests/e2e/helpers/electron-process-shutdown.unit.test.ts
  • tests/e2e/project-group-creation-visibility.spec.ts
💤 Files with no reviewable changes (1)
  • src/relay/agent-status-store-relay-context.test.ts

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

@nwparker
nwparker merged commit a13c2b3 into main Oct 11, 2026
46 checks passed
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