Commit Graph
10 Commits
Author SHA1 Message Date
dotCooCoo 40cd57930a font-store: confine recovery cleanup and preserve valid receipts 2026-11-03 11:59:16 -08:00
dotCooCoo 1b3a3ed661 font-store: clarify the lock acquisition cleanup sweep limit 2026-11-03 09:31:01 -08:00
dotCooCoo 7b8566b25c font-store: bound removal cleanup and cover portable failure retries 2026-11-03 09:11:49 -08:00
dotCooCoo de727cb97e font-store: preserve Language packs when removal cannot commit 2026-11-03 08:12:39 -08:00
Martin BallandClaude Opus 5.5 762a06a4c6 CP4.1: craft-libs#486 review — listing Language packs never writes the record without the store lock (an install or removal repairs it); the font-store workflow pins actions/checkout to v7.0.1's commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2
2026-11-02 00:30:58 +00:00
Martin BallandClaude Opus 5.5 83c2e7bf8c CP4.1: review — record rebuilt atomically in place (and when missing), staging never deletes another process's folder, zstd frames capped, neutral index errors, plain index text, optional source
- read_installed copies an unreadable record to .bad and writes the rebuilt one atomically over it; a missing record with pack folders is rebuilt too; install reads the record before moving the pack in.
- Stage::new uses create_dir and takes the next name on AlreadyExists (PID namespaces in Flatpak/containers); stale folders are left to sweep_staging.
- At most 4096 zstd frames per archive, empty ones included.
- IndexError and the sha256 mismatch say "the index", not "the font index".
- licence, release, version and class lose control and Cf characters like name.
- PackEntry.source: Option<String>, an https URL or the index is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2
2026-11-01 19:22:52 +00:00
Martin BallandClaude Opus 5.5 d342a50635 CP4.1: review — packs hold only the contract's files and say which locale they are; every zstd frame is read; a corrupt record is rebuilt
- Every zstd frame is decoded; anything but tar padding after the archive is refused.
- pack.toml must name the index entry's locale; the files the index promises (spelling, hyphenation) must be in the archive.
- Allow-list: pack.toml, spelling.aff, spelling.dic, hyphenation.pat at the root, LICENCES/<[A-Za-z0-9._-]> without a leading or trailing dot; Windows device names (con, prn, aux, nul, com1-9, lpt1-9, any extension) refused in names and locales.
- Pack names lose control and bidi/format (Cf) characters before they are stored or listed.
- An unreadable language-packs.json is kept as .bad and rebuilt from the pack folders (each pack.toml); no pack drops out.
- A bad hand-made entry is Error::Index(IndexError::Invalid), not BadUrl; index parse errors are Index errors too.
- Dead file:// handling removed.
- language_pack_index_overridden() exposes the developer override; README says it bypasses the pin and works in release builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2
2026-11-01 18:38:59 +00:00
Martin BallandClaude Opus 5.5 630e42f42c CP4.1: font store item kind language-pack (pinned index, verified .tar.zst install, remove, list)
Additive: new src/language_packs.rs (+ tests); store.rs only widens a few helpers to pub(crate).
Developer override CRAFT_LANGUAGE_PACK_INDEX for local end-to-end testing (no index pin; archives
still verified).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2
2026-11-01 17:58:01 +00:00
aiongg 5120c0ce2d Font store and Font Manager: review fixes
- FontStore::remove_files only touches names the family's manifest entry
  lists and that are safe file names.
- A user source's folder carries a hash of its full ID, so sources whose
  IDs slug alike don't share a folder.
- The download dialog and the sidebar note name the family's own source,
  and the server for a source the user added.
- The face cache takes out only faces the last frame didn't draw.
- The catalog test lists missing translations instead of failing.
- ATTRIBUTION lists the three bundled craft-font-index files.
2026-10-25 19:41:46 +00:00
aiongg 06a4ec194a craft-font-catalog, craft-font-store and craft-font-manager: installed fonts, the font store and the Font Manager panel 2026-10-25 19:09:33 +00:00