- Record six-level compass, optional services and typed festival bus - Document TDD commits and auto-fixed toolchain/singleton issues
7.6 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-framework-kernel-foundation | 02 | kernel |
|
|
|
|
|
|
|
|
|
25min | 2026-09-16 |
Phase 1 Plan 2: Layered Config, Services and Events Summary
Six-level koanf config with Set/Persist/Reload, optional plugin services without a hard import, and typed festival dispatch with context-scoped request state
Performance
- Duration: 25 min
- Started: 2026-09-16T11:06:17Z
- Completed: 2026-09-16T11:31:20Z
- Tasks: 3
- Files modified: 40
Accomplishments
- Compass loads plugin defaults, sorted base YAML, env overlays,
SUMMER_variables (split on__), persisted overrides and runtime Set in D-09 order; Persist is atomic with0600files; Reload clears Set golem15.optionalis a third hello plugin that publishespact.OptionalMessage; greeter usesHasPluginplus typed lookup and boots with or without it- App-owned
festival.Busimplements Fire (join errors), Collect (later key wins, partial payload) and UntilHandled, recovers panics with owner IDs, andtowelcarries actor/org/collection/locale oncontext.Context
Task Commits
Each task was committed atomically (TDD RED then GREEN):
- Task 1 RED: failing layered config tests -
255de60(test) - Task 1 GREEN: layered compass config -
cc44a1f(feat) - Task 2 RED: failing optional service tests -
5f22918(test) - Task 2 GREEN: optional plugin services and HasPlugin -
8696973(feat) - Task 3 RED: failing event and context tests -
36c152f(test) - Task 3 GREEN: typed events with request context -
a654e96(feat)
Plan metadata: pending (docs: complete plan)
Files Created/Modified
compass/config.go/env.go/persist.go- layered load, env mapping,.envfill, Set/Persist/Reloadparty/registry.go- HasConfig merge and SetPlugins before Registerbackpack/app.go/services.go- HasPlugin, typed Publish/Lookup, app-owned Events buspact/capabilities.go- OptionalMessage plus documented future KERN-03 familiesfestival/bus.go- typed Listen/Fire/Collect/UntilHandledtowel/context.go- unexported-key request accessorsexamples/hello/plugins/optional/- optional plugin moduleexamples/hello/plugins/greeter/plugin.go- optional lookup and hello event demoexamples/hello/summer.yaml/plugins.gen.go/go.work- third plugin wired
Decisions Made
- Keep runtime Set off the disk tree so Reload is a full rebuild plus an empty overlay
- Put the optional service interface in
pact, not in the optional plugin package - Model Collect/UntilHandled as event interfaces (
Collected,IsHandled) so oneListen[T]serves all three modes - Record activated plugin IDs on the app before Register so HasPlugin sees not-yet-Booted plugins
- Recover panics as
festival: plugin <id> panickedwithout event contents
Deviations from Plan
Auto-fixed Issues
1. [Rule 2 - Missing Critical] Restore toolchain go1.27.0 after go mod tidy
- Found during: Task 1 (provider install)
- Issue:
go mod tidydroppedtoolchain go1.27.0(same as Plan 01) - Fix: Re-added the directive on root and example modules
- Files modified:
go.mod, examplego.modfiles - Verification: files contain
toolchain go1.27.0 - Committed in:
cc44a1f(Task 1 GREEN)
2. [Rule 1 - Bug] Greeter extra leaked across Activate on the init singleton
- Found during: Task 2 (hello without-optional test)
- Issue:
party.Registerstores one plugin instance; Boot with optional setextra, later Boot without optional left the old string - Fix: Clear
extraat the start of Boot - Files modified:
examples/hello/plugins/greeter/plugin.go - Verification:
TestGreeterRunsWithoutOptionalPluginpasses - Committed in:
8696973(Task 2 GREEN)
3. [Rule 1 - Bug] Hello manifest test still expected two plugins
- Found during: Task 2 (
go test ./...) - Issue:
internal/build.TestLoadHelloManifesthard-coded plugin count 2 - Fix: Expect
golem15.optionalas the third manifest entry - Files modified:
internal/build/build_test.go - Verification:
go test ./internal/buildpasses - Committed in:
8696973(Task 2 GREEN)
Total deviations: 3 auto-fixed (1 missing critical, 2 bugs) Impact on plan: Required for D-05, correct optional skip, and a green suite. No scope creep.
Issues Encountered
go getof koanf file/env/confmap providers pulledfsnotifytransitively through the file provider; it is indirect only and unused by compass (no Watch). Plan 03 still ownssummer dev.
Authentication Gates
None.
User Setup Required
None - no external service configuration required.
Next Phase Readiness
Ready for 01-03-PLAN.md (watch loop and CLI UX). Config, optional composition, services and events are in place on the hello path. Do not add HTTP/DB/auth here.
Self-Check: PASSED
- Created files exist on disk (
compass/env.go,compass/persist.go,backpack/services.go,festival/bus.go,towel/context.go, optional plugin) - Commits
255de60,cc44a1f,5f22918,8696973,36c152f,a654e96exist - Root and hello
go vet ./...andgo test ./...passed go test -race ./compass ./party ./backpack ./festival ./towelpassedgo run . greeter:helloprints layered config, optional extra, and event results- Greeter source has no import of the optional plugin module
- STATE.md and ROADMAP.md were not updated in this worktree
Phase: 01-framework-kernel-foundation Completed: 2026-09-16