feat(health_check): add cross-platform fallbacks for memory and load checks (fixes #1) - #58
Open
Fuhua-GIF wants to merge 68 commits into
Open
feat(health_check): add cross-platform fallbacks for memory and load checks (fixes #1)#58Fuhua-GIF wants to merge 68 commits into
Fuhua-GIF wants to merge 68 commits into
Conversation
Merges external bounty submission for issue Saiaaax#1. Structural review confirmed source changes, tests, issue closure, and required diagnostic bundle. Local Java execution was unavailable in this runner; submitted diagnostic JSON reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#2. The PR removes ComplianceAuditor class-load network I/O, adds explicit override loading with tests, and includes diagnostic/build-807b0396.json plus diagnostic/build-807b0396.logd. Local Java execution could not be rerun in this environment because no Java runtime is installed; submitted diagnostic metadata reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#9. The focused package test ok github.com/tent-of-trials/market/analytics (cached) passes locally, the diff check is clean, and the PR includes diagnostic/build-968e5b08.json plus diagnostic/build-968e5b08.logd with the market module reported as PASS.
Merged after owner review for fork bounty issue Saiaaax#19. The PR includes diagnostic/build-c55f8a6d.json plus split diagnostic/build-c55f8a6d-part001.logd through part006.logd. The submitted diagnostic metadata failed because that runner lacked Ruby, so I reran validation locally in an isolated temporary GEM_HOME with the service dependencies installed: , , and all passed; the test run reported 5 runs, 10 assertions, 0 failures.
Merged after owner review for fork bounty issue Saiaaax#3. The PR includes source changes, a focused Java regression test, diagnostic/build-acbafcb1.json, and diagnostic/build-acbafcb1.logd. Local Java execution could not be rerun in this environment because no Java runtime is installed; the submitted diagnostic metadata reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#6. Focused validation passed in a sparse checkout with cd market && go test ./gateway. The PR includes diagnostic/build-54fd6e7a.json and diagnostic/build-54fd6e7a.logd with the market module reported as PASS.
Merged after owner review for fork bounty issue Saiaaax#5. Focused validation passed in a sparse checkout with cd market && go test ./ws. The PR includes diagnostic/build-f994d258.json and diagnostic/build-f994d258.logd with the market module reported as PASS.
…ualization-14 Virtualize large order book rendering
Generate structured compliance report payloads
…-base-url Require explicit API base URL outside development
Fix compliance cache TTL eviction
# Conflicts: # frontend/package.json
…le-flight Fix auth refresh single-flight
…webhook-18-validated Load log watchdog Slack webhook from configuration
…ion-dry-run-20 Add legacy migration dry-run restore validation
…hutdown-15 Define logger post-shutdown behavior
…t-all-16 Implement connector wait-all timeout handling
Fix NFC scanner long payload checksums
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds cross-platform fallbacks for
check_memory_usage()andcheck_load_average()intools/health_check.py, as requested in #1.Changes
Updated
tools/health_check.py:check_memory_usage(): Keeps/proc/meminfoon Linux; falls back topsutil, then WindowsGlobalMemoryStatusEx, then macOSsysctl+vm_stat, then generic warningcheck_load_average(): Keeps/proc/loadavgon Linux; falls back toos.getloadavg()(macOS/Unix), thenpsutil.getloadavg(), then Windows CPU% proxy, then generic warning(status, detail, value)tuple format for backward compatibilityAdded
tests/test_health_check_fallback.py: 5 tests covering:Fallback Behavior
/proc/meminfo(unchanged)/proc/loadavg(unchanged)sysctl+vm_statos.getloadavg()GlobalMemoryStatusEx(ctypes)psutil.cpu_percent()or warningpsutilif availableos.getloadavg()if availableChecklist
check_memory_usage()keeps/proc/meminfoon Linux, has non-Linux fallbackcheck_load_average()keeps/proc/loadavgon Linux, falls back toos.getloadavg()/procfilesFixes #1