summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-20Show recently reporting hosts with separate markerHEAD0.5.5masterPaul Buetow
2026-06-27Bump to 0.5.40.5.4Paul Buetow
2026-06-27Add last-updated records table at bottom of All reportPaul Buetow
2026-06-27Restyle HTML output to stats.foo.zone style; bump to 0.5.30.5.3Paul Buetow
2026-06-07Add Updated column to Host reports from file mtimev0.5.2Paul Buetow
2026-05-02Revert "Add Darwin goprecords upload client for task i"Paul Buetow
This reverts commit 59fc6374d16c22408f50478d82fba19feab14665.
2026-05-02xPaul Buetow
2026-05-02Add Darwin goprecords upload client for task iPaul Buetow
2026-04-16Release 0.5.1: auto-unexclude, merge excluded_host into auth DB0.5.1Paul Buetow
- /metrics: auto-remove exclusion when records mtime > excluded_at so hosts that resume uploading unexclude themselves on next scrape - Consolidate excluded_host table into the auth DB (goprecords-auth.db) instead of a separate file — removes -db daemon flag and GOPRECORDS_DB env - README: add host exclusion section with kubectl exec examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16Release 0.5.0: upload client docs for all OSes, host exclusion, Prometheus ↵0.5.0Paul Buetow
metrics - docs/upload-client.md: per-OS install instructions (FreeBSD, Linux, OpenBSD) covering script install, token setup, cron/systemd automation, and test runs - README.md: replace long upload section with pointer to docs/upload-client.md - Bump version to 0.5.0 (new features: excluded_hosts, /metrics endpoint, unified upload script with non-root/XDG support) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16Add /metrics Prometheus endpoint to daemon modePaul Buetow
Exposes a gauge per host tracking the Unix timestamp of the last records file update. Excluded hosts (from the excluded_host table) are labeled excluded="true" so alerting rules can filter them out. Uses manual Prometheus text format to avoid adding a new dependency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16Add excluded_hosts feature: store in SQLite, expose CLI subcommandsPaul Buetow
Adds an excluded_host table to the SQLite schema and three new CLI subcommands (exclude, unexclude, list-excluded) so operators can mark hosts that are no longer expected to send updates. The IsExcludedHost and LoadExcludedHosts storage helpers are ready for the Prometheus alerting endpoint (task d4). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16Add unified upload client script under scripts/, update contrib and docsPaul Buetow
- scripts/goprecords-upload-client.sh: unified POSIX sh script working on all host types (FreeBSD f0-f3, Rocky Linux pi0-pi3, Fedora earth, OpenBSD blowfish/fishfinger). Key addition over the old contrib/ version: non-root support via XDG_CONFIG_HOME token path so user-session installs (earth) work without requiring a hardcoded /etc path. - contrib/goprecords-upload-client.sh: updated to match the canonical script in scripts/ (same content). - README.md: updated manual-upload section to reference scripts/ as canonical location, added host-class table, added user-session systemd example, and expanded environment variable table to show root vs non-root defaults. - Deployed new script to f0, f1, f2, pi0-pi3; tested uploads from all hosts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14Remove PLAN.md, update README and upload client for FreeBSD, clarify ↵Paul Buetow
install/test steps
2026-04-14Add contrib goprecords-upload-client.sh and README for manual hourly ↵Paul Buetow
cron/systemd. POSIX sh client for FreeBSD/Linux: env GOPRECORDS_HOST, token file, uptimed paths. Documents root crontab with PATH and systemd service+timer for Pis. Made-with: Cursor
2026-04-14Release 0.4.1: drop HTML report header links; document Docker deploy in AGENTS.v0.4.1Paul Buetow
Remove Dashboard/foo.zone/Report API nav from HTML output; keep foo.zone CSS and layout. Refresh HTML fixtures. Made-with: Cursor
2026-04-14Release 0.4.0: foo.zone HTML styling, uptime-stats section order, dashboard ↵v0.4.0Paul Buetow
without full Kernel tables. - Link foo.zone stylesheet and mirror header/heading/quote layout for HTML reports. - Default -all stats order matches foo.zone (Host Uptime through Score, then KernelMajor and KernelName; full Kernel last when include-kernel). - Daemon root HTML uses include-kernel=false like the public stats page. - Refresh HTML integration fixtures. Made-with: Cursor
2026-04-14daemon: HTML dashboard at / with 10m cache (v0.3.1)Paul Buetow
Serve aggregated uptime stats as HTML on GET /. Cache rendered output for 10 minutes. Bump version to 0.3.1. Made-with: Cursor
2026-04-14Release 0.3.0 with daemon API and container packaging.Paul Buetow
Document the full HTTP API surface, bump the version for the new daemon/upload/report capabilities, and add Docker build assets so goprecords can be packaged and deployed in f3s. Made-with: Cursor
2026-04-14docs: add godoc for exports (ask 04)Paul Buetow
Document Record, Open, CreateSchema, ResetRecords, ImportFromDir, LoadRecords in storage; Reporter and reporters in goprecords; Fields and Parse in recordline; Config and Run in daemon. Made-with: Cursor
2026-04-14test(storage): expand db.go coverage (ask 14)Paul Buetow
Add negative and edge-case tests for CreateSchema, ResetRecords, LoadRecords, and ImportFromDir: closed DB, canceled context, missing schema, invalid stats path, skipped parse lines, ordering/fields. Made-with: Cursor
2026-04-14refactor: explicit HostAggregate.Stats, uploadKindExtension (ask 64)Paul Buetow
- Replace embedded Aggregate with Stats field to avoid promoted MetaScore pitfall - Forward AddRecord and IsActive to Stats - Replace package-level uploadKinds map with uploadKindExtension switch Made-with: Cursor
2026-04-14refactor(cli): split run* handlers into files (ask 24)Paul Buetow
Move runImport, runQuery, runReportFromFiles, runDaemon, runCreateClientKey, and runTests into dedicated cmd_*.go files. Keep Execute routing in cli.go. defaultListenFromEnv stays with daemon. Made-with: Cursor
2026-04-14fix(report): propagate Write errors; shorten query/upload paths (ask 44)Paul Buetow
- Return io.WriteString errors from WriteReports via writeReportString - Split ParseReportQuery into small URL parsing helpers - Extract serveUploadPut and uploadAuthorized from upload handler closure - Build report header with strings.Builder Made-with: Cursor
2026-04-14refactor(report): centralize metric extractors for OCP (z3)Paul Buetow
Replace four switch-on-Metric sites with map[Metric]metricExtractor and extractorFor fallback to uptime behavior. Add tests for unknown metric and aggregate Downtime/Lifespan parity. Made-with: Cursor
2026-04-14refactor(goprecords): split report.go by responsibility (w3)Paul Buetow
Move flag/query config to report_config.go and table formatting helpers to report_format.go; keep Reporter types, WriteReports, and table builders in report.go (SRP). Made-with: Cursor
2026-04-14fix: shadowing, version.Tag, prealloc LoadRecords (ask 54)Paul Buetow
- CreateKey: avoid shadowing named return err on rand.Read - daemon Run: rename slog logger to slogLog vs stdlib log package - version: rename Version to Tag to avoid version.Version stutter - LoadRecords: COUNT(*) then make slice with capacity Made-with: Cursor
2026-04-14refactor: drop goprecords DB pass-through, use storage from CLI (x3)Paul Buetow
Remove OpenDB/CreateSchema/ResetRecords/ImportFromDir/ImportFromFS wrappers and sqlite blank import from goprecords; keep LoadAggregates. CLI and integration tests call storage.* directly. Storage-focused tests live under internal/storage. Made-with: Cursor
2026-04-14refactor: use fs.FS for aggregate and DB import (ask v3)Paul Buetow
Decouple Aggregator and ImportFromDir from direct os.Open by routing through io/fs: NewAggregatorFS, ImportFromFS, recordsdir.ListNonEmptyFilesFS. NewAggregator and ImportFromDir wrap os.DirFS for backward compatibility. Add fstest.MapFS tests for recordsdir, aggregate, and ImportFromFS. Made-with: Cursor
2026-04-14refactor: share .records file discovery (ask u3)Paul Buetow
Extract ListNonEmptyFiles and HostFromFileName into internal/recordsdir for aggregate and storage ImportFromDir. Behavior unchanged. Made-with: Cursor
2026-04-14y3: case-insensitive ParseCategory, ParseMetric, ParseOutputFormatPaul Buetow
Use strings.ToLower for POLA (CLI/HTTP). Extend parse tests with mixed-case and lowercase inputs. Made-with: Cursor
2026-04-14fix: safe HostAggregate lifespan/downtime and uint64 max boot (ask 34)Paul Buetow
Guard Lifespan and Downtime against uint64 underflow when LastSeen < FirstBoot or Uptime exceeds lifespan. Track per-host max BootTime with uint64 in LoadAggregates to match file aggregation and avoid int64 conversion bugs. Tests: lifespan underflow, downtime edge cases, LastKernel near MaxInt64. Made-with: Cursor
2026-04-14fix(t3): surface CreateSchema errors in integration import testPaul Buetow
Check CreateSchema in integration test runner so failures report 'create schema' instead of failing later on import. Extract testImportExportOnDB for the canceled-context regression test. Made-with: Cursor
2026-04-14recordline: reject invalid uptime/bootTime (s3)Paul Buetow
Return ok=false when strconv.ParseUint fails instead of using zero values. Add tests for non-numeric and empty numeric fields. Made-with: Cursor
2026-04-14fix(r3): use errors.Is for sentinel error comparisonsPaul Buetow
Replace direct == checks with errors.Is so wrapped errors are handled correctly (authkeys Verify, daemon server/EOF, Magefile uninstall). Refs: ask r3, 100 Go Mistakes #51 Made-with: Cursor
2026-04-14Enable race tests in mage automation (p3)Paul Buetow
- Test runs unit tests then race detector via mg.Deps - Add TestRace target for race-only runs - Document mage test vs testRace in AGENTS.md Made-with: Cursor
2026-04-14goprecords: wrap LoadRecords errors in LoadAggregates (ask o3)Paul Buetow
Use fmt.Errorf("load records: %%w", err) so import/query failures carry context. Add TestLoadAggregatesWrapsLoadRecordsError. Made-with: Cursor
2026-04-14n3: validate SQLite with PingContext after OpenPaul Buetow
Call db.PingContext in storage.Open and authkeys.OpenStore; close DB and return wrapped errors on failure. Add tests for canceled context and invalid directory path. Made-with: Cursor
2026-04-14refactor: extract record line parser to internal/recordline (m3)Paul Buetow
Deduplicate parseRecordLine from goprecords and storage; shared recordline.Parse with Fields type. Tests live in recordline package; DB import path still covered by goprecords TestImportFromDir. Made-with: Cursor
2026-04-14daemon: NewHandler returns error instead of panicking (l3)Paul Buetow
Replace Handler with NewHandler(statsDir) (http.Handler, error) when the auth store cannot be opened, matching Run's error wrapping. Tests use a small helper; add coverage for open failure on a read-only stats dir. Made-with: Cursor
2026-04-14daemon: set http.Server timeouts for Run (k3)Paul Buetow
Configure ReadHeaderTimeout, ReadTimeout, WriteTimeout, and IdleTimeout on the daemon listener to mitigate slowloris and stuck clients. Made-with: Cursor
2026-04-14test(daemon): race-safe log buffers in Run tests (j3)Paul Buetow
Use a mutex-wrapped buffer for slog and io.Copy so polling String() does not race concurrent writes from Run and background goroutines. Made-with: Cursor
2026-04-14docs(readme): microservice API and CLI compatibility (task 33)Paul Buetow
Document --daemon, stats vs import/query DB paths, GET /report query parameters including HTML, health/livez/readyz, uploads with Bearer auth, per-client keys and --create-client-key, plain HTTP + external TLS, and backward compatibility for CLI workflows. Made-with: Cursor
2026-04-14test: microservice coverage for task 63Paul Buetow
Add table-driven HTTP and unit tests for report (all formats, negatives), upload/auth boundaries, upload helpers, readiness, Run and logging. Extend authkeys tests for Close, CreateKey validation, and post-close errors. Add CLI tests for defaultListenFromEnv and create-client-key with -auth-db only. Add mage CoverMicroservice for local/CI-style coverage measurement. Use context.Background and os.Chdir for Go 1.21-compatible tests. Made-with: Cursor
2026-04-14daemon: add /livez and /readyz HTTP probes for KubernetesPaul Buetow
Liveness: GET /livez matches GET /health (200, process serving). Readiness: GET /readyz verifies stats-dir exists, is a directory, and is readable and writable; if -auth-db resolves outside stats-dir, that directory is checked too. Failures return 503 Service Unavailable. Refs: ask task 53 Made-with: Cursor
2026-04-14docs,test: HTTP upload API and curl auth example (ask 23)Paul Buetow
Document daemon plain-HTTP mode, PUT /upload paths for five uptimed files, Bearer token header, and env flags. Add table-driven test asserting each kind maps to the expected filename in stats-dir. Made-with: Cursor
2026-04-14task 13: upload API keys in SQLite, Bearer auth, create-client-key CLIPaul Buetow
- Add internal/authkeys with SHA-256 hashed tokens and KeyCount gate - PUT /upload/{host}/{kind} for uptimed files; auth when any key exists - Daemon -auth-db and Config.AuthDB; plain HTTP unchanged - CLI: goprecords --create-client-key HOSTNAME (-stats-dir|-auth-db) Made-with: Cursor
2026-04-14Add HTML OutputFormat and report API support (ask task 03)Paul Buetow
- Add FormatHTML with parse/string and HTMLReporter on existing report path - Emit minimal HTML document with escaped title, description, and pre table - Daemon /report sets text/html Content-Type for HTML format - Integration fixtures and tests for HTML Made-with: Cursor
2026-04-14daemon: stdout-only slog logging for HTTP (task 43)Paul Buetow
- Route http.Server ErrorLog and request access lines through slog text to stdout (or Config.LogOutput for tests). - Log daemon_listen on start and http_request per request (method, path, status, duration_ms). - CLI daemon: flag usage and missing-stats-dir message on stdout. Made-with: Cursor
2026-04-14test(x2): codify CLI backward-compatibility contractPaul Buetow
- Add internal/cli tests for stable entry points: -version/--version, file-based report (-stats-dir), import/query, test subcommand, -daemon/--daemon validation, and subcommand recognition. - Assert RegisterReportFlags keeps required flag names and defaults (CLI/HTTP). - Run integration import/export against a temp SQLite file instead of fixtures/test_import.db to avoid flaky readonly errors under parallel tests. Made-with: Cursor