Private cargo target dir for diagnostics. Created lazily by cargo on first run and kept outside the project tree so diagnostics never create project-local `.tracedecay` folders. `pub(crate)` so the MCP handler can probe whether it is cold (never built) and decide whether to prewarm rather than block for minutes.
(project_root: &Path)
| 118 | /// `pub(crate)` so the MCP handler can probe whether it is cold (never built) |
| 119 | /// and decide whether to prewarm rather than block for minutes. |
| 120 | pub(crate) fn target_dir_for(project_root: &Path) -> PathBuf { |
| 121 | std::env::temp_dir() |
| 122 | .join("tracedecay-target") |
| 123 | .join(crate::storage::default_profile_project_id(project_root)) |
| 124 | .join("diagnostics") |
| 125 | } |
| 126 | |
| 127 | /// Cargo emits messages of many levels — "warning" and "error" produce |
| 128 | /// diagnostics; "note", "help", "failure-note" are advisory and would |