Commit Graph
14 Commits
Author SHA1 Message Date
aiongg 3f44be022e Settings: the legacy file parser has a named type (clippy type_complexity) 2026-11-16 01:39:05 +00:00
aiongg 7fa10c107a craft-settings: reset and repair one value at a time, remove map entries the value drops, merge a missing section against its defaults 2026-11-15 15:21:21 +00:00
aiongg 300852385e top-w19: net change of 2 commits
- top-w19: written by an agent
- top-w19: review fixes (review-1)
2026-11-15 12:06:38 +00:00
aiongg d867ef2446 top-w30: net change of 1 commits
- top-w30: written by an agent
2026-11-15 12:06:38 +00:00
aiongg 0e216b6257 Contract stubs: decision pass 2026-11-14 16:07:24 +00:00
aiongg a17171af48 Lints: drop the workspace missing_docs lint and warn on it in the framework crates that document every public item 2026-11-14 00:15:29 +00:00
aiongg e59460135e Base crates on the framework: theme, behaviour, keymap, platform, window, settings, i18n, fonts 2026-11-12 14:09:48 +00:00
Dylan M. Taylor 269629ee8c Merge pull request #107 from euisuh/fix/settings-permission-test-portability
test(settings): respect effective filesystem permissions
2026-11-02 22:48:25 -05:00
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 08109be362 security: validate settings sections against the defaults alone
deserialize_sections tried each top-level key against a document holding every key accepted
before it, cloning and deserializing the growing document per key. A config.toml with many
unknown keys took quadratic time (20k keys: >2 minutes, now <1 s). Each key is now checked
against the defaults plus that key, and accepted keys are merged once.

CodeRabbit CWE-407, crates/settings/src/document.rs:47
2026-10-22 21:42:13 -04:00
midasmatterhorn 65df18d8db settings: a blanked config.toml is no longer adopted over the loaded document
A syntactically broken file keeps the loaded document and is moved aside,
but a blank file parses fine — so check_disk adopted the empty document
before its blankness test ran, and the next save wrote only the known
values: comments and unknown sections loaded at startup were deleted
silently, with no error and no backup (blank text is never written as a
backup either, so on a file's first save the content was unrecoverable).
The crate itself treats blank as untrustworthy for the backup
(recovery.rs: 'a blank or unparsable file must never replace the previous
backup') and the docs promise comments and unknown keys survive saves.

Blank text is now rejected up front, before it can replace the document.
Regression test: an_emptied_file_is_not_adopted_over_the_loaded_document
— fails today (comments and unknown sections missing after the second
save), passes with the early return; the existing backup test keeps
passing.
2026-10-15 17:49:50 +03:00
euisuhandOpenAI Codex 11cbf52ea7 test(settings): respect effective filesystem permissions
Probe effective write restrictions so privileged container runs do not
assert errors the OS cannot provide, while retaining unprivileged coverage.

Closes #46

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 16:03:59 +09:00
skylartaylor b55b21cdeb Apply permission policy review before first release 2026-10-13 04:33:01 +02:00
Alejandro Londono 6006abb757 feat(settings): add shared config storage for Craft apps
Add shared config.toml storage while keeping settings types, defaults and UI policy in each app.

Includes isolated in-memory operation, configurable portable paths, atomic saves with private backups, damaged-file preservation, schema migrations, and documented best-effort handling of external edits.

Validation: native macOS formatting, strict workspace clippy, 172 workspace tests and the craft-settings WASM check. Independent backup-permission and failed external-migration repros fail before the fixes and pass afterward.

Hosted CI: all seven UI and printing jobs pass across macOS, Linux, Windows and UI WASM.

Refs #12
2026-10-12 15:40:50 -06:00