Skip to content

Logs: typed text shown in full in a development build's terminal - #1925

Merged
vmillet-dev merged 1 commit into
dev/1.3.3from
logs-sensitive
Dec 6, 2026
Merged

vmillet-dev merged 1 commit into
dev/1.3.3from
logs-sensitive

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Closes #1922.

What changes

  • engine::sensitive::Sensitive: the one way for what a person wrote into a log line. Display alone (no Debug): ‹27 chars› until revealed, « … » whole once revealed.
  • engine::sensitive::reveal() is called once, by the binary of a debug build, right after the log starts (logging::reveal_in_development). A release, the e2e flavour and every test leave it off: state::logged_tests (Logs: a test fails when typed text reaches a log line #1918) keeps guarding what a release writes, and journey 14 is untouched.
  • A debug build's file keeps no line before a warning (Build::kept_before: 0 in debug, 200 in a release): what its terminal shows never reaches the disk. A release keeps its 200 lines; the e2e flavour files every level as before.
  • The launch copy's line says Library copied: 2026-12-06_10-07-32, no longer the profile's path (which holds the person's home).
  • D35 changed first, then the wiki's logs page (table, « What a line may say », « The lines before a warning »), CLAUDE.md's security line and devnotes-security-review's checklist: a Sensitive never in a warn or an error.

Nothing uses Sensitive yet: the lines that do are #1923 (notes, folders, spaces) and #1924 (requests), stacked on this one.

Checks run

  • cargo fmt --all --check, cargo clippy -p engine -p app -p ui --all-targets --all-features -- -D warnings.
  • cargo test -p engine -p app: all pass, among them sensitive::tests (both branches, without touching the process's switch) and logging::tests (16), with a_debug_build_files_its_warnings_without_the_lines_before_them new; the tests of the lines before a warning and of the panic now run as a release.
  • cargo test -p ui --lib logged_tests.
  • node scripts/architecture-links.mjs, node --test "scripts/*.test.mjs" (81 pass).

Generated by Claude Code

What a person wrote goes into a line through engine::sensitive::Sensitive:
whole once a debug build's binary reveals it, its length everywhere else.
A debug build's file keeps no line before a warning, so what it shows stays
in the terminal. The launch copy's line names the copy, not its path. D35
changed first.

Closes #1922

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbVs5syDjY1sDvi7chZYW8
@vmillet-dev vmillet-dev added the refactor Restructuring without behaviour change label Dec 6, 2026 — with Claude
@vmillet-dev
vmillet-dev merged commit 135c95f into dev/1.3.3 Dec 6, 2026
11 checks passed
@vmillet-dev
vmillet-dev deleted the logs-sensitive branch December 6, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring without behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants