Skip to content

fix(system): refresh disk info and improve caching logic - #551

Merged
cjlapao merged 1 commit into
mainfrom
cjlapao/fix-disk-space-report
Oct 30, 2026
Merged

cjlapao merged 1 commit into
mainfrom
cjlapao/fix-disk-space-report

Conversation

@cjlapao

@cjlapao cjlapao commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

This commit updates the disk size and free disk size calculations in the SystemService. The refreshDiskInfo method now accurately retrieves disk information and updates the cache with a timestamp to manage stale data. Additionally, tests have been added to ensure the correct behavior of the disk info caching mechanism.

Description

  • fix: ensure disk size and free disk size are accurately reported
  • test: add tests for disk info refresh and caching behavior

Type of change

  • Documentation Change
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have run tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG.md file accordingly

# Description

This commit updates the disk size and free disk size calculations in the SystemService. The refreshDiskInfo method now accurately retrieves disk information and updates the cache with a timestamp to manage stale data. Additionally, tests have been added to ensure the correct behavior of the disk info caching mechanism.

## Changelog

- fix: ensure disk size and free disk size are accurately reported
- test: add tests for disk info refresh and caching behavior

## Type of change

- Bug fix

### Checklist

- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have run tests that prove my fix is effective or that my feature works
- [x] I have added tests to keep coverage above 80%
@boring-cyborg boring-cyborg Bot added the test Tests label Oct 30, 2026
@cjlapao cjlapao added this to the 1.0.0 milestone Oct 30, 2026
@cjlapao
cjlapao merged commit bba556c into main Oct 30, 2026
21 checks passed
@cjlapao
cjlapao deleted the cjlapao/fix-disk-space-report branch October 30, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant