Skip to content

fix(tauri): drop a routing comment that #2156 made untrue - #2169

Merged
shm11C3 merged 1 commit into
developfrom
fix/stale-dispatch-routing-comment
Sep 19, 2026
Merged

shm11C3 merged 1 commit into
developfrom
fix/stale-dispatch-routing-comment

Conversation

@shm11C3

@shm11C3 shm11C3 commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Removes four comment lines above fetch_process_stats in archive_history_service.rs. They say Process Stats is the only family routed through the dispatch boundary and that the functions above still use archive_queries directly. That was true in #2154 and stopped being true in #2156, which routes DATA_ARCHIVE, GPU, Ambient and Fan and had deleted the comment.

The comment came back when develop was merged into the #2156 branch to resolve the conflict its squash-merged parent caused: git re-applied #2154's hunk because the branch side looked unchanged relative to the merge base. The verification at the time compared only the two conflicted files, so the resurrected hunk was missed and merged. No behavior change.

Related Issues

Follow-up to #2156 (part of #2134).

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

  • Comment-only change; searched core/src and src-tauri/src for other stack-era remnants and found none that are untrue on develop.

Checklist

  • Self-reviewed the code
  • Linting and formatting pass
  • Tests pass (no code changes)
  • No new warnings or errors

Summary by CodeRabbit

  • Chores
    • Removed an obsolete internal comment; application behavior remains unchanged.

The comment above fetch_process_stats described #2154, where Process Stats was the only family routed through the dispatch boundary. #2156 routed the other raw archive families and removed it, but merging develop into that branch to resolve the squash conflict brought the hunk back, and it was merged. The functions above it do go through dispatch now.
@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: 6d3e37b4-d5c2-45d3-99a8-c1b45f4075dd

📥 Commits

Reviewing files that changed from the base of the PR and between fb00f53 and 6892ca3.

📒 Files selected for processing (1)
  • src-tauri/src/services/archive_history_service.rs
💤 Files with no reviewable changes (1)
  • src-tauri/src/services/archive_history_service.rs

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


📝 Walkthrough

Walkthrough

The change removes an outdated Process Stats routing comment from the archive history service. Process Stats functions and behavior remain unchanged.

Changes

Archive History Cleanup

Layer / File(s) Summary
Remove obsolete Process Stats comment
src-tauri/src/services/archive_history_service.rs
The outdated routing comment preceding the Process Stats functions was removed. The functions remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the removal of the outdated routing comment.
Description check ✅ Passed The description follows the repository template. It explains the change, context, related issue, change type, testing, and checklist status.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@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-19T08:21:21.262947Z 6892ca3 PR opened
🔒 Security Review ✅ Completed 2026-09-19T08:23:11.208818Z 6892ca3 PR opened
ℹ️ 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.

@github-actions github-actions Bot added change:fix PR: bug-fix branch work area:tauri Area: Tauri app, commands, app wiring, or bundling labels Sep 19, 2026
@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                    892                 0   100.00%          59                 0   100.00%        1172                 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%         159                92    42.14%           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%        9477              2992    68.43%           0                 0         -

shm11C3 added a commit that referenced this pull request Sep 19, 2026
Replaying the pre-squash #2156 commit removed a stale comment that reached develop through an earlier merge. That fix is #2169's; keep this change to the eleven Cooling files.
@shm11C3
shm11C3 enabled auto-merge (squash) September 19, 2026 08:32
@shm11C3
shm11C3 merged commit 7d192c1 into develop Sep 19, 2026
38 checks passed
@shm11C3
shm11C3 deleted the fix/stale-dispatch-routing-comment branch September 19, 2026 09:14
shm11C3 added a commit that referenced this pull request Sep 19, 2026
…patch (#2161)

* feat(database): add the native backend dispatch boundary

Adds one dispatch boundary in Core (`infrastructure::database::dispatch`)
that answers every database consumer from whichever backend is durably
selected, per #2134. The boundary holds a live `NativeDatabase` owner
behind an `RwLock`, set only by explicit calls (`init` + `reobserve_authority`)
rather than polled per call, so it never races `observe_authority`'s
"no live owner" precondition and never goes stale between selections.

App hands the boundary its `AuthorityPaths` and expected schema version
once at startup, next to `db::init` in `src-tauri/src/lib.rs`, and asks it
to observe whatever selection already exists on disk. With `duckdb-archive`
disabled, every dispatch function is a direct, zero-overhead call into the
existing SQLite function it fronts.

Process Stats is the first family routed through the boundary, proving the
not-selected, selected and mid-selection paths. The raw archive families,
Cooling and Storage Health follow in stacked changes.

* feat(database): route the raw archive families through dispatch

Extends the #2134 dispatch boundary to DATA_ARCHIVE, GPU_DATA_ARCHIVE,
Ambient and Fan, reusing the same boundary/DispatchError plumbing PR #2154
proved with Process Stats. Each family's insert, retention delete and
bucketed series read now go through `dispatch::{data_archive, gpu_archive,
ambient_archive, fan_archive}` instead of calling
`infrastructure::database`/`archive_queries` directly.

Cooling's six projections, both baselines, Storage Health and the cooling
rollup persistence are not yet routed - tracked separately, per the issue's
explicit allowance to say so rather than route silently to SQLite.

* feat(database): route Cooling's projections and baselines through dispatch

Extends the #2134 dispatch boundary to Cooling: the six rolled-up
projections (daily, hourly, fan, thermal delta, both co-variate shapes),
both baselines (absolute and ΔT) and the cooling rollup's own catch-up
cursors and retention cleanup all go through `dispatch::cooling_*` instead
of calling `infrastructure::database::cooling_*` directly.

The rollup write keeps its single-transaction shape on both backends:
`dispatch::cooling_rollup::persist_day_rollup` either runs the existing
SQLite transaction (`persistence::cooling_rollup::persist_day_rollup_from_pool`,
unchanged) or builds one `native_database::DayRollup` and writes it through
one native transaction - never one projection at a time.

Every `_from_pool`/`resolve_*_from_pool` helper that lost its last
production caller (the "_from_pool split is for testability, not
transactional consistency" pattern this repo already used) is marked
`#[cfg(test)]` rather than deleted, since the differential test suites
in `duckdb_cooling.rs` still exercise them directly against an in-memory
SQLite pool.

No src-tauri changes: `services/cooling_insight_service.rs` already calls
through `hardviz_core::persistence::cooling_*`'s top-level functions and
only needs their `Display` output, which `DispatchError` still provides.

This closes out #2134's consumer list: Process Stats, the four raw
archive families, Storage Health and now Cooling are all routed.

* chore(tauri): leave archive_history_service.rs as it is on develop

Replaying the pre-squash #2156 commit removed a stale comment that reached develop through an earlier merge. That fix is #2169's; keep this change to the eleven Cooling files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tauri Area: Tauri app, commands, app wiring, or bundling change:fix PR: bug-fix branch work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant