Skip to content

perf(ci): remove duplicate DuckDB integration test work - #2171

Merged
shm11C3 merged 4 commits into
developfrom
perf/duckdb-ci-fanout-poc
Sep 19, 2026
Merged

shm11C3 merged 4 commits into
developfrom
perf/duckdb-ci-fanout-poc

Conversation

@shm11C3

@shm11C3 shm11C3 commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Remove repeated DuckDB integration-test work without changing production behavior or CI topology.

  • Separate App migration and native-schema definitions from their unit-test wrappers so Core fixtures can import definitions without importing the same tests into every integration binary.
  • Keep the 29 App migration tests and 6 native-schema tests once in duckdb_native.
  • Combine the compatible native and reconciliation families into one integration target while preserving separate processes for tests that initialize global database state.

The fixed-revision inventory comparison retained all 1,050 semantic test identities, including the ignored case. It reduced executed test instances from 1,463 to 1,049 by removing 414 duplicate executions. The earlier Windows archive fanout and measurement workflow were removed because hosted runs did not establish a stable end-to-end gain.

Related Issues

CI performance investigation; no product issue.

Type of Change

  • Bug fix (fix/ branch)
  • New feature (feat/ branch)
  • Refactoring (refactor/ branch)
  • Performance (perf/ branch)
  • Documentation (docs/ branch)
  • Dependencies update
  • Other (chore/ branch)

Screenshots / Videos

Not applicable.

Test Plan

  • Manual testing
  • Unit tests

Validation on the final diff:

  • cargo test -p hardviz-core --features duckdb-archive --test duckdb_native: 60 passed.
  • cargo clippy -p hardviz-core --features duckdb-archive --all-targets -- -D warnings: passed.
  • cargo fmt --all -- --check: passed.
  • git diff --check origin/develop...HEAD: passed.
  • Fixed-revision hosted inventory comparison: 1,050 identities retained, zero missing/added/ignore-state changes.
  • Hosted test execution improved by 42–183 seconds in two samples; compile and whole-job time did not improve consistently, so no end-to-end speedup is claimed.

Checklist

  • Self-reviewed the code
  • Linting and formatting pass
  • Focused tests pass
  • No new warnings or errors

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of database schema compatibility, timestamps, identities, transactions, cancellations, and data preservation.
    • Added coverage for safer database opening, closing, rollback, snapshot isolation, and destination handling.
  • Refactor

    • Reorganized database migration and native schema definitions without changing migration behavior.
    • Consolidated shared database testing infrastructure to improve consistency across supported data domains.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: shm11C3/HardwareVisualizer/.coderabbit.yml

Review profile: CHILL

Plan: Team

Run ID: 96c67175-797d-4962-bb76-76a1f59def8a

📥 Commits

Reviewing files that changed from the base of the PR and between 42876c6 and 361ec6d.

📒 Files selected for processing (9)
  • core/tests/duckdb/native.rs
  • core/tests/duckdb/reconcile.rs
  • core/tests/duckdb_candidate.rs
  • core/tests/duckdb_native.rs
  • core/tests/native_support/mod.rs
  • src-tauri/src/infrastructure/database/migration.rs
  • src-tauri/src/infrastructure/database/migration_definitions.rs
  • src-tauri/src/infrastructure/database/native_schema.rs
  • src-tauri/src/infrastructure/database/native_schema_definitions.rs

Limit details: You’ve used all 4 included reviews currently available. Your 65 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

Changes

DuckDB native storage

