GitHub
08/27/2026, 8:58 AMpkg/logsinks/categories.go (new): category constants, MatchesCategory, ValidateCategories, NormalizeCategories (collapses explicit "all five" to empty), `DecodeCategories`/`encodeCategories` helpers
• `pkg/logsinks/logsinks.go`: Added Categories text column to LogSink model (JSON-encoded array; empty = all). `Create`/`Update` accept and validate categories. CloneEnvironment copies them. BuildExporters passes them to ExporterEntry
• `pkg/logging/exporter.go`: Added Categories to ExporterEntry. MultiExporter stores a parallel categories slice and skips exporters whose categories don't match the incoming logType in Export (nil/empty = all, backwards-compatible)
• `cmd/tls/handlers/carves.go`: `ProcessCarveWrite`/`ProcessCarveInit`/`ProcessCarveBlock` now emit carve.meta and carve.data events via LoggerTLS.LogWithEnv so external sinks can track carve lifecycle. Raw block data is NOT sent through the fan-out — it stays in the DB/S3 via pkg/carves
• `pkg/types/types.go`: Added Categories to LogSinkCreateRequest, LogSinkUpdateRequest, LogSinkTypeSpec
• `cmd/api/handlers/log_sinks.go`: Added Categories to `logSinkDTO`; create/update handlers pass categories through; types endpoint advertises AllCategories
Frontend:
• `frontend/src/api/log-sinks.ts`: Added categories to LogSink, create/update request types, and LogSinkTypeSpec
• `frontend/src/features/log-sinks/LogSinksPage.tsx`: Categories checkbox section in the sink editor (All checkbox + individual category toggles). New Destination column in the table showing color-coded category badges per sink — "all" badge when unscoped, individual badges when categories are explicitly set
Migration: Categories is a new nullable text column added by AutoMigrate. Existing rows get "" = all categories — no behavior change. No YAML changes; seeded sinks get empty categories. Rollback by clearing the column.
Validation
• go test ./pkg/logsinks/... — TestMatchesCategory*, TestValidateCategories, TestNormalizeCategories, TestEncodeDecodeCategories, TestCreateWithCategories, TestUpdateWithCategories, TestCreateRejectsInvalidCategory, TestClonePreservesCategories
• go test ./pkg/logging/... — TestMultiExporterCategoryFiltering verifies status-only, all, and query+result sinks receive the correct logTypes
• go test ./pkg/... ./cmd/... — full Go test suite passes (no regressions)
• npm run check — TypeScript typecheck passes
• npm run test — 292 frontend tests pass (no regressions)
jmpsec/osctrlGitHub
08/27/2026, 9:20 AM