embeddednats: store directory becomes a required parameter #15

Closed
opened 2026-08-06 21:33:59 +00:00 by ginjiruu · 1 comment
Owner

Parent

#14 — Spec: Per-package KCL config fragments — service-owned defaults (db, embeddednats, embeddedfga)

What to build

The embedded NATS setup function takes the JetStream store directory as a required positional parameter, so the platform has no hidden Go default for where NATS data lives. An app author who calls the service setup must pass an explicit directory, and the composition root no longer guards against an empty string — the resolved config value is always passed through.

This removes the last hand-written Go const default among the service packages (user story 7 of the parent spec).

Acceptance criteria

  • SetupNATS accepts the store directory as a required positional argument, and the WithStoreDir option and its default-const are removed.
  • The composition root passes the resolved store-dir field value directly and drops its empty-string guard.
  • Every in-repo call site (composition root, seed command) is updated to the new signature.
  • go test ./... passes from the repo root and the tools module.
  • The consumer break is recorded: ttrpg's two WithStoreDir(t.TempDir()) test calls become positional (per spec, consumer migration is a separate later project).

Blocked by

  • None — can start immediately.
## Parent #14 — Spec: Per-package KCL config fragments — service-owned defaults (db, embeddednats, embeddedfga) ## What to build The embedded NATS setup function takes the JetStream store directory as a required positional parameter, so the platform has no hidden Go default for where NATS data lives. An app author who calls the service setup must pass an explicit directory, and the composition root no longer guards against an empty string — the resolved config value is always passed through. This removes the last hand-written Go const default among the service packages (user story 7 of the parent spec). ## Acceptance criteria - [ ] `SetupNATS` accepts the store directory as a required positional argument, and the `WithStoreDir` option and its default-const are removed. - [ ] The composition root passes the resolved store-dir field value directly and drops its empty-string guard. - [ ] Every in-repo call site (composition root, seed command) is updated to the new signature. - [ ] `go test ./...` passes from the repo root and the tools module. - [ ] The consumer break is recorded: ttrpg's two `WithStoreDir(t.TempDir())` test calls become positional (per spec, consumer migration is a separate later project). ## Blocked by - None — can start immediately.
Author
Owner

Implemented, verified (go test green in root/tools/example, task check-kcl green), and reviewed via /code-review. Landed in commit f3cbcd0 on master.

Implemented, verified (go test green in root/tools/example, task check-kcl green), and reviewed via /code-review. Landed in commit f3cbcd0 on master.
ginjiruu 2026-08-06 22:42:40 +00:00
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
ginjiruu/toolbelt#15
No description provided.