Skip to content

[self-care:server-go-logging] Extract audit lifecycle classification and add scan logging - #20166

Merged
mnkiefer merged 2 commits into
mainfrom
self-care/server-go-logging-auditlifecycle-39f4606f9c2260aa
Nov 4, 2026
Merged

mnkiefer merged 2 commits into
mainfrom
self-care/server-go-logging-auditlifecycle-39f4606f9c2260aa

Conversation

@mnkiefer

@mnkiefer mnkiefer commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Refactors server/internal/auditlifecycle so per-rebuild classification and overall status derivation are separate, directly testable units, and adds one debug log at scan completion.

Action: Reviewer should confirm Scan behavior is unchanged and that go -C server test ./internal/auditlifecycle passes.

Changes

  • Scan now delegates to classify (classification and counters) and overallStatus (ok, attention or incomplete). The logic is moved verbatim and the public API is unchanged.
  • One log call on the cao:auditlifecycle namespace, disabled by default, emitted after the scan completes. It records only already-computed scalars: status, scanned count, finding count, and tail-reached flag. It does not log rebuild IDs, attributes, or error text, and it does not affect control flow.
  • New real-value unit tests: TestClassifyAssignsClassificationAndCounters (complete, pending, missing-terminal, unknown for zero time, clock uncertainty, an incomplete tail, and a history gap) and TestOverallStatus.
Validation
  • gofmt clean, go -C server vet ./... clean, go -C server test ./... all passing.
  • No mocks, no new dependencies, and no secrets in the diff.

Control Plane

Generated by SelfCare / Server Go Logging · copilot · auto · ~39 AIC · ⌖ ~1 AIC · ⊞ 14.9K · ◷

  • expires on Nov 10, 2026, 8:09 PM UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mnkiefer
mnkiefer marked this pull request as ready for review November 4, 2026 11:19
@mnkiefer
mnkiefer requested a review from pelikhan as a code owner November 4, 2026 11:19
@mnkiefer
mnkiefer merged commit d229514 into main Nov 4, 2026
29 checks passed
@mnkiefer
mnkiefer deleted the self-care/server-go-logging-auditlifecycle-39f4606f9c2260aa branch November 4, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant