From 1ea00fb168b2242d07669f8d8ff6edfec06da8b8 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:05:27 -0400 Subject: [PATCH] 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. --- mempalace/miner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mempalace/miner.py b/mempalace/miner.py index 1b999b5..713c3b1 100644 --- a/mempalace/miner.py +++ b/mempalace/miner.py @@ -8,6 +8,7 @@ Stores verbatim chunks as drawers. No summaries. Ever. """ import os +import sys import hashlib import fnmatch from pathlib import Path @@ -271,12 +272,16 @@ def load_config(project_dir: str) -> dict: if legacy_path.exists(): config_path = legacy_path else: + wing_name = resolved_project_dir.name print( 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 { - "wing": resolved_project_dir.name, + "wing": wing_name, "rooms": [ { "name": "general",