test: add tests for ~40 untested source files #239

Open
opened 2026-03-10 10:14:59 +00:00 by ash · 0 comments
Owner

Problem

~40 source files have no corresponding test file, including critical ones:

High priority (core logic):

  • handler.go — DeciderHandler, the main entry point
  • memory.go — MemoryStore
  • memory_deletion.go — deletion logic
  • memory_lifecycle.go — lifecycle management
  • eventbus_channel.go — channel-based event bus
  • dcb/memory.go — DCB memory implementation
  • dcb/sqlite.go — DCB SQLite implementation
  • gdpr/pii.go — PII interface detection

Medium priority:

  • command/dispatch.go, command/register.go, command/errors.go
  • commandlog/commandlog.go
  • codec/json.go, codec/jsoniter.go, codec/protobuf.go
  • audit.go, helpers.go, stream.go

Some may be tested indirectly through integration tests, but direct unit tests catch edge cases and regressions.

Solution

Add test files for all untested source files. Priority: handler.go, memory.go, dcb/, gdpr/pii.go first.

Pillar: Security (untested = unverified), Developer Experience

## Problem ~40 source files have no corresponding test file, including critical ones: **High priority (core logic):** - `handler.go` — DeciderHandler, the main entry point - `memory.go` — MemoryStore - `memory_deletion.go` — deletion logic - `memory_lifecycle.go` — lifecycle management - `eventbus_channel.go` — channel-based event bus - `dcb/memory.go` — DCB memory implementation - `dcb/sqlite.go` — DCB SQLite implementation - `gdpr/pii.go` — PII interface detection **Medium priority:** - `command/dispatch.go`, `command/register.go`, `command/errors.go` - `commandlog/commandlog.go` - `codec/json.go`, `codec/jsoniter.go`, `codec/protobuf.go` - `audit.go`, `helpers.go`, `stream.go` Some may be tested indirectly through integration tests, but direct unit tests catch edge cases and regressions. ## Solution Add test files for all untested source files. Priority: handler.go, memory.go, dcb/, gdpr/pii.go first. ## Pillar: Security (untested = unverified), Developer Experience
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#239
No description provided.