Config surface for memory engine selection and settings #7

Closed
opened 2026-10-27 13:34:34 +00:00 by sam · 0 comments
Owner

Add validated configuration for choosing a memory engine and supplying its per-engine settings, following the existing config conventions in internal/config and internal/infrastructure/configuration.

Acceptance Criteria

Engine choice and per-engine settings are expressible in config.toml with toml/yaml/json tags matching repo convention. Validation rejects an unknown engine name with a clear error naming the valid set, in the style of the existing forge.type validation. Defaults resolve so an absent section keeps the builtin engine. config.example.toml documents the section.

Close reason

Complete, all four AC clauses:

  • config.MemoryConfig.Engine field added with toml/yaml/json tags;
    Provider/ProviderConfig/SessionTTL also gained the toml tags they were
    missing (repo convention, config.toml is the primary format).
  • validateMemory (internal/infrastructure/configuration/validate.go)
    rejects an engine name outside memoryEngines with
    "%w: memory.engine %q (want %s)", the same named-constant-list +
    oneOf/list shape forge.type already uses. TestValidateMemoryNames
    TheValidSet pins the exact message.
  • applyMemoryDefaults resolves an absent engine to "builtin"
    (memoryEngineBuiltin), verified by
    TestApplyMemoryDefaultsFillsAbsentEngineWithBuiltin, and an explicit
    value is left alone (TestApplyMemoryDefaultsLeavesExplicitValuesAlone).
  • config.example.toml documents [memory] engine alongside the existing
    provider field, distinguishing the two mechanisms.

Since closing this, archie-core-1786637499480 (ship builtin as default)
landed the bootstrap wiring that actually consumes cfg.Memory.Engine, so
the field is not just parsed and validated but live end to end.


Imported from beads archie-core-1786637490043-10-711c450a · GitHub #31 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-01

Add validated configuration for choosing a memory engine and supplying its per-engine settings, following the existing config conventions in internal/config and internal/infrastructure/configuration. ### Acceptance Criteria Engine choice and per-engine settings are expressible in config.toml with toml/yaml/json tags matching repo convention. Validation rejects an unknown engine name with a clear error naming the valid set, in the style of the existing forge.type validation. Defaults resolve so an absent section keeps the builtin engine. config.example.toml documents the section. ### Close reason Complete, all four AC clauses: - config.MemoryConfig.Engine field added with toml/yaml/json tags; Provider/ProviderConfig/SessionTTL also gained the toml tags they were missing (repo convention, config.toml is the primary format). - validateMemory (internal/infrastructure/configuration/validate.go) rejects an engine name outside memoryEngines with "%w: memory.engine %q (want %s)", the same named-constant-list + oneOf/list shape forge.type already uses. TestValidateMemoryNames TheValidSet pins the exact message. - applyMemoryDefaults resolves an absent engine to "builtin" (memoryEngineBuiltin), verified by TestApplyMemoryDefaultsFillsAbsentEngineWithBuiltin, and an explicit value is left alone (TestApplyMemoryDefaultsLeavesExplicitValuesAlone). - config.example.toml documents [memory] engine alongside the existing provider field, distinguishing the two mechanisms. Since closing this, archie-core-1786637499480 (ship builtin as default) landed the bootstrap wiring that actually consumes cfg.Memory.Engine, so the field is not just parsed and validated but live end to end. --- _Imported from beads `archie-core-1786637490043-10-711c450a` · GitHub #31 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-01_
sam added the mediumfeature labels 2026-10-27 13:34:34 +00:00
sam self-assigned this 2026-10-27 13:34:34 +00:00
sam closed this issue 2026-10-27 13:34:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#7