fix: send missing-yaml warning to stderr and flag basename collisions

Addresses review feedback on #604:

- Warning now goes to stderr instead of stdout so it doesn't mix with
  mine progress output when users pipe stdout elsewhere.
- Warning explicitly calls out that directories with the same basename
  will share a wing name, and suggests adding mempalace.yaml to
  disambiguate. Prevents silent content mixing across projects mined
  without yaml.
This commit is contained in:
Matt Van Horn
2026-04-11 11:05:27 -04:00
committed by Igor Lins e Silva
parent a035293998
commit 1ea00fb168
+7 -2
View File
@@ -8,6 +8,7 @@ Stores verbatim chunks as drawers. No summaries. Ever.
""" """
import os import os
import sys
import hashlib import hashlib
import fnmatch import fnmatch
from pathlib import Path from pathlib import Path
@@ -271,12 +272,16 @@ def load_config(project_dir: str) -> dict:
if legacy_path.exists(): if legacy_path.exists():
config_path = legacy_path config_path = legacy_path
else: else:
wing_name = resolved_project_dir.name
print( print(
f" No mempalace.yaml found in {resolved_project_dir} " f" No mempalace.yaml found in {resolved_project_dir} "
"— using auto-detected defaults" f"— using auto-detected defaults (wing='{wing_name}'). "
"Directories with the same basename will share a wing; "
"add mempalace.yaml to disambiguate.",
file=sys.stderr,
) )
return { return {
"wing": resolved_project_dir.name, "wing": wing_name,
"rooms": [ "rooms": [
{ {
"name": "general", "name": "general",