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:
committed by
Igor Lins e Silva
parent
a035293998
commit
1ea00fb168
+7
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user