Use Effect fn for config service helpers

This commit is contained in:
elpresidank 2026-06-04 06:31:28 -05:00
parent 3890a598b5
commit 6ba4cf3b32
2 changed files with 193 additions and 177 deletions

View file

@ -1942,6 +1942,27 @@ Notes:
- `cd ts && bun run lint`
- `git diff --check`
### 2026-06-04: Config Service Effect.fn Helper Slice
- Status: migrated and package-verified.
- Completed:
- `ts/packages/flow/src/config/service.ts` now defines its reusable
generator helpers with `Effect.fn` or `Effect.fnUntraced` instead of
arrow functions returning `Effect.gen`.
- `consumeOnceEffect` uses `Effect.fnUntraced`; persistence, push, read,
put/delete, close, and run helpers use named `Effect.fn` wrappers.
- Existing persistence read/write catch/logging behavior is preserved through
`Effect.fn` post-processing functions.
- The focused scan for config-service helper `=> Effect.gen` patterns is
clean.
- Verification:
- `cd ts/packages/flow && bunx --bun vitest run src/__tests__/config-service.test.ts`
- `cd ts && bun run check:tsgo`
- `cd ts && bun run build`
- `cd ts && bun run test`
- `cd ts && bun run lint`
- `git diff --check`
## Subagent Findings To Preserve
- MCP/workbench:
@ -2067,9 +2088,9 @@ Notes:
- Gateway dispatcher static service registries, streaming membership, and
scoped requestor cache now use Effect `HashMap`/`HashSet`; gateway
term-bearing service membership sets now use Effect `HashSet` too.
- FlowManager and KnowledgeCore `() => Effect.gen(...)` factories are
normalized to `Effect.fn` / `Effect.fnUntraced`. Config and Librarian
helper factories still need focused follow-up slices.
- FlowManager, KnowledgeCore, and ConfigService `() => Effect.gen(...)`
factories are normalized to `Effect.fn` / `Effect.fnUntraced`. Librarian
helper factories still need a focused follow-up slice.
- ConfigService and KnowledgeCore operation dispatch now use `effect/Match`
with `Match.exhaustive`; FlowManager and Librarian operation dispatch now
use `effect/Match` with runtime-preserving `Match.orElse` fallbacks.