docs(core,cli): document implicit contracts flagged in code review

- import_lastpass.rs: note that password and extra are intentionally
  not trimmed (leading/trailing whitespace is significant for both).
- cmd_import_lastpass: document the coupling between the
  ImportWarning message strings and the CLI summary's "skipped"
  filter — partial-import warnings (TOTP/URL) must not contain
  the word "skipped".

Comment-only; no behavior change. Catches I1 and M5 from the
final code review without taking on the cross-cut WarningKind
enum refactor (deferred to a follow-up if it ever ships).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-30 18:55:46 -04:00
parent 1562a2be47
commit cf3960186c
2 changed files with 7 additions and 0 deletions

View File

@@ -1618,6 +1618,11 @@ fn cmd_import_lastpass(csv_path: PathBuf) -> Result<()> {
for w in &warnings {
print_warning(w);
}
// Counts only true skips, not partial imports. Coupled by convention to
// the parser's warning message strings: skip messages end in "— skipped",
// partial-import messages say "imported without TOTP" / "imported without URL".
// If a future warning uses the word "skipped" in any other sense, this filter
// will need to switch to an enum tag (see ImportWarning::message).
eprintln!(
"Imported {}, skipped {} (see warnings above)",
total,