Skip to content

chore(config): dedup CONFIG_PATH + fix misleading legacy labels#161

Merged
KailasMahavarkar merged 1 commit intomainfrom
refactor/config-dedup
Apr 20, 2026
Merged

chore(config): dedup CONFIG_PATH + fix misleading legacy labels#161
KailasMahavarkar merged 1 commit intomainfrom
refactor/config-dedup

Conversation

@KailasMahavarkar
Copy link
Copy Markdown
Contributor

Two unrelated config-layer cleanups caught during a deeper poison audit.

1. One CONFIG_PATH, not two

tools/autoresearch/providers.py and tools/autoresearch/run_loop.py each computed the same path independently (under two different names, _CONFIG_PATH and CONFIG_FILE). Promoted to providers.CONFIG_PATH and aliased as CONFIG_FILE in run_loop via import, so both files point at the same constant now.

Also added a docstring on providers.load_config clarifying it's the one-shot variant - use run_loop.load_config for the autoresearch long-running mtime-cached + migrated variant.

2. "legacy kwargs" labels were wrong

config.merge_kwargs and store.py both called GraphStore(embedder=...), ingest_root=..., vault=..., retention=... "legacy" kwargs. They are in fact the primary public API - every test + doc uses them.

Relabeled as "top-level convenience kwargs" so future reviewers don't incorrectly conclude they're removable.

Test plan

  • 27 tests pass, no functional change

🤖 Generated with Claude Code

Two unrelated config-layer cleanups:

1. One CONFIG_PATH, not two
   tools/autoresearch/providers.py and tools/autoresearch/run_loop.py
   each computed Path(__file__).parent / "config.json" independently
   (under two different names, _CONFIG_PATH and CONFIG_FILE). Promoted
   to providers.CONFIG_PATH and aliased as CONFIG_FILE in run_loop
   via import so both files point at the same constant now.

   Also added a docstring on providers.load_config clarifying it is
   the one-shot variant (use run_loop.load_config for the autoresearch
   long-running mtime-cached + migrated variant).

2. "legacy kwargs" labels were wrong
   config.merge_kwargs and store.py both called GraphStore(embedder=...),
   ingest_root=..., vault=..., retention=... "legacy" kwargs. They are
   in fact the primary public API - every test + docs page uses them.
   Relabeled as "top-level convenience kwargs" so future reviewers do
   not incorrectly conclude they are removable.

No functional change. 27 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KailasMahavarkar KailasMahavarkar merged commit 2ea82c6 into main Apr 20, 2026
4 checks passed
@KailasMahavarkar KailasMahavarkar deleted the refactor/config-dedup branch April 20, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant