chore: add MERGE-DEBUG traces for project_root lifecycle

Temporary diagnostic logging to track why project_root becomes None
during merge pipeline operations. Tagged with MERGE-DEBUG for easy
grep-and-remove once the root cause is confirmed fixed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-26 17:01:38 +00:00
parent b34335daad
commit ac087f1a58
5 changed files with 36 additions and 3 deletions

View File

@@ -94,6 +94,8 @@ async fn main() -> Result<(), std::io::Error> {
.unwrap_or_else(|e| panic!("Invalid project.toml: {e}"));
} else {
// No .story_kit/ found — fall back to cwd so existing behaviour is preserved.
// TRACE:MERGE-DEBUG — remove once root cause is found
slog!("[MERGE-DEBUG] main: no .story_kit/ found, falling back to cwd {:?}", cwd);
*app_state.project_root.lock().unwrap() = Some(cwd.clone());
}
}