Commit Graph
1396 Commits
Author SHA1 Message Date
Dylan M. Taylor c64d9b28f4 Merge pull request #145 from midasmatterhorn/fix/r4-settings-blank-file
settings: a blanked config.toml is no longer adopted over the loaded document
2026-11-02 21:41:02 -05:00
Dylan M. Taylor 0c332d87de Merge pull request #460 from marshiyar/fix/update-package-manager-copies
update: a package manager's copy and another app's bundle do not self-update on macOS and Windows
2026-11-02 21:39:55 -05:00
Dylan M. Taylor 0035af1539 Merge pull request #392 from Tomcatt/fix/standalone-update-whole-tree
fix(update): a standalone self-update replaces the whole tarball install
2026-11-02 21:39:39 -05:00
Dylan M. Taylor e21dfdba5d Merge pull request #481 from VoiceLessQ/fix/flatpak-bundle-reinstall
fix(update): handle a bundle Flatpak before 1.16.2 won't reinstall
2026-11-02 21:34:54 -05:00
Dylan M. Taylor 40751df9ac Merge pull request #465 from Jeremy8776/fix/msi-context-native
craft-update: read an MSI's install context without starting PowerShell
2026-11-02 21:34:50 -05:00
Dylan M. Taylor b49ce8590f Merge pull request #452 from ZIDAN44/fix/391-safe-release-link
update: the prompt opens only a safe release link; document token logging (#391)
2026-11-02 21:33:30 -05:00
dotCooCoo 5b1f01d036 craft-doc: skip wrong-shaped members without buffering them
- A VectorCraft or PhotoCraft `generator`, and a VectorCraft `preview` or
  `pdf`, are read as they are parsed. A value of the wrong shape is
  skipped element by element with `IgnoredAny` and none of it is kept;
  before, serde's untagged enum buffered the whole value first, with no
  limit on that buffer. The preview and PDF still read as `File::read`
  reads them, the array form of `Image` included.
- A rendition after the JSON of a gzip file is counted against
  `max_total` once, as it is decompressed. A 40 KiB PDF with `max_total`
  at 64 KiB now reads compressed as it does uncompressed. A preview and
  PDF that name the same bytes are counted as two copies.
- A repeated VectorCraft `version` is malformed, not too new, and
  `renditions` refuses a missing or repeated `document`, as `File::read`
  does.
- The README says that a VectorCraft file written as a JSON array is not
  recognized by `sniff`.
2026-11-02 18:33:23 -08:00
Dylan M. Taylor 44260b9c50 docpath: resolve a non-Unicode document lexically, so its root and share hold on every platform
std::path sees no \??\ or \\.\ prefix and no //server/share boundary on Unix,
so the native root check let those document roots through. Resolve the link
against the lossy document path with the Unicode rules, and return the native
join only when it names the same components.
2026-11-02 21:32:45 -05:00
Dylan M. Taylor e4108a3172 Merge pull request #513 from ljkx/update/sums-duplicate-names
update: one asset per name in SHA256SUMS.txt (#478)
2026-11-02 21:30:55 -05:00
Dylan M. Taylor 92a8f0df9f Merge pull request #514 from ljkx/update/https-only-agents
update: keep the remote HTTP agents and their redirects on HTTPS (#477)
2026-11-02 21:30:51 -05:00
dotCooCoo 3f6f29693c Merge main into feat/doc-pcraft-pixels 2026-11-02 18:30:48 -08:00
dotCooCoo a5d321af47 craft-doc: find tiles by name once per call and decode each hash once
- pcraft_layer_rgba builds a name-to-entry map of the bundle once per
  call instead of walking the central directory for every tile.
- A tile that several references name is read, decoded and counted
  against max_total once per call. A hash referenced at two pixel sizes
  is malformed.
- Surfaces stored as RGB or grayscale are read in documents of every
  mode, so bitmap, duotone, indexed and multichannel documents read. A
  CMYK or Lab layer or mask gives Unsupported, and an RGB mask gives its
  first channel.
- A canvas of zero width or height is malformed.
- The docs name video layers, the masks of layers without pixels, and
  tile references counting against max_items.
- doc.yml runs the tests without features again, next to
  --all-features.
2026-11-02 18:30:41 -08:00
Dylan M. Taylor c953d6dc65 plate-test: assert the work directory stays owner-writable 2026-11-02 21:27:06 -05:00
dotCooCoo 86b48935cf Merge main into fix/craft-doc-review-points 2026-11-02 18:17:37 -08:00
Dylan M. Taylor 820d3ac315 font-catalog: list each fontconfig include folder once, within a budget
An <include> naming a folder listed, collected and sorted the folder's
entries before any budget applied, and again for every repetition, so a
configuration repeating one include made a single discovery call walk
the same folder thousands of times. Include folders are now checked
against the depth and file budgets first, listed at most once (by
canonical path), and all listings share a cap on entries.
2026-11-02 21:15:00 -05:00
Dylan M. Taylor dccbdc949d docpath: hold a non-Unicode document's root to the namespace rules
A relative link next to a document whose path is not Unicode was joined
to the document's folder natively, skipping the parsing that refuses
device and object-manager namespaces. On Windows a document path with an
unpaired surrogate under \\.\, \\?\GLOBALROOT or \??\ therefore let
the link resolve inside that namespace. The native join now refuses those
roots as resolve does for a Unicode path; drives and shares are kept.
2026-11-02 21:10:35 -05:00
Dylan M. Taylor ce37850488 cms: find a sampled inverse curve's flat ends once per pipeline
Inverting a sampled curve scanned the whole table for its flat start and
end runs whenever the value fell at or beyond an end. A constant table
falls there for every input, so each pixel the exact pipeline evaluated
read the whole curve again. inverse64_many already cached the ends for
output tables; a Pipeline now caches them for every inverse-curve stage,
recomputed on extend and optimize.
2026-11-02 21:09:04 -05:00
Dylan M. Taylor 894340e098 fonts-build: check licence and embedded_elsewhere symlinks against the checkout, refuse symlinks in the served directory 2026-11-02 20:40:37 -05:00
Dylan M. Taylor b96da36713 plate-test: separate plates in a private random temporary directory
The Ghostscript work directory had a predictable name under the shared
temporary directory, and a failed removal of an existing one was ignored.
Another local user could create it first with an in.pdf symlink, and
writing the input would follow it. The directory is now created with
tempfile (random name, owner-only permissions, fails if it exists), and
in.pdf is created with create_new.
2026-11-02 20:39:35 -05:00
Dylan M. Taylor 9d2d4f1cd9 fonts-build: test that duplicate cmap records don't use up the subtable cap 2026-11-02 20:31:13 -05:00
Dylan M. Taylor c2f94a6aa2 fonts-build: read each shared cmap subtable once
A cmap can list 65535 encoding records that all name the same subtable,
and Cmap::ranges expanded that subtable's spans once per record before
merging them. Records naming a subtable already read are now skipped,
and at most 16 distinct Unicode subtables are read from one face.
2026-11-02 20:11:11 -05:00
Dylan M. Taylor 62df3ef5cb fonts-build: keep manifest font and licence paths inside the checkout
A manifest file or licence_file that is absolute, climbs out with .., or
resolves through a symlink to a file outside the checkout is now an
Error::OutsideCheckout instead of being embedded with include_bytes! or
copied (and written) outside the directory given to Embed::serve.
2026-11-02 19:58:30 -05:00
Martin BallandClaude Opus 5.5 22144c823a proof: licence warnings report the actual error; machine-independent English test; SuggestSteps drop note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:47:39 +00:00
Martin BallandClaude Opus 5.5 3012d73c82 proof: AffixDict::build reads the stems' flags in its own function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:47:28 +00:00
Martin BallandClaude Opus 5.5 f87f08a87a Merge origin/main into fix/497-coderabbit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:46:59 +00:00
Dylan M. Taylor b047c2f7a6 Merge pull request #496 from benandez/fu-proof-p3
craft-proof: review follow-ups (P3s from the proofing move)
2026-11-02 19:32:53 -05:00
ljkx e6189423a0 update: test Http::new's HTTPS-only setting, and keep refused links out of messages
An integration test builds the library without cfg(test), so it checks the release configuration: the remote agents refuse plain HTTP (an upper-case scheme too) without connecting, loopback links still work, and with local-mirror the remote agents take plain HTTP.

A refused hop's message names only the host. ureq's message holds the whole link, and a redirect to the file host carries a signed query. host() also drops a query and any user:password@.
2026-11-03 01:13:37 +01:00
Martin BallandClaude Opus 5.5 14cf444fcf craft-proof scowl — load_error(en-AU) also reports a failed en-GB list, which en-AU reads too (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:56:09 +00:00
Martin BallandClaude Opus 5.5 3aca2642c5 craft-proof tr — the double-space rule uses space_runs; the all-languages test adds Tr, EnAu, EnCa and pt-PT (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:56:09 +00:00
Martin BallandClaude Opus 5.5 aa3730352f craft-proof — en-AU comment and docs: it also takes en-GB's words (enquiry is only in the en-GB list), suggestions from en-AU (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:56:09 +00:00
Martin BallandClaude Opus 5.5 3e37fbcd7e craft-proof it, pt — an object placeholder between the mark and a real closing quote keeps the narration exemption («Vai?\u{1}» disse lui.) (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:56:09 +00:00
Martin BallandClaude Opus 5.5 4c8cb404ab craft-proof it — a space after the dialogue dash no longer hides the capital mark (Finì. — domani partiamo.) (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:48:04 +00:00
Martin BallandClaude Opus 5.5 f3d411638d craft-proof it — the dialogue-dash exception applies after ? and ! only, so Finì. —domani partiamo. gets its capital mark again (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:47:08 +00:00
Martin BallandClaude Opus 5.5 a8b3bb74c8 craft-proof it, pt — the object placeholder is not a closing quote, so Chi era?\u{1} era Marco. still gets its capital mark (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:23:15 +00:00
Martin BallandClaude Opus 5.5 cb82e91428 craft-proof — a run of spaces is one double-space issue over the whole run in every language, through one shared space_runs helper (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:23:15 +00:00
Martin BallandClaude Opus 5.5 7b64b78cb0 craft-proof english — Australian English also takes a word in SCOWL's en-GB list, and without SCOWL every en_AU source is read before any en_GB one (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:23:09 +00:00
dotCooCoo 3798d807de craft-doc: PhotoCraft layer pixels and masks behind the pcraft-pixels feature
pcraft_layer_rgba(bytes, layer, &Limits) decodes one layer of a .pcraft
bundle over the canvas: a raster layer's surface, or the rendered copy
saved with a text, shape or smart object layer, as RGBA at the layer's
8, 16 or 32-bit sample type, with the layer mask as its own plane.
Grayscale repeats the gray value, missing tiles hold the default pixel,
and tiles outside the canvas are not read. Other color modes give
Unsupported; groups, adjustment and fill layers give None.

Tiles are read with craft-pcraft-format's TileRef and tile paths,
decoded with ruzstd and checked against their BLAKE3 hash, as PhotoCraft
reads them. The decoded layer and mask count against max_entry and
max_total before they are allocated; a frame is decoded only up to its
tile's size, and a frame larger than the tile plus an eighth and 4 KiB,
or one that declares a window over 8 MiB, is refused.

The feature adds ruzstd and blake3, both pure Rust. The doc workflow
runs clippy and the tests with --all-features.

Part of #59.
2026-11-02 14:58:06 -08:00
ljkx 240a005494 update: look SHA256SUMS.txt names up in a map, not by scanning
A 4 MiB list holds some 60,000 names, and searching the earlier entries
for each one made parsing quadratic: about 8 s for a full-size list in
a release build. A map from name to position and a set of conflicting
names make it linear again, with the same entries in the same order.
2026-11-02 23:56:02 +01:00
dotCooCoo decd8b4794 craft-doc: read envelopes as the format crates and apps do
- renditions checks where the last VectorCraft member after the JSON
  ends against max_total before it inflates anything past the marker,
  and keeps only the members' bytes, not the data before them.
- A ZIP archive whose manifest.json has no format_version gives
  Unrecognized instead of Malformed.
- A PhotoCraft manifest that is a JSON array is refused, as
  read_manifest refuses it.
- renditions and outline refuse a PhotoCraft manifest nested past
  PhotoCraft's limit (manifest_depth(MAX_GROUP_DEPTH), 367 levels).
- The TooNew check reads only the format's own version member, so a
  newer file that also has another format's member is TooNew, not
  Malformed.
- A generator that is not a string reads as None. A repeated VectorCraft
  generator, preview or pdf reads as its last value, as File::read
  reads it.
- The VectorCraft marker must follow the JSON's closing }, ] or ",
  through craft_vectorcraft_format::marker_at.
- sniff reads the names in a whole archive's central directory, which
  info reads too; a head too short to reach it still uses the local
  headers.
2026-11-02 14:19:39 -08:00
vangel76andClaude Sonnet 5.5 ee76ffe8d8 bitstream: decode short Exp-Golomb codes with one peek, write ue(v) in one call (#517)
read_code_num read the leading zeros one read_bit() at a time. It now takes
peek(32) and, when the code has fewer than 16 leading zeros and lies wholly
inside the data, decodes it from that one word. Longer codes, codes cut off
by the end of the data and invalid codes take the previous bit-by-bit loop,
moved to a cold function, so errors and the position after an error are
unchanged.

write_code_num wrote the zero prefix as up to 32 one-bit writes. A code of
up to 32 bits is now one write_bits call; longer codes write the zero prefix
in one call.

Tests compare read_ue, read_se (several codes in a row, every start
position, zero runs of 28 to 40 bits, buffers of 0 to 16 bytes) and write_ue
with verbatim copies of the previous code, plus the 31/32/33-bit code
boundaries and u32::MAX.

Closes #517

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:02:49 +01:00
Martin BallandClaude Opus 5.5 5eb1710914 proof: a pack's exception word satisfies the ru/bg/tr letter check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:59:48 +00:00
vangel76andClaude Sonnet 5.5 62eae4e4cc bitstream: copy runs in unescape_rbsp instead of pushing byte by byte (#518)
unescape_rbsp pushed every byte into the output Vec one at a time. It now
scans for 00 00 03 with the usual skip rule (a nonzero byte at i rules out
a match ending at i + 1 or i + 2, so the scan advances by 3) and copies the
bytes between matches with extend_from_slice. No unsafe, no indexing that
can panic.

Output is identical: a removed 03 still restarts the zero count. Tests
compare it with a verbatim copy of the old function over 20000 random
buffers (fixed-seed PRNG) and list the edge cases (empty input, 00 00 03 at
the end, 00 00 03 03, runs of zeros).

Closes #518

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:59:23 +01:00
Martin BallandClaude Opus 5.5 54ac5fbc4c craft-proof — README: embedded_locales() and the SCOWL byte count match build.rs with en-AU; ru: drop an unused binding (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 466919a8a5 craft-proof english — with SCOWL embedded, a dictionaries-folder en_GB no longer outranks the embedded en-AU (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 d2563a77d4 craft-proof tr — te and ta are the locative suffix, not a detached particle, so kitapte is not offered as kitap te (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 bd3db196a5 craft-proof es — a run of spaces is one Espacio doble issue over the whole run (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 15d3c0d370 craft-proof it, pt — narration after a quoted or dashed question or exclamation is not a new sentence («Vai?» disse lui) (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 61030150dc craft-proof cs, hr, it — a hyphenated word is looked up whole before its parts, and an elision (l'ex-amico) is read in each part (#496 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:56:44 +00:00
Martin BallandClaude Opus 5.5 6e0351f554 proof: ru is not an embedded locale by default (only ru-extra.txt is)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:46:08 +00:00
Martin BallandClaude Opus 5.5 61105d293a proof: no comma mark after ister or gerek (verb and noun uses)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:46:00 +00:00