Skip to content

Tech-debt paydown: [009][011][012] via SDLC + batch cleanup#147

Merged
lesovsky merged 28 commits into
masterfrom
develop
Jun 25, 2026
Merged

Tech-debt paydown: [009][011][012] via SDLC + batch cleanup#147
lesovsky merged 28 commits into
masterfrom
develop

Conversation

@lesovsky

Copy link
Copy Markdown
Owner

Summary

Pays off the accumulated tech-debt register — actionable items only. No new user-facing features; all changes are internal-quality.

Paid off via full SDLC (user-spec → tech-spec → decomposition → implementation → QA)

  • [009] Defensive 256 MiB allocation cap on tar entries in pgcenter reportstat.MaxResultFileSize int64, guard before make([]byte, …) on all three readTar branches (CWE-789 hardening, int64-only, no gosec G115). 9a3c630
  • [011] Consolidated the duplicated rate formatter — unexported pretty.rateUnitParts core; RateUnit + new RateUnitPrefixed delegate; rateField deleted, byte-identical (boundary table). ee623fa
  • [012] Fixed-width verbose pgstat Size fields — new pretty.SizeWidth + sizeFieldWidth=8 + naReserve; columns/labels no longer breathe. Manual v check confirmed. c89b686

Paid off directly (batch)

  • [005]/[008] test panics → t.Skipf when PG fixture absent
  • [013] migrated .golangci.yml to golangci-lint v2 + switched CI to the v2 binary
  • [014] untracked bin/pgcenter + added .gitignore
  • [015] toolchain go1.25.11 in go.mod (closes govulncheck GO-2026-5037 locally too)
  • Removed 8 stale locked agent worktrees

Newly registered

  • [016] collectors swallow errors silently (no logging facility — deferred by design: gocui TUI owns the terminal)

Quality

  • make test (race+coverage), make lint (golangci-lint v2 + gosec, no G115), make vuln — all green.
  • Feature 011 ran through the full multi-validator SDLC; 100% first-pass review rate (0 critical/major).
  • Tech-debt register: actionable items down from 13 → 4 active (remaining need a standby cluster or are historical/by-design).

🤖 Generated with Claude Code

lesovsky and others added 28 commits June 25, 2026 16:55
…0) (#145)

Adds a verbose toggle (`v`) for the sysstat/pgstat top panels: sysstat +3
rows (iostat/nicstat/filesyst), pgstat +5 rows (workload/databases/workers/
replication/bgwr-ckpt). A display mode (no new view), reusing the free-form
render path, persistent across screens. Includes verbose-gated all-three
system collection, verboseCollectState (first-tick n/a + collecting hint +
re-arm without Reset, latency guard max(refresh/4,500ms)), new formatters
(ceil/reserved-digit/dynamic unit suffix), and panel-consistent aggregates.

Full go test ./... green (live PG 14-18), gosec clean. TUI-only (NotRecordable).
Decision history under docs/features/010-feat-overview-dashboard/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ch debt, metrics, archive

Post-merge finalization of the verbose-panel feature (merged via PR #145):
- project-knowledge: verbose-mode capability (overview), Verbose Top-Panel
  Mode architecture subsection, 4 reusable patterns.
- features-catalog: [010] entry.
- decisions-log: 8 ADRs (mode-not-view, dual-boolean, topBandLayout,
  all-three branch, verboseCollectState re-arm, .ready backlog, databases
  split, latency guard).
- tech-debt: [010]-[015] (recovery-t substitution, rateField/RateUnit dup,
  Size-field width, golangci-lint v1/v2, tracked bin/pgcenter, GO-2026-5037).
- user-spec Post-implementation section; metrics finalized + copied to
  docs/metrics/; feature dir archived.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
revive redefines-builtin-id flagged local vars `max` (Go 1.21+ builtin)
in pretty.RateUnit and top.rateField, and `real` (complex builtin) in
an fsstat test. Rename to maxFit / realPath. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Debt-audit cleanup of four low-severity items, no behavioral change to
the running app:

- [014] untrack bin/pgcenter build artifact; add .gitignore (/bin/) so
  `make build` no longer dirties the working tree.
- [005] top/reload_test.go: skip Test_doReload via t.Skipf when the PG
  fixture is unavailable instead of dereferencing a nil connection.
- [008] record/record_test.go: probe NewTestConnect before the loop and
  t.Skipf when no live PostgreSQL, instead of panicking in app.record.
- [015] add `toolchain go1.25.11` to go.mod so GOTOOLCHAIN=auto builds
  under >=1.25.11 locally too, closing govulncheck GO-2026-5037.

Register: moved [005] [008] [014] [015] to Resolved; registered [016]
(collectors swallow errors silently — no logging facility, deferred:
gocui TUI owns the terminal).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`.golangci.yml` was a v1-schema config while the installed tool is v2,
so `make lint` could not run locally (CI also resolved to the last v1
because its install path omits the /v2/ module prefix).

- Migrate .golangci.yml to the v2 schema (golangci-lint migrate). v2
  folds stylecheck (ST*) and quickfix (QF*) into staticcheck; the v1
  config enabled neither, so staticcheck.checks carries -ST*/-QF* to
  preserve the exact v1 effective rule set. `make lint` reports 0 issues.
- Switch both CI workflows to the v2 binary (/v2/cmd/golangci-lint) and
  bump the lint-tools cache key so the stale v1 binary is not restored.

Register: [013] moved to Resolved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…vability decision

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, pin error format

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ts into tasks 01/02

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ernal/pretty

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… pending

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…2], PK, ADR log, catalog, metrics, archive

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesovsky lesovsky merged commit 5f6f0a1 into master Jun 25, 2026
1 check passed
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