feat(module): add powerstat, dstat, ifstat, nmap monitoring modules - #382
Merged
Conversation
Four apt-archetype monitoring modules for the small-tools modularization program, mirroring the btop module style: - powerstat — power consumption measurement; apt powerstat; doctor probes command -v powerstat. - dstat — versatile system resource statistics; apt dstat; doctor probes command -v dstat. - ifstat — network interface bandwidth statistics; apt ifstat; doctor probes command -v ifstat. - nmap — network mapper / port scanner; apt nmap; doctor runs nmap --version. All four are optional modules tagged monitoring, wired via module_use_apt_archetype with module-defined detect()/is_recommended() and a real doctor(), each declaring en + zh-TW DESCRIPTION, SUPPORTED_UBUNTU=(22.04 24.04 26.04), and a TEST_VERIFY_CMD matching its doctor probe. Both standalone- and engine-invocable; all satisfy the 10-function module contract (ADR-0002, #305 conformance). Adds a per-module unit spec each, regenerates doc/module/INDEX.md (58 modules), and records a CHANGELOG entry. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s
# Conflicts: # doc/module/INDEX.md
ycpss91255
enabled auto-merge (squash)
July 11, 2026 12:52
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
Four apt-archetype monitoring modules for the small-tools modularization
program, mirroring the just-added
btopmodule's style. Each is anindependently installable / removable module.
powerstatpowerstatcommand -v powerstatdstatdstatcommand -v dstatifstatifstatcommand -v ifstatnmapnmapnmap --versionAll four are
optionalmodules taggedmonitoring, wired viamodule_use_apt_archetypewith module-defineddetect()/is_recommended()and a real
doctor(). Each declares an en + zh-TWDESCRIPTION,SUPPORTED_UBUNTU=("22.04" "24.04" "26.04"), and aTEST_VERIFY_CMDmatchingits doctor probe. Both standalone- and engine-invocable; all satisfy the
10-function module contract (ADR-0002, enforced by the #305
contract-conformance meta-test).
Changes
module/{powerstat,dstat,ifstat,nmap}.module.sh— the four modules.test/unit/module/{powerstat,dstat,ifstat,nmap}_spec.bats— a per-moduleunit spec each (smoke / metadata / lifecycle dry-run / no-side-effects /
sidecar lifecycle / idempotency / standalone CLI / real doctor probe).
doc/module/INDEX.md— regenerated (58 modules).doc/changelog/CHANGELOG.md—[Unreleased]→ Added entry.Test plan
Run inside Docker only (ADR-0004), all three gates blocking-foreground green:
just -f justfile.ci test-unit— full unit tree (1401 tests) green,including the test(module): module-iterating contract conformance meta-test #305 contract-conformance meta-test that dynamically
discovers and validates every module against the 10-function contract.
just -f justfile.ci test-integration— 24 tests green.just -f justfile.ci coverage— kcov merged-coverage gate (AC-17) green.Generated with Claude Code
https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s