Repository navigation
D94 — shell: a settings file refused says which setting and what to do, in the user's language - #813
Merged
Merged
Conversation
…ice guide Each sentence's comment (Shows, When, At most, Placeholders), the same placeholders in French and in English and those its comment names, no straight apostrophe, a list's label at 18 characters and any sentence at its comment's limit, none of the lexicon's refused words. What each rule finds today is counted in STILL_WRONG: the rewrite, one pull request an area, lowers it, and a sentence that breaks a rule raises it, which fails. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/words_still_wrong.txt lists, sorted, each sentence that still breaks a rule: a sentence not listed fails, one listed and put right fails until removed, so a sentence put right never covers another written wrong. The comments alone stay counted, 604 keys being three review budgets. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader cannot place a helper's sentences, such as french_days', in either language: they escaped the lexicon. They are now held to both; none of today's is refused (the verifier's mutant, french_days saying « fournisseur », now fails). Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o, in the user's language settings::read gives each refusal its kind beside its sentence: a file that cannot be opened, a line that is no setting or a value not of its kind, a path that is not whole, keep_audio out of its range — with the line and, when it is one of Kitokey's own, the key. words::refused says it in French and in English; the notification at a start, the sentence under a refused command and the one on Settings end with it. The sentence of settings.rs goes to the log (shell.settings_unread at a start, shell.command_failed under a command) and behind developer mode, never to the user (#783). Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window's block that starts on a settings file broken by hand is K; the manifest names its scenarios by the e2e's letters. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A field's comment covers every place of its array: its placeholders are
read against all of them, not against each place, which refused
agree_context's « {} » found only in its second sentence. Each place is
still compared in both languages.
Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader counted Language::of's "fr" and cfg!'s "linux" as sentences waiting for their comment: literals after eq_ignore_ascii_case and target_os are the code's, as an expect's are. WITHOUT_COMMENT: 602. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode's
The reader kept expect, eq_ignore_ascii_case or target_os as the word
before every literal up to the next identifier: a sentence after the
code's literal — cfg!(target_os = "linux") { "Can't open it" } — escaped
every rule (the verifier's probes). It is now forgotten after each
literal; the probes are tests of the reader. words.rs had no such
sentence: WITHOUT_COMMENT and the list do not move.
Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With #812 merged in: words::refused's comment is inside its body, where a comment covers what follows it; trouble() and failure() carry a comment after their settings' arms, so that it covers the arms it says. The folder and the model not whole are two refusals, each with its own gesture — a folder's whole path, a file's —, no longer one with a key; French says « chemin entier » as FolderNotWhole already does. WITHOUT_COMMENT: 582. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
#808 added general_title without the voice guide's comment; merged with main, every_sentence_carries_its_comment counted 603 for 602. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 of 13 tasks
Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pped » kept on the list still wrong (D94) Merged with main, #807's settings banners, « Annuler », and the stopped transcript and minutes had no comment (607 against 602), and window.minutes_stopped says « minutes », which the lexicon refuses. The comments are given; the sentence is listed by key, its rewording being criterion 3's. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, and a key in quotes is named (#783) marc's survivor at 5612d21: microphone_description taken out of KEYS left every test green, nothing tying KEYS to Written. A unit test now lists Written's fields in an exhaustive pattern — a field added or taken out fails to compile — and compares their names with KEYS. A key written in quotes ("after" or 'after'), as TOML allows, is now named as the bare one. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WITHOUT_COMMENT 582 -> 580: main (#817) leaves two fewer sentences without the guide's comment, and the test asks to lower it. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#812 merged squashed: tests/words.rs's only conflict is WITHOUT_COMMENT, main's 602 (#812 alone) against this branch's 580 (#813's comments and #817's two); 580 kept, the test's own count at this merge. Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WITHOUT_COMMENT: main's 597 kept, the baseline #861 made one-way; this branch's count is 577, said by the test as « can be lowered to 577 ». Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: 92ded11e-58ef-492d-ba56-c820b9011de8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kitokey-marc Bot
added a commit
that referenced
this pull request
Nov 15, 2026
…meeting-is-made main.rs: a settings file refused, the minutes not started — #813's refusal (`why.detail` to the line kept for the log, `why.refused` said) told by #824's path, naming the meeting where Kitokey is not in front. tests/words.rs: both sides' tests kept. Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D94 — shell: a settings file refused says which setting and what to do, in the user's language
Closes #783
Module
modules/shell.Deliverable
Deliverable: D94, acceptance criterion 4 — « Given a settings file the shell cannot read, when it says so, then the notification and the window say in the user's language which setting is wrong and what to do, with no sentence of
settings.rsin them — the technical detail in the log and behind « Développeur » only (#783); held by a test for each refusalsettings.rsmakes, in both languages, and by the e2e ».Beside #792, open (lina, the « settings unreadable » banner): it says above every page but Settings that the file cannot be read, and links to Settings. This pull request does not touch the banner: Settings is where it leads, and Settings now says which setting and what to do. The two do not overlap, and merge in either order (no shared line: #792 adds two
Windowfields and a banner; this changesFailure,Troubleandsettings::read).What it changes
Before, the notification at a start said
Kitokey runs with its defaults until the file is corrected: <settings.rs's sentence>— English and technical in a French notification (« line 4: keep_audio is "always" or a number of days »). The window's sentences said the file cannot be read, never which setting.flowchart LR F["settings.toml<br/>broken by hand"]:::file --> R["settings::read"]:::shell R -->|"Refused: which, which line"| W["words::refused<br/>FR · EN"]:::here R -->|"its sentence, by the file's name"| L["the log<br/>and « Développeur »"]:::wait W --> N["notification at a start"]:::user W --> P["under a refused command,<br/>and on Settings"]:::user classDef file fill:#374151,color:#fff classDef shell fill:#5b21b6,color:#fff classDef here fill:#065f46,color:#fff classDef wait fill:#92400e,color:#fff classDef user fill:#1e3a8a,color:#fffLegend — grey: the file · violet: the shell's reader · green: the sentence the user reads · amber: where the technical sentence goes · blue: where the user reads it.
settings::readsays what it refuses (Refused, beside today's sentence inUnread { refused, detail }), one variant for each refusal it makes:Unopened: the file is there and cannot be opened;Unparsed { line, key }: a line that is not a setting, or a value not of its kind. The key is named only when it is one of the file's own (KEYS), never what the user typed in its place;SessionsNotWhole { line }andModelNotWhole { line }: the folder or the model not a whole path. Two refusals, each with its own gesture — a folder's whole path, a file's — rather than one with a key: each reads on its own, and French says « chemin entier » asFolderNotWholealready does;KeepAudio { line }: neither "always" nor 1 to 36,500 days.The sentence
settings.rswrote stays as it was, word for word: it isdetail.words::refusedsays each one in French and in English, by the voice guide's error template (D94 — shell: the voice guide, and a notification's title held at 50 characters #811): which line, which setting, the gesture. E.g. « Ligne 4 : « keep_audio » vaut « always » ou un nombre de jours, de 1 à 36 500. Corrigez-le. » / "Line 4: “keep_audio” is “always” or a number of days, from 1 to 36,500. Correct it."Trouble::Settings(Refused));Failure::SettingsUnread(Refused)): « …le fichier des réglages ne peut pas être lu. » then the refusal; its « corrigez-le, puis réessayez » is now the refusal's own gesture;Failure::SettingsLocked(Refused)): today's sentence, then the refusal.shell.command_failed, itsfailurefield now naming the refusal, e.g.SettingsUnread(KeepAudio { line: 1 })), and at a start in a newshell.settings_unreadwarning, declared in the manifest'sevidence.provokedunder the window's K, the block that starts once on a broken file. In developer mode it stays under the window's sentence, as before.e2e_window.pyare updated to the new ones; the raw text checks are unchanged.Stacked on #812 (base
shell/d94-words-rules, #812 merged in at 6d04754): its rules hold #783's new sentences too. Merging #813 into the comments' branch showed three clashes, fixed at 301716f:words::refused's comment was above the fn, where the reader does not look; the comments #813 put ontrouble()'s andfailure()'s settings arms also covered the arms after them (placeholders trouble comment 4), now each followed by a comment of its own; and the match onNotWhole { key: "model", .. }, gone with the split above.WITHOUT_COMMENT: 602 → 582, #783's sentences carrying theirs.Oracle
tests/words.rs, withwords::refuseda stub returning nothing:a_settings_file_refused_says_which_setting_and_what_to_do_in_both_languagesfailed (left: ""), and so did the updateda_settings_file_that_cannot_be_read_is_said_whole_…(the sentence ending after « corrigé. »);tests/settings.rs, with the key never named (a mutant ofread):a_file_refused_names_the_setting_and_its_linefailed,left: Unparsed { line: 2, key: None },right: … Some("developer").Kind of oracle: unit tests —
tests/settings.rs: each refusalreadmakes, 12 files and a folder in the file's place, its line and key;tests/words.rs: each refusal's sentence word for word in both languages, at the end of the notification, of the sentence under a command and of Settings', the raw text only in developer mode; an exhaustive match onRefusedso that a refusal added fails to compile until it is named.tests/log.rs: the log keeps the sentence ofsettings.rsby the file's name. And the e2e (e2e_window.py), updated — not run by the author: the e2e is the coordinator's.Review budget
main(c7e344f, D94 — shell: the tests read every sentence of words.rs against the voice guide #812 merged): 506 (+447 −59). Code:settings.rs+143 −14 (of which +55 the unit test tyingKEYStoWritten's fields, marc's survivor at 5612d21),words.rs+84 −12,main.rs+20 −11,autostart.rs+1 −1,MANIFEST.yaml+5 (scenario K). Tests:tests/words.rs+100 −12,tests/settings.rs+77 −3,tests/log.rs+7 −3,e2e_window.py+10 −3.over-budget. Justification: one refusal type is carried from the reader to its three surfaces, with its sentences in two languages. More than half the lines are its tests, among them theKEYStest asked by its verifier.Contracts
Definition of Done
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings;e2e_window.pyparsedcargo test --locked: 44 test binaries passed;tests/migrate.rs23 passed, 1 failed on the author's sandbox (a_model_written_from_home_is_named_where_it_wentwrites under$HOME, read-only there; not touched here). The licence's release test was not run.Test sheet
Verifier: session 14f73956-90b9-46a3-9fcc-52dc45c43948
settings::readmakes — a file it cannot open, a line that is no setting, a value not of its kind,sessionsormodelnot whole,keep_audioout of range —, when it reads the file, then it says which, with its line and the key when it is one of Kitokey's own, and keeps its sentence for the loggit clone --shared, detached; the head holdsmain):cargo test --locked --test settings32 passed, the library'ssettings::tests1 passed; fmt, clippy clean. Hand mutants ofsrc/settings.rs, each alone (git diff --numstat), restored after each: K1 a key taken out ofKEYS(1 2) → no longer compiles,[&str; 24]against[&str; 25]; K2 a key misspelt, the count kept (1 1) →the_keys_a_refusal_names_are_the_files_fields; K3 quotes no longer trimmed (1 1) →a_file_refused_names_the_setting_and_its_line. At 5612d21, K1 survived — no test heldKEYStoWritten's fields; c357426's test closes it. Probed, on the safe side: a value over several lines is said at the line the parser stops on, with no key (see remarks). Re-run at 0dd8193 (sam's merge ofmainwith #865;src/settings.rsandtests/settings.rsunchanged since c357426): settings 32,settings::tests1 passed; K1 no longer compiles, K2 and K3 fail, as above.settings.rs— that one only under it in developer modecargo test --locked --test words56 passed. Hand mutants ofsrc/words.rs, each alone (1 1), all killed bya_settings_file_refused_says_which_setting_and_what_to_do_in_both_languagesand one more: W1 the Frenchkeep_audiolimit written otherwise (36 500); W2 the English « cannot be read » without the setting's sentence; W3 the key said otherwise than the file writes it (upper-cased). Re-run at 0dd8193 (src/words.rsmoved bymainonly): words 56 passed; W1, W2, W3 each killed again.settings.rs's sentence by the file's name, declaredteam/evidence-813/e2e.txt, read). Its checks of #813: « a settings file that cannot be read is said so, which setting and what to do, and nothing can be changed », « developer mode off, a settings file that cannot be read is said in a sentence, no raw text », « the shell refuses a change while the file cannot be read », all ok; andlogs_readok,shell.settings_unreaddeclared under K and read. At 0dd8193: the coordinator's full shell e2e, 1823 ok, 0 FAIL, « e2e: passed »; the same three checks of #813 ok, andlogs_readok (team/evidence-813/e2e.txt, read).Verifier's remarks: read at c357426; S3 is the coordinator's attest's e2e, the units mine.
KEYSnamed no test-held list of the file's fields, so a setting added later would have been refused unnamed. c357426 holds it by an exhaustive pattern overWritten, and names a key in quotes.bar_at = [\n 1,\n "x",\n]) is said at the line the parser stops on, with no key — never a wrong one.Ground: a
git clone --shareddetached at c357426 inmodules/shell/target/verify-813, removed at the end.Summary
DONE
settings::readsays which refusal, its line and its key, beside its sentence.words::refusedsays each one in French and in English; the notification, the window's sentence under a refused command and Settings' end with it.settings.rs's sentence goes to the log (a newshell.settings_unreadat a start, declared) and behind developer mode only.VERIFIED
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings: clean.cargo test --locked --no-fail-fast: as above.ASSUMED
.textturns U+00A0 into a space, and the checks expect that; the narrow one is assumed kept.NOT VERIFIED
RISKS
Failure's log field now names the refusal (SettingsUnread(KeepAudio { line: 1 })): a line number and a key of Kitokey's, no path, no word of the user's.Unparsedfor a value spread over several lines names the line its error points to, which may be the value's and not the key's: the key is then not named, only the line.🤖 Generated with Claude Code