Layer / File(s) Summary
Migration definitions
src-tauri/src/infrastructure/database/migration.rs, src-tauri/src/infrastructure/database/migration_definitions.rs
Migration definitions 1 through 23 move into a dedicated module and remain available through re-exports.
Native schema definitions
src-tauri/src/infrastructure/database/native_schema.rs, src-tauri/src/infrastructure/database/native_schema_definitions.rs
The native schema SQL, table metadata, timestamp metadata, and identity rules move into a dedicated definitions module.
DuckDB test wiring and fixtures
core/tests/duckdb_native.rs, core/tests/native_support/mod.rs, core/tests/duckdb/*.rs, core/tests/duckdb/native.rs
The integration target registers shared test modules and adds seeded fixtures covering schema finalization, identity handling, timestamps, data preservation, and failure cases.
Native storage behavior tests
core/tests/duckdb/native.rs
Tests cover closing, cancellation, concurrent access, snapshot isolation, rollback, and bounded request capacity.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Other

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the change removes duplicate DuckDB integration-test work. This matches the primary objective of the pull request.
Description check ✅ Passed The description follows the repository template. It explains the change, records the related issue context, marks the performance change, documents testing and validation, and completes the checklist.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.


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

@github-actions github-actions Bot added change:ci PR: CI, GitHub Actions, or repository automation changes area:core Area: Tauri-independent Core code area:tauri Area: Tauri app, commands, app wiring, or bundling area:github-actions Area: GitHub Actions workflows, actions, or scripts labels Sep 19, 2026
Consolidate the compatible native and reconcile integration families while retaining process-isolated db initialization targets and one App-owned migration/schema test owner. Build the Windows Core test archive once, run two nextest consumers, and compare a pinned baseline with the unsharded head in a Draft-only PoC workflow.
@shm11C3
shm11C3 force-pushed the perf/duckdb-ci-fanout-poc branch from 1f6c2fd to 3b2cd6a Compare September 19, 2026 09:30
@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 90.23% (🎯 60%) 3281 / 3636
🟢 Statements 89.89% (🎯 60%) 3425 / 3810
🟢 Functions 88.8% (🎯 60%) 825 / 929
🟢 Branches 75.96% (🎯 60%) 1855 / 2442
File CoverageNo changed files found.
Generated in workflow #4484 for commit 46a61dd by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Rust Tauri Coverage Report

Coverage Details
Filename                                             Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_tests/commands/background_image_test.rs                  39                 0   100.00%           6                 0   100.00%          21                 0   100.00%           0                 0         -
_tests/commands/settings_test.rs                         265                 0   100.00%          21                 0   100.00%         207                 0   100.00%           0                 0         -
adapters/tray.rs                                         127               127     0.00%          14                14     0.00%          87                87     0.00%           0                 0         -
adapters/window.rs                                       601               114    81.03%          44                11    75.00%         515                79    84.66%           0                 0         -
app/startup.rs                                           188                87    53.72%          10                 3    70.00%         114                58    49.12%           0                 0         -
cli/mod.rs                                               155                18    88.39%          18                 0   100.00%         109                 9    91.74%           0                 0         -
commands/ambient_sensor.rs                                63                 5    92.06%           8                 3    62.50%          57                 8    85.96%           0                 0         -
commands/background_image.rs                              22                 7    68.18%          11                 5    54.55%          19                 7    63.16%           0                 0         -
commands/cooling_insight.rs                               43                43     0.00%          17                17     0.00%          45                45     0.00%           0                 0         -
commands/external_component_guidance.rs                   42                42     0.00%           9                 9     0.00%          45                45     0.00%           0                 0         -
commands/external_component_setup.rs                      41                41     0.00%          11                11     0.00%          35                35     0.00%           0                 0         -
commands/hardware.rs                                     371               310    16.44%          74                64    13.51%         309               269    12.94%           0                 0         -
commands/settings.rs                                     982               952     3.05%         157               154     1.91%         827               802     3.02%           0                 0         -
commands/system.rs                                        58                44    24.14%          18                15    16.67%          50                37    26.00%           0                 0         -
commands/ui.rs                                            17                17     0.00%           2                 2     0.00%          13                13     0.00%           0                 0         -
commands/updater.rs                                       97                97     0.00%          15                15     0.00%          66                66     0.00%           0                 0         -
enums/error.rs                                            91                 0   100.00%           7                 0   100.00%          76                 0   100.00%           0                 0         -
enums/hardware.rs                                        184                 3    98.37%          15                 0   100.00%         111                 2    98.20%           0                 0         -
enums/settings.rs                                        423                17    95.98%          27                 2    92.59%         279                10    96.42%           0                 0         -
infrastructure/database/migration.rs                     860                 0   100.00%          57                 0   100.00%         698                 0   100.00%           0                 0         -
infrastructure/database/migration_definitions.rs          32                 0   100.00%           2                 0   100.00%         474                 0   100.00%           0                 0         -
lib.rs                                                   384               384     0.00%          17                17     0.00%         258               258     0.00%           0                 0         -
lifecycle.rs                                             307               258    15.96%          35                31    11.43%         219               196    10.50%           0                 0         -
main.rs                                                    8                 8     0.00%           1                 1     0.00%           6                 6     0.00%           0                 0         -
models/archive_history.rs                                115                50    56.52%          10                 7    30.00%         116                58    50.00%           0                 0         -
models/cooling_insight.rs                               1089                34    96.88%          73                 3    95.89%        1098                35    96.81%           0                 0         -
models/environmental_sensors.rs                           52                 0   100.00%           6                 0   100.00%          45                 0   100.00%           0                 0         -
models/external_component_guidance.rs                     60                 4    93.33%           6                 0   100.00%          52                 4    92.31%           0                 0         -
models/external_component_setup.rs                       187                23    87.70%          13                 1    92.31%         156                20    87.18%           0                 0         -
models/hardware.rs                                       481                 3    99.38%          24                 0   100.00%         343                 3    99.13%           0                 0         -
models/hardware_archive.rs                                 8                 0   100.00%           2                 0   100.00%          10                 0   100.00%           0                 0         -
models/settings.rs                                       381                 0   100.00%          21                 0   100.00%         351                 0   100.00%           0                 0         -
models/storage_health.rs                                   7                 0   100.00%           2                 0   100.00%           9                 0   100.00%           0                 0         -
services/archive_history_service.rs                       65                65     0.00%          21                21     0.00%         101               101     0.00%           0                 0         -
services/background_image_service.rs                     208               128    38.46%          21                10    52.38%         115                71    38.26%           0                 0         -
services/cooling_insight_service.rs                       40                40     0.00%          18                18     0.00%          46                46     0.00%           0                 0         -
services/external_component_guidance_service.rs          187                16    91.44%          18                 1    94.44%         120                11    90.83%           0                 0         -
services/external_component_setup_service.rs             167                57    65.87%          17                 5    70.59%         106                32    69.81%           0                 0         -
services/gpu_service.rs                                   45                45     0.00%           7                 7     0.00%          33                33     0.00%           0                 0         -
services/hardware_service.rs                             210               123    41.43%          28                12    57.14%         161                94    41.61%           0                 0         -
services/language_service.rs                             149                 0   100.00%          24                 0   100.00%          87                 0   100.00%           0                 0         -
services/memory_service.rs                                 9                 9     0.00%           2                 2     0.00%           5                 5     0.00%           0                 0         -
services/motherboard_service.rs                            9                 9     0.00%           2                 2     0.00%           5                 5     0.00%           0                 0         -
services/network_service.rs                               34                13    61.76%           4                 1    75.00%          23                 6    73.91%           0                 0         -
services/settings_service.rs                             861               231    73.17%          92                28    69.57%         699               205    70.67%           0                 0         -
services/system_service.rs                                57                57     0.00%           7                 7     0.00%          40                40     0.00%           0                 0         -
services/ui_service.rs                                    45                45     0.00%           8                 8     0.00%          36                36     0.00%           0                 0         -
tray/surface/mod.rs                                        8                 8     0.00%           2                 2     0.00%           5                 5     0.00%           0                 0         -
tray/surface/tauri_surface.rs                             80                80     0.00%           6                 6     0.00%          48                48     0.00%           0                 0         -
tray/widget.rs                                           610                 5    99.18%          51                 1    98.04%         542                 3    99.45%           0                 0         -
utils/color.rs                                            66                 1    98.48%           4                 0   100.00%          26                 0   100.00%           0                 0         -
utils/file.rs                                            224                 5    97.77%          14                 0   100.00%         144                 4    97.22%           0                 0         -
utils/formatter.rs                                        55                 0   100.00%           5                 0   100.00%          39                 0   100.00%           0                 0         -
utils/logger.rs                                           71                71     0.00%           1                 1     0.00%          38                38     0.00%           0                 0         -
utils/tauri.rs                                           311                22    92.93%          42                 1    97.62%         195                14    92.82%           0                 0         -
webview_memory.rs                                         20                20     0.00%           4                 4     0.00%          13                13     0.00%           0                 0         -
workers/mod.rs                                            56                56     0.00%           2                 2     0.00%          32                32     0.00%           0                 0         -
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                  11367              3794    66.62%        1153               524    54.55%        9479              2994    68.41%           0                 0         -

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

E2E captures

Evidence captures for 46a61dd45e34b18aeb971fa2593e6359035f17a9 (also available as the e2e-captures workflow artifact).

cpu-detail

cpu-detail

dashboard-gpu-secondary

dashboard-gpu-secondary

dashboard-storage-many

dashboard-storage-many

dashboard

dashboard

insights-cooling-ambient-only

insights-cooling-ambient-only

insights-cooling-ambient

insights-cooling-ambient

insights-cooling-coverage-90d

insights-cooling-coverage-90d

insights-cooling-establishing

insights-cooling-establishing

insights-cooling-explorer

insights-cooling-explorer

insights-cooling-no-fan

insights-cooling-no-fan

insights-cooling-no-power

insights-cooling-no-power

insights-cooling-observation-mild

insights-cooling-observation-mild

insights-cooling-observation-not-comparable

insights-cooling-observation-not-comparable

insights-cooling-timeline-30d

insights-cooling-timeline-30d

insights-cooling-timeline-90d

insights-cooling-timeline-90d

insights-cooling

insights-cooling

insights-main

insights-main

insights-process

insights-process

performance-compact-fullscreen-small-window

performance-compact-fullscreen-small-window

performance-compact-fullscreen

performance-compact-fullscreen

performance-compact-window

performance-compact-window

performance-gpu-selector-compact

performance-gpu-selector-compact

performance-gpu-selector-desktop

performance-gpu-selector-desktop

performance-gpu-selector-monitor

performance-gpu-selector-monitor

performance-monitor-desktop

performance-monitor-desktop

performance-monitor-power-current-compact-window

performance-monitor-power-current-compact-window

performance-monitor-power-current

performance-monitor-power-current

performance-monitor-power-graph-compact-window

performance-monitor-power-graph-compact-window

performance-monitor-power-graph

performance-monitor-power-graph

performance-panels-desktop

performance-panels-desktop

performance-panels-editing-desktop

performance-panels-editing-desktop

performance-panels-power-graph

performance-panels-power-graph

performance-panels-two-column-desktop

performance-panels-two-column-desktop

settings-display-targets

settings-display-targets

settings

settings

system-specifications-compact-window

system-specifications-compact-window

system-specifications-desktop

system-specifications-desktop

usage

usage

Allow the intentional duplicate path loads only in the DuckDB umbrella test target so App-owned tests remain covered without weakening release lint policy. Make the inventory comparator output unambiguous counts and test keys, and apply the repository Biome formatting to both scripts.\n\nValidated with the CI clippy command on Rust 1.98.1, Biome CI for both scripts, cargo fmt, diff check, and inventory fixtures.
Drop the unproven Windows archive fanout and its measurement-only tooling. Keep the integration-test restructuring that removed 414 duplicate App test executions while preserving the unique test inventory.
@shm11C3 shm11C3 changed the title perf(ci): fan out Windows DuckDB tests from one archive perf(ci): remove duplicate DuckDB integration test work Sep 19, 2026
@shm11C3
shm11C3 marked this pull request as ready for review September 19, 2026 10:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T10:25:09.426768Z 361ec6d Draft marked ready
🔒 Security Review ✅ Completed 2026-09-19T10:26:34.627483Z 361ec6d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shm11C3
shm11C3 enabled auto-merge (squash) September 19, 2026 10:35
@shm11C3
shm11C3 merged commit ee106ca into develop Sep 19, 2026
45 checks passed
@shm11C3
shm11C3 deleted the perf/duckdb-ci-fanout-poc branch September 19, 2026 10:42
shm11C3 added a commit that referenced this pull request Sep 21, 2026
…2164)

* feat(database): checkpoint after native expiry and retire the SQLite source

Adds NativeDatabase::checkpoint (one write-lane CHECKPOINT, per the retention evidence), retires the SQLite source by renaming it in place on a later verified native startup, and records the App lifecycle state vocabulary in the Design Doc. Rebuilt on develop after #2155 and #2158 were squash-merged; the checkpoint tests moved to core/tests/duckdb/native.rs with #2171's test layout.

* docs(design): describe the lifecycle vocabulary as a projection of AuthorityState

Two Core states map onto ConversionRecoverable, and ActionRequired also carries NativeOpenFailed, so 'lossless translation' overstated it.

* test(database): assert the row written before the checkpoint survives it

The fixture already holds process rows, so a non-empty result proved nothing. Also narrow the Design Doc's single-source claim: inspect_startup_authority is the only reader of Core's authority inspection, while the conversion driver and the native open path also produce lifecycle states.

* feat(database): run the application on the selected native backend

Fold the #2135 lifecycle onto the #2134 dispatch boundary: one startup decision (resolve_native_authority) that dispatch only adopts, the conversion driver handing the selected database to dispatch inside the paused block, producers starting on a native-authoritative boot, the expiry pass ending with dispatch::checkpoint, and shutdown closing the boundary after the writers drain. Includes the review fixes for the hand-over (explicit SelectionHandoff, NativeSelected as the only success, short-circuit while dispatch owns the file).

* fix(tauri): keep producers paused when the selected database is not served

Address review on #2164. Inside the paused block ActionRequired means the selection is durable but opening the database or handing it to dispatch failed, so SQLite is stale and dispatch either still routes to it or refuses every consumer. Producers now stay stopped in that case, as they do after a startup that ends in ActionRequired, and the entry path that later completes the hand-over restarts them if none are running. The conversion integration test drains its workers through terminate_all instead of closing dispatch underneath them, and the schema definitions comment names the startup function that replaced initialize_native_database_dispatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Area: Tauri-independent Core code area:github-actions Area: GitHub Actions workflows, actions, or scripts area:tauri Area: Tauri app, commands, app wiring, or bundling change:ci PR: CI, GitHub Actions, or repository automation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant