fix(db): keep no folder holding ;, |, a backtick or ) in Journal lines (#478) #491

Merged
maximus merged 6 commits from issue-478-journal-folder-stops into main 2026-10-24 18:10:34 +00:00

6 commits

Author SHA1 Message Date
le king fu
f02169c556 docs(db): describe the second limit of withoutFolders as it remains (#478)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m53s
Blocking findings of the review of PR #491 (comment 27073):

- B1: the changelog entry now says that the migration repair line, which
  showed the full path of the database, names the file only (fixed in the
  previous commit).
- B2: ADR 0021 section 7 and docs/architecture.md no longer say that only
  the folder name, or its start, stays: the folders after it can stay too
  (`...\Smith, Jean\Notes,\x.db` gives `Smith, Jean-Notes,x.db`), and #478
  adds rare cases, measured by the review on 300,000 random lines.

Two precisions of the same review, in the same sentences: the suffix kept
after a comma or a colon followed by a blank (S2), and the backtick that
also reached the home folder (S3, ``C:\Users\O`Brien\x.db``).

Resolves #478

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:04:37 -04:00
le king fu
90a9a525cf fix(db): keep no folder in the migration repair line of the Journal (#478)
connectToProfile wrote the failure of repair_migrations with a raw
console.error. repair_migrations returns rusqlite's error unscrubbed, and
rusqlite appends the full path of a database it cannot open, so the line
carried every folder of that path, user name included, and could go with a
feedback report. It now goes through logError(withoutFolders(...)), like the
preparation line next to it.

Blocking finding B1 of the review of PR #491 (comment 27073); fixing it in
the stack is Max's decision of 2026-10-24.

Resolves #478

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:02:03 -04:00
le king fu
66d9aadd4a docs(changelog): drop the « as for any other folder » claim (#478)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m10s
A folder name that holds a stop kept (a comma followed by a blank, as
in `Smith, Jean`) still stays in the line, as ADR 0021 says: the entry
now names only what changed, and says the dropped text ends at its
last separator. Found by the author's self-review.

Resolves #478

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:43:43 -04:00
le king fu
6d35362386 test(db): pin the next-path stop past a ) in a test of its own (#478)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m12s
The pin sat after three assertions of « ends a path at sentence
punctuation and at the next path »: a mutation of the next-path stop
failed the third one first, so the pin itself was never shown red.

Resolves #478

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:38:37 -04:00
le king fu
e9d471a292 docs(db): describe the stops and limits of withoutFolders after #478
ADR 0021, section 7, and the « Limites connues (#437) » bullet of
docs/architecture.md now list the stops that remain (a line break, a
double quote, a `,` or `:` followed by a blank, a blank followed by
another path) and the cost of the conservative rule (text after a path
that holds a separator goes with it: `/a/x.db; I/O` gives `O`).

The relative-path limit stays whole. The second limit, a folder name
that holds a stop, is reduced, not gone: `C:\Users\jean\Smith, Jean\x.db`
still gives `Smith, Jean-x.db`. Under Windows a folder name holds no
double quote, colon or line break and an account name no comma, so the
profile folder is only left with a blank followed by a path start
(`Jean ~`). The PATH_STOP comment says why the two stops are safe.

CHANGELOG: one Fixed / Corrigé line in both files.

Resolves #478

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:37:19 -04:00
le king fu
87754d2df2 fix(db): keep no folder holding ;, |, a backtick or ) in Journal lines (#478)
withoutFolders ended a path at a backtick, `;`, `|` or a `)` not followed
by a separator, so a folder name that holds one of them stayed in the
Journal line, or its start did: `C:\Users\Jean (Work) Smith\AppData\x.db`
gave `Jean (Work) x.db`, `C:\Users\jean\My;Docs\x.db` gave `My;Docs-x.db`.
An error line of the Journal can go with a feedback report.

PATH_STOP is reduced to a line break and a double quote, and the `)`
branch of lastSeparator is gone (option B, Max's decision of 2026-10-20).
A path now runs to its last separator before a line break, a double
quote, a `,` or `:` followed by a blank, or a blank followed by another
path. The conservative rule pays for it: `/a/x.db; I/O` gives `O` and
`(see /a/x.db) and I/O` gives `(see O`, pinned by the test « drops more
text rather than a folder ».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:30:01 -04:00