#217 (PR #388) closed lint.rs relative_display, the source-map anchors, the output.rs stem fallbacks and fmt's exit code. Same datum, remaining sinks — each should fail closed with mds::io, or emit root-relative text; one test per sink; census table in the PR:
crates/mds-cli/src/build.rs apply_source_map_file_label (~:1159) — sm.file = out.file_name().map(to_string_lossy) into the published SMv3 file; the same lossy basename at ~:1492 and ~:1558 (stale-map reconciliation). Proposal: to_str(); None ⇒ omit file and warn, or reject the output path at resolve_output_path_for_kind.
crates/mds-cli/src/fmt.rs (~:184 and ~:248) — file_name = path.display().to_string() threaded into format_source_named, so lexer/safety-gate diagnostics name the raw (absolute, lossy) path while lint names root-relative. Proposal: root-relative via NativeFs display or a shared helper.
crates/mds-core/src/lib.rs lint() (:1283-1286) — file_name().and_then(to_str).unwrap_or(path_str) labels a stem-less path with the full path string; and crates/mds-cli/src/lint.rs <file> sentinel (:1053; dead: non-UTF-8 is rejected by read_source_file first, None only for /). Document or fold into the fail-closed contract.
- getcwd fallbacks:
crates/mds-cli/src/output.rs canonicalize_out_dir (:218-220) and crates/mds-cli/src/build.rs compute_source_map_base (:1091) — current_dir().unwrap_or_else(|_| "."): with an unreadable cwd a relative --out-dir becomes ./<dir> (uncanonicalizable ⇒ in-root exclusion never matches) and source_map_base stays relative (silently demotes map-relative to root-relative — the comment near build.rs :1123-1124 names the hazard). read_stdin (:708) and auto_detect_mds_file (~:775) already error; make these two do the same (mds::io, exit 2).
crates/mds-cli/src/watch.rs graph_key (~:225) — p.to_path_buf() fallback when the parent cannot be canonicalized: audit as the same class.
Refs #217, PR #388.
#217 (PR #388) closed
lint.rs relative_display, the source-map anchors, theoutput.rsstem fallbacks andfmt's exit code. Same datum, remaining sinks — each should fail closed withmds::io, or emit root-relative text; one test per sink; census table in the PR:crates/mds-cli/src/build.rsapply_source_map_file_label(~:1159) —sm.file = out.file_name().map(to_string_lossy)into the published SMv3file; the same lossy basename at ~:1492 and ~:1558 (stale-map reconciliation). Proposal:to_str();None⇒ omitfileand warn, or reject the output path atresolve_output_path_for_kind.crates/mds-cli/src/fmt.rs(~:184 and ~:248) —file_name = path.display().to_string()threaded intoformat_source_named, so lexer/safety-gate diagnostics name the raw (absolute, lossy) path while lint names root-relative. Proposal: root-relative viaNativeFsdisplay or a shared helper.crates/mds-core/src/lib.rslint()(:1283-1286) —:1053; dead: non-UTF-8 is rejected byfile_name().and_then(to_str).unwrap_or(path_str)labels a stem-less path with the full path string; andcrates/mds-cli/src/lint.rs<file>sentinel (read_source_filefirst,Noneonly for/). Document or fold into the fail-closed contract.crates/mds-cli/src/output.rscanonicalize_out_dir(:218-220) and:1091) —crates/mds-cli/src/build.rscompute_source_map_base(current_dir().unwrap_or_else(|_| "."): with an unreadable cwd a relative--out-dirbecomes./<dir>(uncanonicalizable ⇒ in-root exclusion never matches) andsource_map_basestays relative (silently demotes map-relative to root-relative — the comment nearbuild.rs:1123-1124 names the hazard).:708) andread_stdin(auto_detect_mds_file(~:775) already error; make these two do the same (mds::io, exit 2).crates/mds-cli/src/watch.rsgraph_key(~:225) —p.to_path_buf()fallback when the parent cannot be canonicalized: audit as the same class.Refs #217, PR #388.