Per-package KCL config fragments — service-owned defaults (db, embeddednats, embeddedfga) #12
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ginjiruu/toolbelt#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
Each toolbelt service package (db, embeddednats, embeddedfga) needs a default data directory (NATS
data/nats, sqlitedata/sqlite/<app>.db, FGAfile://data/fga/openfga.db). Today those defaults are hand-written twice — as Go consts/values in the service package and as defaults in each app'sschema.k. Where should each service's default config live and how do apps inherit it?Decisions this ticket resolves:
embeddednats/schema.k,db/schema.k,embeddedfga/schema.k), andkcl-generategeneralizes its embedded-fragment merge (parseSchemaFiles) to merge N fragments — apps compose vianats: NATS = NATS {}.var DefaultXldflags-overridable pattern survives.Graduated from ticket #3 (config reexport absorption) during its grilling session.
Resolve with
/grilling+/domain-modeling,/prototypeif the merge shape needs a concrete look. On close, write the plan todocs/plans/and reshapekcl-generate+example/surfaces.Review complete; implementation verified. See closing comment for the review + lessons learned.
Verification: root
go test ./..., toolsgo test ./kcl-generate/, and example build+tests all pass;task check-kcldrift guard passes clean (no stale output). Implementation is commitf3cbcd0(implements sub-tickets #15-#18 under parent spec #14). ttrpg consumer break recorded: the twoWithStoreDir(t.TempDir())test call sites (assetstore_test.go, feature/campaign/projectors_test.go) must become positionalSetupNATS(ctx, logger, dir)— separate consumer-migration project, as specced.Lessons learned (full text in the closing comment):