Skip to content

Housekeeping: retention, CI test gate, hygiene, docs reconciliation#4

Merged
sethpjohnson merged 1 commit into
mainfrom
claude/ahl4plme-housekeeping
Jul 17, 2026
Merged

Housekeeping: retention, CI test gate, hygiene, docs reconciliation#4
sethpjohnson merged 1 commit into
mainfrom
claude/ahl4plme-housekeeping

Conversation

@sethpjohnson

@sethpjohnson sethpjohnson commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #3 (→ #2#1) — merge in order.

  • History retention finally works: the never-called 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 match GetHistory'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.
  • CI gains a test gate: go vet/build/test job (fork-PR-safe, no secrets) that the Docker build now requires; dead QEMU step removed; builder pinned golang:1.25.12-bookworm.
  • Hygiene: *.sketch/.dex/ gitignored, compose version: key dropped, dead logging config removed, hint-client.sh renamed/hardened (JSON escaping incl. control chars — UTF-8-safe, numeric validation, FAN_URL with legacy SMART_FAN_URL fallback).
  • Docs reconciled with reality: README Safety section (manual-IPMI-mode risk + the new fail-safe design, SIGKILL caveat, Dell-specificity) and Upgrading section (rename migration, refuse-to-start validation, token auth, retention); SPEC.md banner-marked as historical with corrections; config.example.yaml documents every current key and validates verbatim (regression-tested).

Review & verification

  • Principal review: 2 rounds → APPROVED WITH SUGGESTIONS. The reviewer reproduced the retention timezone bug empirically (EDT/IST/+14:00 zones), verified the fix in all of them, byte-traced the shell escaping for UTF-8 safety, and cross-checked every README/SPEC claim against behavior driven in earlier tiers.
  • Acceptance: PASS 7/7 live-driven — including end-to-end retention (aged exactly 3 of 6 real rows → cleanup removed exactly 3, /api/history intact) and the full hint-client matrix.
  • go vet + go test -race clean across all six packages. Follow-up filed: SQLite busy_timeout hardening (dex t7w53bw2).

Task: dex ahl4plme — Tier 4: Housekeeping

🤖 Generated with Claude Code

- 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
Base automatically changed from claude/z9m8meke-deps-bump to main July 17, 2026 17:10
@sethpjohnson
sethpjohnson merged commit 2550769 into main Jul 17, 2026
@sethpjohnson
sethpjohnson deleted the claude/ahl4plme-housekeeping branch July 17, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant