setupMemory never calls RegisterExternal; cfg.Memory.Provider is silently inert #15

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

internal/app/archied/bootstrap.go:setupMemory's own doc comment says
"External providers from config are added via RegisterExternal when
cfg.Memory.Provider is set" -- no such branch exists in the function body.
Today, an operator who sets [memory] provider = "..." in config.toml gets
no error and no effect: the builtin file-backed provider is the only one
that ever runs. config.example.toml already documents this as a known gap
("[memory] exists to register an EXTERNAL provider alongside it, but as of
this writing that wiring ... is not called").

Separately, internal/config.MemoryConfig (config.go:287) has no toml
struct tag on any field (yaml/json only), so even fixing the wiring call
may not bind values from config.toml, the format operators actually use --
verify this before or as part of the fix.

This sits ahead of the typed engine-family work (archie-core-...-11-e245c170)
in the sense that it's a bug in the CURRENT ad-hoc MemoryProvider wiring,
not a gap in the future engine contract -- decide whether it's worth fixing
in the legacy path or superseded once the conforming memory engine family
lands, rather than fixing both.

Close reason

Fixed, but not as originally framed. Investigated wiring RegisterExternal
for real: there is no external MemoryProvider implementation anywhere in
the repo to construct and pass to it (only internal/memory/builtin.Provider
exists) -- calling RegisterExternal would be dead plumbing to nothing, not
a fix.

The actual fix: configuration.validateMemory now rejects memory.provider
being set at all, with a clear reason, instead of accepting it and doing
nothing. Turns the silent no-op into a loud one. setupMemory's doc comment
and config.example.toml updated to match; the now-pointless
provider_config example section removed.

toml struct tags (the other half of this bug) were already fixed in
archie-core-1786637490043's commit.

Drop the rejection once a real external provider (or the domain/memory
engine family's Honcho proof, archie-core-1786637492031) gives the field
an effect again.

TestValidateMemoryRejectsProviderSetToAnything covers it. task check is
green.


Imported from beads archie-core-1786637499161-356-e424e40d.1 · GitHub #649 · type bug · priority P2 · created 2026-09-01 · closed 2026-09-01

internal/app/archied/bootstrap.go:setupMemory's own doc comment says "External providers from config are added via RegisterExternal when cfg.Memory.Provider is set" -- no such branch exists in the function body. Today, an operator who sets [memory] provider = "..." in config.toml gets no error and no effect: the builtin file-backed provider is the only one that ever runs. config.example.toml already documents this as a known gap ("[memory] exists to register an EXTERNAL provider alongside it, but as of this writing that wiring ... is not called"). Separately, internal/config.MemoryConfig (config.go:287) has no `toml` struct tag on any field (yaml/json only), so even fixing the wiring call may not bind values from config.toml, the format operators actually use -- verify this before or as part of the fix. This sits ahead of the typed engine-family work (archie-core-...-11-e245c170) in the sense that it's a bug in the CURRENT ad-hoc MemoryProvider wiring, not a gap in the future engine contract -- decide whether it's worth fixing in the legacy path or superseded once the conforming memory engine family lands, rather than fixing both. ### Close reason Fixed, but not as originally framed. Investigated wiring RegisterExternal for real: there is no external MemoryProvider implementation anywhere in the repo to construct and pass to it (only internal/memory/builtin.Provider exists) -- calling RegisterExternal would be dead plumbing to nothing, not a fix. The actual fix: configuration.validateMemory now rejects memory.provider being set at all, with a clear reason, instead of accepting it and doing nothing. Turns the silent no-op into a loud one. setupMemory's doc comment and config.example.toml updated to match; the now-pointless provider_config example section removed. toml struct tags (the other half of this bug) were already fixed in archie-core-1786637490043's commit. Drop the rejection once a real external provider (or the domain/memory engine family's Honcho proof, archie-core-1786637492031) gives the field an effect again. TestValidateMemoryRejectsProviderSetToAnything covers it. task check is green. --- _Imported from beads `archie-core-1786637499161-356-e424e40d.1` · GitHub #649 · type bug · priority P2 · created 2026-09-01 · closed 2026-09-01_
sam added the mediumbugepic labels 2026-10-27 13:34:36 +00:00
sam self-assigned this 2026-10-27 13:34:36 +00:00
sam closed this issue 2026-10-27 13:34:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#15