ATT-21 at-terminal.log of fixed words; no crash dialog #7

Merged
merge-queue merged 1 commit from ATT-21-log into main 2026-11-18 14:19:57 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/ATT-21 (part of https://openproject.home.romaine.life/wp/ATT-19)

at-terminal keeps a log of fixed words (AT-TERMINAL.md's "It keeps a log"), and a crash no longer pops a dialog.

What changes

  • rioterm atlog.rs: at-terminal.log in the config directory. Lines: start version V, program NAME (or program default shell), program ended with status N / without a status, exit, crash at FILE line N, and previous run ended without saying how when the last run's last line wasn't an exit or a crash (a kill leaves no line of its own). Each line is a UTC timestamp and fixed words; a program name is cut to its file stem in letters, digits and ._- (64 at most), so nothing from or to the terminal, and no arguments, reach it. Past 1 MiB a start keeps the newer half.
  • main.rs starts it with the version and the configured program; Application::exiting writes exit; RioEvent::ChildExited (already sent, never handled) writes how the program ended; a panic hook writes the crash location and then runs the default hook (stderr).
  • Removed panic.rs: on Windows every panic showed a MessageBoxW dialog. Nothing of at-terminal's pops up a window; the crash is in the log instead.

Tests (atlog): every line any path writes holds only fixed words and cut-down names (an escape-laden program string included); a run that ended without saying how is noted at the next start, an exit or a crash isn't; a long log keeps its newer half; UTC timestamps (epoch, a leap day, today).

Not in this PR: wiring the log into home-sync's appLogs for log-search (that's the home profile's machine/state.json, once at-terminal-rio is installed by home-sync, ATT-23). The path is Rio's config directory until at-terminal's own identity lands with packaging.

Checked on upstairspc (Windows): fmt, clippy -D warnings, the workspace tests. nelsonpc builds nothing. CI covers Linux.

Work package: https://openproject.home.romaine.life/wp/ATT-21 (part of https://openproject.home.romaine.life/wp/ATT-19) at-terminal keeps a log of fixed words (AT-TERMINAL.md's "It keeps a log"), and a crash no longer pops a dialog. **What changes** - `rioterm` `atlog.rs`: `at-terminal.log` in the config directory. Lines: `start version V`, `program NAME` (or `program default shell`), `program ended with status N` / `without a status`, `exit`, `crash at FILE line N`, and `previous run ended without saying how` when the last run's last line wasn't an exit or a crash (a kill leaves no line of its own). Each line is a UTC timestamp and fixed words; a program name is cut to its file stem in letters, digits and `._-` (64 at most), so nothing from or to the terminal, and no arguments, reach it. Past 1 MiB a start keeps the newer half. - `main.rs` starts it with the version and the configured program; `Application::exiting` writes `exit`; `RioEvent::ChildExited` (already sent, never handled) writes how the program ended; a panic hook writes the crash location and then runs the default hook (stderr). - Removed `panic.rs`: on Windows every panic showed a `MessageBoxW` dialog. Nothing of at-terminal's pops up a window; the crash is in the log instead. **Tests** (`atlog`): every line any path writes holds only fixed words and cut-down names (an escape-laden program string included); a run that ended without saying how is noted at the next start, an exit or a crash isn't; a long log keeps its newer half; UTC timestamps (epoch, a leap day, today). **Not in this PR**: wiring the log into home-sync's `appLogs` for `log-search` (that's the home profile's `machine/state.json`, once at-terminal-rio is installed by home-sync, ATT-23). The path is Rio's config directory until at-terminal's own identity lands with packaging. **Checked** on upstairspc (Windows): fmt, clippy `-D warnings`, the workspace tests. nelsonpc builds nothing. CI covers Linux.
ATT-21 at-terminal.log: start, exit, the program and how it ended, crashes; no crash dialog
Some checks failed
Suite default / scope (pull_request) Successful in 11s
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite rust / scope (pull_request) Successful in 12s
Suite rust / check-services (pull_request) Has been skipped
Suite rust / check-typos (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite rust / check-machete (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 9s
Suite rust / check-format (pull_request) Successful in 16s
Suite rust / check-test-linux (pull_request) Successful in 2m18s
merge-queue conflicts with main
Suite rust / check-test-windows (pull_request) Successful in 6m25s
Suite rust / reused-checks (pull_request) Successful in 5s
f4f60fbcb5
First-time contributor

merge-queue stopped this at f4f60fb: conflicts with main. Push a fix, or once it is fixed outside this pull request, remove and re-add the queue label.

merge-queue stopped this at f4f60fb: conflicts with main. Push a fix, or once it is fixed outside this pull request, remove and re-add the `queue` label.
nelson force-pushed ATT-21-log from f4f60fbcb5
Some checks failed
Suite default / scope (pull_request) Successful in 11s
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite rust / scope (pull_request) Successful in 12s
Suite rust / check-services (pull_request) Has been skipped
Suite rust / check-typos (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite rust / check-machete (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 9s
Suite rust / check-format (pull_request) Successful in 16s
Suite rust / check-test-linux (pull_request) Successful in 2m18s
merge-queue conflicts with main
Suite rust / check-test-windows (pull_request) Successful in 6m25s
Suite rust / reused-checks (pull_request) Successful in 5s
to 558f4a8eaf
All checks were successful
merge-queue landed on main
Suite default / scope (pull_request) Successful in 9s
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite rust / scope (pull_request) Successful in 9s
Suite rust / check-services (pull_request) Has been skipped
Suite rust / check-typos (pull_request) Has been skipped
Suite rust / check-machete (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 7s
Suite rust / check-format (pull_request) Successful in 14s
Suite rust / check-test-linux (pull_request) Successful in 1m37s
Suite rust / check-test-windows (pull_request) Successful in 3m12s
Suite rust / reused-checks (pull_request) Successful in 4s
2026-11-18 14:16:23 -08:00
Compare
merge-queue deleted branch ATT-21-log 2026-11-18 14:19:57 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/at-terminal!7
No description provided.