Skip to content

chore: update code structure for better readability and maintainability#1229

Merged
shm11C3 merged 1 commit into
developfrom
chore/gh-aw
Mar 8, 2026
Merged

chore: update code structure for better readability and maintainability#1229
shm11C3 merged 1 commit into
developfrom
chore/gh-aw

Conversation

@shm11C3

@shm11C3 shm11C3 commented Mar 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 8, 2026 10:34
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code docs labels Mar 8, 2026
@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 99.09% (🎯 60%) 990 / 999
🔵 Statements 98.87% (🎯 60%) 1051 / 1063
🔵 Functions 98.79% (🎯 60%) 245 / 248
🔵 Branches 93.96% (🎯 60%) 327 / 348
File CoverageNo changed files found.
Generated in workflow #2449 for commit af3f708 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Rust Backend 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                     220                 0   100.00%          18                 0   100.00%         166                 0   100.00%           0                 0         -
commands/background_image.rs                          22                 7    68.18%          11                 5    54.55%          19                 7    63.16%           0                 0         -
commands/hardware.rs                                  65                65     0.00%          20                20     0.00%          65                65     0.00%           0                 0         -
commands/settings.rs                                 526               526     0.00%          94                94     0.00%         448               448     0.00%           0                 0         -
commands/system.rs                                     6                 6     0.00%           3                 3     0.00%           5                 5     0.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                                       105                 0   100.00%           8                 0   100.00%          89                 0   100.00%           0                 0         -
enums/hardware.rs                                    188                 1    99.47%          15                 0   100.00%         114                 0   100.00%           0                 0         -
enums/settings.rs                                    415                 6    98.55%          24                 0   100.00%         279                 0   100.00%           0                 0         -
infrastructure/database/db.rs                         21                21     0.00%           2                 2     0.00%          12                12     0.00%           0                 0         -
infrastructure/database/gpu_archive.rs                49                49     0.00%           4                 4     0.00%          18                18     0.00%           0                 0         -
infrastructure/database/hardware_archive.rs           41                41     0.00%           4                 4     0.00%          21                21     0.00%           0                 0         -
infrastructure/database/migration.rs                   8                 8     0.00%           1                 1     0.00%          37                37     0.00%           0                 0         -
infrastructure/database/process_stats.rs              41                41     0.00%           4                 4     0.00%          29                29     0.00%           0                 0         -
infrastructure/providers/linux/dmidecode.rs          229                15    93.45%          16                 3    81.25%         319                14    95.61%           0                 0         -
infrastructure/providers/linux/drm_sys.rs            143               143     0.00%          13                13     0.00%          87                87     0.00%           0                 0         -
infrastructure/providers/linux/hwmon.rs              119                94    21.01%           8                 6    25.00%          68                56    17.65%           0                 0         -
infrastructure/providers/linux/kernel.rs             165                22    86.67%          19                 2    89.47%         161                 8    95.03%           0                 0         -
infrastructure/providers/linux/lspci.rs               23                23     0.00%           1                 1     0.00%          12                12     0.00%           0                 0         -
infrastructure/providers/linux/net_sys.rs            171               171     0.00%          13                13     0.00%          93                93     0.00%           0                 0         -
infrastructure/providers/linux/procfs.rs             261                24    90.80%          25                 3    88.00%         222                19    91.44%           0                 0         -
infrastructure/providers/sysinfo_provider.rs          54                54     0.00%           2                 2     0.00%          45                45     0.00%           0                 0         -
lib.rs                                               209               209     0.00%           5                 5     0.00%         114               114     0.00%           0                 0         -
main.rs                                                3                 3     0.00%           1                 1     0.00%           3                 3     0.00%           0                 0         -
models/hardware.rs                                   133                 0   100.00%          11                 0   100.00%          83                 0   100.00%           0                 0         -
models/settings.rs                                   190                 0   100.00%          11                 0   100.00%         163                 0   100.00%           0                 0         -
platform/factory.rs                                   18                18     0.00%           4                 4     0.00%          15                15     0.00%           0                 0         -
platform/linux/cache.rs                               53                53     0.00%           4                 4     0.00%          38                38     0.00%           0                 0         -
platform/linux/gpu.rs                                139               139     0.00%          13                13     0.00%         102               102     0.00%           0                 0         -
platform/linux/memory.rs                              43                43     0.00%           6                 6     0.00%          41                41     0.00%           0                 0         -
platform/linux/mod.rs                                 34                34     0.00%          11                11     0.00%          70                70     0.00%           0                 0         -
platform/linux/network.rs                              4                 4     0.00%           1                 1     0.00%           4                 4     0.00%           0                 0         -
services/archive_service.rs                         1127               154    86.34%          90                15    83.33%         654               134    79.51%           0                 0         -
services/background_image_service.rs                 165                96    41.82%          16                10    37.50%          93                59    36.56%           0                 0         -
services/cpu_service.rs                               32                32     0.00%           4                 4     0.00%          15                15     0.00%           0                 0         -
services/gpu_service.rs                               37                37     0.00%          10                10     0.00%          31                31     0.00%           0                 0         -
services/hardware_service.rs                          67                67     0.00%           5                 5     0.00%          43                43     0.00%           0                 0         -
services/language_service.rs                         101                 0   100.00%          18                 0   100.00%          57                 0   100.00%           0                 0         -
services/memory_service.rs                            22                22     0.00%           4                 4     0.00%          15                15     0.00%           0                 0         -
services/monitoring_service.rs                       776               138    82.22%          54                15    72.22%         438                91    79.22%           0                 0         -
services/motherboard_service.rs                       10                10     0.00%           3                 3     0.00%           7                 7     0.00%           0                 0         -
services/network_service.rs                            9                 9     0.00%           1                 1     0.00%           7                 7     0.00%           0                 0         -
services/process_service.rs                           86                86     0.00%           5                 5     0.00%          50                50     0.00%           0                 0         -
services/settings_service.rs                         246               129    47.56%          30                14    53.33%         234               129    44.87%           0                 0         -
services/system_service.rs                            22                22     0.00%           2                 2     0.00%          12                12     0.00%           0                 0         -
services/ui_service.rs                                45                45     0.00%           8                 8     0.00%          36                36     0.00%           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                                   195                 8    95.90%          16                 0   100.00%         160                12    92.50%           0                 0         -
utils/ip.rs                                           65                 0   100.00%           5                 0   100.00%          33                 0   100.00%           0                 0         -
utils/logger.rs                                       71                71     0.00%           1                 1     0.00%          38                38     0.00%           0                 0         -
utils/rounding.rs                                     68                 0   100.00%           7                 0   100.00%          41                 0   100.00%           0                 0         -
utils/tauri.rs                                       138                 0   100.00%          17                 0   100.00%          82                 0   100.00%           0                 0         -
workers/hardware_archive.rs                           52                52     0.00%           6                 6     0.00%          36                36     0.00%           0                 0         -
workers/mod.rs                                        24                24     0.00%           2                 2     0.00%          16                16     0.00%           0                 0         -
workers/system_monitor.rs                            151               151     0.00%          11                11     0.00%         106               106     0.00%           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                               7650              3093    59.57%         728               358    50.82%        5416              2283    57.85%           0                 0         -

