Housekeeping: retention, CI test gate, hygiene, docs reconciliation#4
Merged
Conversation
- History retention: wire up the never-called Cleanup() - runs at startup and daily (storage.retention_days, default 30, validated). Fixes a timezone bug found in review: Cleanup bound a raw time.Time (local time + offset format) against CURRENT_TIMESTAMP's plain-UTC text column, drifting retention by the host's UTC offset; now formats the cutoff as UTC text through datetime(), matching GetHistory. Shutdown waits for in-flight cleanup with a 5s bound, sequenced after the BMC restore. - CI: test job (go vet/build/test, setup-go from go.mod) gates the Docker build; unused QEMU step removed; build-push-action v6; builder image pinned to golang:1.25.12-bookworm matching go.mod's toolchain. - hint-client.sh: renamed to Only Fan Controller, FAN_URL (legacy SMART_FAN_URL honored), JSON-escapes quotes/backslashes/control chars, validates numeric args client-side. - Hygiene: *.sketch and .dex/ gitignored; obsolete docker-compose version key dropped; dead logging config removed (legacy logging: sections in existing YAML are ignored harmlessly - tested). - Docs: README Safety section (manual-IPMI-mode risk and the fail-safe design; SIGKILL caveat; Dell-specific commands) and Upgrading section (rename migration, refuse-to-start validation, api.token, retention); new /api/status fields and config keys documented; SPEC.md marked as a historical design doc with a What-was-actually-built correction; config.example.yaml covers every current key and validates verbatim. Task: dex ahl4plme - Tier 4: Housekeeping Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EQmqj1Hj8DL3GGAcBDNm8v
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
Stacked on #3 (→ #2 → #1) — merge in order.
Cleanup()now runs at startup + daily (storage.retention_days, default 30). Review caught a real timezone bug — the cutoff was bound in local-time format against the column's plain-UTC text, so retention drifted by the host's UTC offset (masked only because the Docker image runs TZ=UTC); fixed to matchGetHistory's UTC pattern and regression-tested through the production write path across four timezones. Your months of accumulated readings get trimmed on first startup after upgrade.go vet/build/testjob (fork-PR-safe, no secrets) that the Docker build now requires; dead QEMU step removed; builder pinnedgolang:1.25.12-bookworm.*.sketch/.dex/gitignored, composeversion:key dropped, dead logging config removed,hint-client.shrenamed/hardened (JSON escaping incl. control chars — UTF-8-safe, numeric validation,FAN_URLwith legacySMART_FAN_URLfallback).config.example.yamldocuments every current key and validates verbatim (regression-tested).Review & verification
go vet+go test -raceclean across all six packages. Follow-up filed: SQLite busy_timeout hardening (dext7w53bw2).Task: dex ahl4plme — Tier 4: Housekeeping
🤖 Generated with Claude Code