Skip to content

[CI] Refresh unit timing weights and reduce repeated test setup - #27315

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-attention-and-timing-20261010
Oct 10, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-attention-and-timing-20261010

Conversation

@nwparker

@nwparker nwparker commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1263 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1363 $\color{#cf222e}{\Huge{\mathbf{−}}}$​100
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12131 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9741 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2390

ELI5

CI has been balancing tests with stale timings and repeatedly loading the same attention-test setup. Refresh the measurements and combine five related suites into two while retaining all 41 cases.

What Changed

  • Refresh September 27 unit timings, which left 2,767 measured files using a fallback, from normal run 38086200856/tested merge 31182796: 12,199 assigned files, including 144 skipped modules. E2E timings stay byte-identical.
  • Combine five attention suites into two, retaining all 41 cases, fixtures, ordinary file isolation, per-case cleanup and runtime routing. Each merged module and its mocks remain loaded across more cases; fresh qualification retained all 41 cases and 37 matching diagnostics.
  • Remove seven redundant tests and one self-confirming assertion. Stronger database/addressing, relay dispatch/parity and draft-clearing checks remain. The static added-method reminder and extra sample invocations are intentionally lost; no separate speed claim.
  • Recognize opaque builtin loading with five public CI regression cases. Ready-PR full-suite policy and platform routes remain unchanged.
Comparison Before After Improvement
Modeled longest shard, summed historical module time on fresh discovery 2,239.989s 2,079.540s 7.16%
Attention warm wall time, historical local pair 5.219s 5.120s 1.91%
Attention waited-child CPU, historical local pair 12.593s 7.204s 42.80%

Fresh discovery at local branch epoch e7d7c5b is 12,197 files (+1/-3). Both assignments use the same historical durations/fallback across five shards. Total modeled work remains 10,397.615s. Summed overlapping module time is not job wall time; no hosted saving or fleet 2× claim.

Attention measurements come from the historical 44e1983 epoch and precede fresh-main store changes. Fresh original/candidate correctness retained 41 cases and 37 identical diagnostics. Historical warm arms followed an initial correctness pause; memory is child maxima, not simultaneous family peak.

Why

Update existing balancing data and isolated Vitest suites to reduce repeated setup while retaining meaningful behavior checks.

Linked Issue

N/A — maintainer CI improvement task.

Visual Proof

N/A — testing and CI configuration only; no UI or production behavior changes.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

macOS, stock Bun 1.4.2/Node 24.21: full ordinary/plugin lint for eight live files, changed-quality, Node types, 112 retained cases and 53 CI boundary cases passed. Focused original/candidate E2E programs retain the same two existing type errors; Node typechecking excludes these suites. HappyDOM evidence is per-file configuration and exercised DOM; the reporter exposes the Node project default.

Local qualification cost 35.273s, including 3.094s dependency assessment. Initial incorrect file-count and compiler assumptions are recorded; passed checks were not repeated. Historical attention qualification separately cost 34.109s, excluding an unmeasured pause. Normal commit hooks took 1.464s. No diagnostic CI was dispatched.

AI Disclosure

Review

Independent local source/evidence review passed. All 31 ordinary hosted checks completed: 15 passed and 16 correctly skipped. CodeRabbit reviewed exact head65; its fixture-map suggestion is unchanged original behavior with only one seeded workspace, so a hypothetical fixture extension is deferred. Generated docstrings are unnecessary under the concise-comment policy; no actionable review threads remain.

Hosted run tested synthetic merge 8c724849, including newer main ddcbb78 (69 upstream files, no overlap with this PR’s 12). The local inventory/projection remains from e7d7c5b; source review found no invalidated contract, but there was no new local performance pair on the newer main.

Ordinary five-shard comparison PR27308 final This PR Change
Assigned unit runner time 3,048s 3,089s 1.35% higher
Test steps 2,868s 2,923s 1.92% higher
Longest unit job 658s 658s unchanged

No material >10% regression was observed, and no hosted speedup is established. Five unit allocations remain. Timing weights changed the assignment and the source epochs differ; the 7.16% offline projection is not an observed CI saving. Setup total was 150s versus 160s, with 16s versus 20s after test completion.

The complete single-head pre-merge lifecycle cost was 3,919 assigned runner-seconds across 15 allocations, including Mobile 302s, Git compatibility 154s, Node18 managed hooks 37s and relay 68s. Existing conservative path selectors chose Git and Node18 for the changed relay unit file. No package jobs ran. This is not a matched whole-workflow saving against PR27308’s globally forced final head (5,041s/22 allocations). All finished jobs, including control/evidence jobs, are counted; queue/provisioning and post-merge runs are excluded. No failures, reruns, dispatches or cancellations occurred.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Production code, dependencies and native runtime contracts remain unchanged. Linux, Windows, SSH and Mobile behavior were not exercised locally; existing CI coverage remains intact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • Selected ordinary CI checks passed; the two existing focused E2E type errors remain documented above

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough
📝 Walkthrough

Walkthrough

The unit dependency graph now recognizes getBuiltinModule and imports of module or node:module. Structured-attention tests add coverage for read acknowledgements, read-owner lifecycle, prompt relay delivery, and remote settlement. Several separate test files and assertions are removed.



Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 65ca1

This change only touches CI timing data, unit-test selection, and test suites. Users and production behavior are unaffected. One test setup could silently drop other worktrees' state if more fixtures are added later. It can be fixed in a follow-up.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 4 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: refreshing unit timing weights and reducing repeated test setup.
Description check Passed The description covers the required sections with detailed change rationale, testing results, visual-proof status, review notes, and checklist. It identifies the linked-issue exception as a maintainer…

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

🧹 Nitpick comments (1)
tests/e2e/structured-attention-prompt-relay.unit.test.ts (1)

319-328: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Keep the other worktrees when the test sets unifiedTabsByWorktree.

In the 'different target' case, the updater returns unifiedTabsByWorktree with only the WORKSPACE key. The 'tab/store rerender' case at Line 195 spreads state.unifiedTabsByWorktree first. This case does not. Zustand merges only the top-level keys. The update therefore drops tabs that other worktrees hold. The current fixture seeds only WORKSPACE, so the test passes now. If the fixture later seeds more worktrees, this case changes their state without notice. Spread the existing map here as well.

♻️ Proposed fix
             unifiedTabsByWorktree: {
+              ...state.unifiedTabsByWorktree,
               [WORKSPACE]: state.unifiedTabsByWorktree[WORKSPACE].map((tab) => ({

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da9b08ba-1828-45a5-8b5e-a9e8863c65e0
📥 Commits

Reviewing files that changed from the base of the PR and between ddcbb78 and 65ca125.

📒 Files selected for processing (12)
  • config/scripts/ci-shard-timings.json
  • config/scripts/ci-unit-dependency-graph.mjs
  • config/scripts/ci-unit-dependency-graph.test.mjs
  • src/main/runtime/rpc/orchestration-party-addressing.test.ts
  • src/relay/git-handler-push-target.test.ts
  • src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts
  • src/shared/orcad-artifacts.test.ts
  • tests/e2e/structured-attention-explicit-read.unit.test.ts
  • tests/e2e/structured-attention-prompt-relay.unit.test.ts
  • tests/e2e/structured-attention-read-owner-lifecycle.unit.test.ts
  • tests/e2e/structured-attention-read-retirement.unit.test.ts
  • tests/e2e/structured-attention-relay-settlement.unit.test.ts
💤 Files with no reviewable changes (7)
  • tests/e2e/structured-attention-read-owner-lifecycle.unit.test.ts
  • tests/e2e/structured-attention-relay-settlement.unit.test.ts
  • src/main/runtime/rpc/orchestration-party-addressing.test.ts
  • tests/e2e/structured-attention-explicit-read.unit.test.ts
  • src/shared/orcad-artifacts.test.ts
  • src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts
  • src/relay/git-handler-push-target.test.ts

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

@nwparker

Copy link
Copy Markdown
Contributor Author

Reviewed the fixture-map nitpick: this update is unchanged from the original suite, and each current case seeds only WORKSPACE. The 41-case parity check exercises that existing contract. We are deferring a hypothetical multi-workspace fixture extension. Generated docstrings are also unnecessary under the repository’s concise-comment policy.

@nwparker
nwparker merged commit 8ba353a into main Oct 10, 2026
31 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