Copilot AI 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.

Pull request overview

This PR updates the repository’s gh-aw generated GitHub Actions workflows to a newer gh-aw compiler/runtime, adds a manual maintenance operation mode to the maintenance workflow, and removes the “Daily Test Improver” automation.

Changes:

  • Regenerated instructions-janitor and daily-doc-updater lock workflows with gh-aw v0.56.0 (schema v2/strict), updating artifact flow, safe-outputs wiring, and runtime env/config.
  • Extended agentics-maintenance with workflow_dispatch inputs and a new job to run explicit maintenance operations.
  • Removed the daily-test-improver workflow sources and lock output.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.github/workflows/instructions-janitor.lock.yml Regenerated lock workflow (gh-aw v0.56.0) with updated activation/artifacts/safe-outputs + runtime changes.
.github/workflows/daily-doc-updater.lock.yml Regenerated lock workflow (gh-aw v0.56.0) with updated activation/artifacts/safe-outputs + runtime changes.
.github/workflows/agentics-maintenance.yml Adds optional workflow_dispatch operation input and a dedicated run_operation job; bumps generator version.
.github/aw/actions-lock.json Adds pinned SHA entry for github/gh-aw/actions/[email protected].
.github/workflows/daily-test-improver.md Deleted (removes workflow source/instructions).
.github/workflows/daily-test-improver.lock.yml Deleted (removes compiled lock workflow).

GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"automation\",\"instructions\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[instructions] \"},\"missing_data\":{},\"missing_tool\":{}}"

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG marks both .github/ and .agents/ as protected_path_prefixes. This workflow’s explicit mission (per .github/workflows/instructions-janitor.md) is to update .github/aw/github-agentic-workflows.md, so protecting .github/ will prevent any PR from being created for the intended changes.

Consider narrowing the protection to more specific prefixes (e.g., .github/workflows/) or removing .github/ from protected_path_prefixes while keeping a denylist for especially sensitive files, so the workflow can still update .github/aw/**.

Suggested change
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"automation\",\"instructions\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[instructions] \"},\"missing_data\":{},\"missing_tool\":{}}"
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"automation\",\"instructions\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/workflows/\",\".agents/\"],\"title_prefix\":\"[instructions] \"},\"missing_data\":{},\"missing_tool\":{}}"

Copilot uses AI. Check for mistakes.
Comment on lines 34 to 52
name: Agentic Maintenance

on:
schedule:
- cron: "37 */2 * * *" # Every 2 hours (based on minimum expires: 1 days)
workflow_dispatch:
inputs:
operation:
description: 'Optional maintenance operation to run'
required: false
type: choice
default: ''
options:
- ''
- 'disable'
- 'enable'
- 'update'
- 'upgrade'

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

The PR title suggests a readability/maintainability refactor, but this change set also removes the entire daily-test-improver workflow (.github/workflows/daily-test-improver.md and .lock.yml). If that removal is intentional, it should be called out explicitly in the PR title/description (or split into a separate PR) so reviewers understand the behavioral change (loss of the scheduled/on-demand test improver automation).

Copilot uses AI. Check for mistakes.
await main();

- name: Install gh-aw
uses: github/gh-aw/actions/[email protected]

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

github/gh-aw/actions/[email protected] is referenced by tag, while the rest of the workflow pins actions by commit SHA. For supply-chain safety and consistency, consider pinning setup-cli to a commit SHA as well (and/or recording it in .github/aw/actions-lock.json if that file is intended to track pinned SHAs).

Suggested change
uses: github/gh-aw/actions/[email protected]
uses: github/gh-aw/actions/setup-cli@046e81c42fe2a9d91f47596660fcc69f48f5c70a # v0.56.0

Copilot uses AI. Check for mistakes.
run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.23.0
- name: Install Claude Code CLI
run: npm install -g --silent @anthropic-ai/claude-code@2.1.52
run: npm install -g @anthropic-ai/claude-code@latest

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

Installing @anthropic-ai/claude-code@latest makes this workflow non-deterministic: a newly published CLI version can change behavior or break runs without any repo change. Consider pinning to a known-good version (or routing through a repo variable) and updating it intentionally when you’re ready to absorb upstream changes.

Suggested change
run: npm install -g @anthropic-ai/claude-code@latest
run: npm install -g @anthropic-ai/claude-code@0.5.0

Copilot uses AI. Check for mistakes.
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
- name: Install GitHub Copilot CLI
run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.415
run: /opt/gh-aw/actions/install_copilot_cli.sh latest

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

Using install_copilot_cli.sh latest makes the workflow’s behavior depend on whatever Copilot CLI version is current at run time, which can introduce unexpected breakages/regressions. Consider pinning to a specific Copilot CLI version (or a repo variable) so upgrades are intentional and can be rolled back if needed.

Suggested change
run: /opt/gh-aw/actions/install_copilot_cli.sh latest
run: /opt/gh-aw/actions/install_copilot_cli.sh v1.0.0

Copilot uses AI. Check for mistakes.
@shm11C3 shm11C3 merged commit 9847084 into develop Mar 8, 2026
27 checks passed
@shm11C3 shm11C3 deleted the chore/gh-aw branch March 8, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants