Files
archie/internal
sam 05cfc30da3 fix(indexing): surface index config properly and stop silent degradation
Follow-up to c924281, which introduced two defects of its own.

1. indexing.Config was a private config island: index paths existed nowhere
   in internal/config or config.example.toml, so they were undiscoverable
   and unsettable by anyone reading the real configuration.

   Now [indexing] in config.toml, defined in its own internal/config/
   indexer.go rather than appended to the 21-struct config.go, and its
   defaulting lives with it as IndexingConfig.withDefaults so finalize
   delegates instead of growing. Paths default off work_dir, keeping the
   two archied instances on one host from sharing an index. Documented in
   config.example.toml.

   internal/indexing keeps its own plain Config and does NOT import
   internal/config, so it stays a straight diff against its tau original.

2. A failed index build was invisible. refreshAsync wrote the reason to a
   database column with no reader and degraded to unindexed search in
   silence — the failure mode that costs hours precisely because nothing
   appears to be wrong. Every give-up path now logs, and a successful
   build logs once.

The logger is resolved at the point of use, not in the constructor: a
Manager can be built as a struct literal (the ported tests do), and
constructor-only defaulting panicked on the build goroutine, where a panic
takes the daemon with it. Regression test covers the zero and nil Manager.
2026-07-28 01:37:19 +10:00
..
2026-07-27 04:39:27 +10:00