Category
Code quality / code smell
Description
audit_log.cluster_context exists in internal/audit/schema.go and is documented in docs/audit-schema.md as "Reserved — currently unused." The audit code path never reads the kubeconfig context name or writes it into this column. It is dead schema.
Severity
Low — cosmetic or minor inconvenience
Affected Files
internal/audit/schema.go — column declaration
internal/audit/audit.go — StartExecution (would be the natural place to write it)
internal/cluster/cluster.go — would need to surface the active context if Option A is chosen
docs/audit-schema.md — description
Proposed Fix
Pick one:
Option A — populate it. Derive the context name from clientcmd when cluster.Connect loads a kubeconfig with multiple contexts, and pass it to Auditor.StartExecution via the Config struct (or a new field). Helpful for operators running against multiple clusters from one workstation.
Option B — drop it. If multi-context awareness isn't on the roadmap, remove the column from schemaSQL.
Area
Audit system
Architecture Layer
Layer 4 - Orchestration (cmd, cleanup)
Additional Context
Related: audit_log.cleanup_mode and workload_details.started_at / completed_at are also reserved-but-unused.
Category
Code quality / code smell
Description
audit_log.cluster_contextexists ininternal/audit/schema.goand is documented indocs/audit-schema.mdas "Reserved — currently unused." The audit code path never reads the kubeconfig context name or writes it into this column. It is dead schema.Severity
Low — cosmetic or minor inconvenience
Affected Files
internal/audit/schema.go— column declarationinternal/audit/audit.go—StartExecution(would be the natural place to write it)internal/cluster/cluster.go— would need to surface the active context if Option A is chosendocs/audit-schema.md— descriptionProposed Fix
Pick one:
Option A — populate it. Derive the context name from
clientcmdwhencluster.Connectloads a kubeconfig with multiple contexts, and pass it toAuditor.StartExecutionvia theConfigstruct (or a new field). Helpful for operators running against multiple clusters from one workstation.Option B — drop it. If multi-context awareness isn't on the roadmap, remove the column from
schemaSQL.Area
Audit system
Architecture Layer
Layer 4 - Orchestration (cmd, cleanup)
Additional Context
Related:
audit_log.cleanup_modeandworkload_details.started_at/completed_atare also reserved-but-unused.