Repository navigation
Logs: a test fails when typed text reaches a log line - #1918
Merged
Merged
Conversation
vmillet-dev
force-pushed
the
app-name-docs
branch
from
December 5, 2026 12:00
1c35efa to
55421e5
Compare
state::logged_tests drives a session through the actions a person sends,
on the real core, with a sentinel in every text typed: the gate's
phrases, a space, a folder, four kinds of note, a field's value, an
attachment's name, a search, a tag, a request's URL, header, body,
variable, script and environment, a tool's input, another library and
back. Every line of the workspace's crates is heard at trace; a line
holding a sentinel fails the test, which names it.
The drawings' listing logged an AppError with {:?}, its detail included:
it goes through for_log now. The wiki's logs page and the security
review's checklist name the test as the rule's guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3
vmillet-dev
force-pushed
the
logs-sentinel
branch
from
December 5, 2026 12:17
0157025 to
84bf260
Compare
This was referenced Dec 6, 2026
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.
Closes #1846, last of the milestone.
What changes
state::logged_tests::nothing_typed_reaches_a_line_logged_over_a_session(crates/ui): a session on the real core, every line of our crates heard attrace. Each text typed holds a sentinel (zq7x-…, lower case as a tag is kept):{{field}}, tag), its field's value (kept, then filled on copy), an attachment's file name; a Note, a list's item, a Calcul line (evaluated);afterscript'sconsole.log, an environment and its value;A line holding a sentinel fails the test, which lists each such line with its level and target. The test also checks the session reached each area: the actions and the calls it expects are in the log.
testing::listenhears every crate of the workspace (platform,text,richtext,drawing,i18n,brandbesideuiandengine).What it found: nothing on the session's path. Reading the log lines on the way found one
{error:?}of anAppError(apply_notes.rs, « The drawings were not listed »): a derivedDebugprints the detail, which reaches the log only throughfor_log. Fixed. The fixed line is held bystate::refused_tests::drawings_that_cannot_be_listed_are_logged_by_their_code(a Note open, the library closed under it): Sonar counted it uncovered.The wiki's logs page names the test as the rule's guard;
devnotes-security-review's checklist asks for a step in it for a new place where a person types.Where it is, and why not in
crates/appThe ticket placed it in
crates/app, which sees the logger. But a session can only be driven there through the whole window, from outsideui, whose state and actions are private to it. Inui, the test applies the same actions the window sends, on the same core, through the sameBackend, and hears every line before any formatting. The application's logger only adds the time, the level, the thread and the target, and its file (the ring of #1845) keeps lines already logged: a sentinel absent from the lines is absent from the terminal and from the file. The panic hook's report, place and thread only, is held bylogging::tests::a_panic_is_reported_by_its_place_and_never_by_its_message.The
afterscript cannot run inui's tests (the host is the application relaunched, which a test binary is not): the send goes, the script fails, and that failure's line is checked like the others.Red on a line that logs a payload
Once, not kept:
Action::logwriting"#{number} {name} {self:?}". The test fails:Checks run
cargo test -p ui --lib drawings_that_cannot_be_listed(Windows),cargo clippy -p ui --all-targets --all-features -- -D warnings,cargo fmt --all --checkafter the coverage test.cargo test -p ui --lib: 1 581 passed, 4 ignored (the new test included;testing::listennow hears every crate of ours, and every other test still passes).cargo clippy -p ui --all-targets --all-features -- -D warnings,cargo fmt --all --check,node scripts/architecture-links.mjs.Action::logrestored.Generated by Claude Code