The Loader's diag log and spirelens-db's --log write the estate's log line (AHT-204) #398

Merged
merge-queue merged 5 commits from aht-204-logline into main 2026-11-26 14:30:54 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/AHT-204 (one logging standard across at-home)

spirelens' two log writers now write the estate's standard log line.

What changes

  • Loader diag log (Loader/LoaderMain.cs): %TEMP%\spirelens-loader-diag.log stays where it was, under the standard's "unless it already has a place" rule, so its appLogs entry is unchanged. Before, each of the 26 D() calls appended {UtcNow:o} free text with no rotation. Now each one is a RomaineLife.Logline line with fixed wording and fields, for example info core load found loader path=..., info core initialized load=3, and error core assembly load threw type=... error=.... Exception text is masked with LogLine.Redact. The file is opened and closed per line, so it still survives a hard crash, and it moves to .old past 1 MiB.
  • Packaging (C#): the estate has no NuGet feed, so SpireLens.csproj's FetchLogline target fetches romaine-life/logline at v0.1.4's commit (LoglineCommit) with git into obj/logline/<commit>/ and compiles dotnet/Logline/*.cs into the Loader only. SpireLens.dll stays one assembly. Core.dll, the hot-reloaded assembly, is untouched. The fetch pins a commit, not an archive hash, as the C build does. No take-up PR moves this pin; a newer logline means moving it here.
  • spirelens-db --log (cmd/spirelens-db): before, --log redirected stdout and stderr into the file, overwrote it on every run, and timed only the first line. Now it appends standard lines through github.com/romaine-life/logline v0.1.4: ingest started, one source ingested source=... seen= ingested= unchanged= failed= notes= line per source, ingest summary runs= warnings= took=, the backup's backup ok|partial|unreachable|... line with its counts, and finally ingest finished or ingest failed error=.... Warnings and error text are masked. --quiet still leaves warnings out. The console keeps its human report.
  • Core's importer passes spirelens-db.log instead of last-ingest.log, since the file now keeps every run. docs/run-database.md is updated to match.
  • The go.mod go line moves to 1.26.1, which logline v0.1.4 requires.

Goes with

  • shell-config-profile-home appLogs: spirelens-db now ships spirelens-db.log.

Tests: ci-check passed (dotnet format and tests, go vet and tests). The Loader isn't in SpireLens.sln, so I also built SpireLens.csproj locally (Release, SkipModsDeploy=true; logline fetched and compiled in), and this PR's release build builds it again. A scratch run of spirelens-db ingest and backup with --log wrote the expected standard lines. The game wasn't run.

The design was reviewed with tmux-strip review, which answered Fits. Its two fixes are in: the fetch pins a commit rather than an archive hash, and there is no submodule.

🤖 Generated with Claude Code

Work package: https://openproject.home.romaine.life/wp/AHT-204 (one logging standard across at-home) spirelens' two log writers now write the estate's standard log line. ## What changes - **Loader diag log** (`Loader/LoaderMain.cs`): `%TEMP%\spirelens-loader-diag.log` stays where it was, under the standard's "unless it already has a place" rule, so its appLogs entry is unchanged. Before, each of the 26 `D()` calls appended `{UtcNow:o} free text` with no rotation. Now each one is a `RomaineLife.Logline` line with fixed wording and fields, for example `info core load found loader path=...`, `info core initialized load=3`, and `error core assembly load threw type=... error=...`. Exception text is masked with `LogLine.Redact`. The file is opened and closed per line, so it still survives a hard crash, and it moves to `.old` past 1 MiB. - **Packaging (C#):** the estate has no NuGet feed, so `SpireLens.csproj`'s `FetchLogline` target fetches romaine-life/logline at v0.1.4's commit (`LoglineCommit`) with git into `obj/logline/<commit>/` and compiles `dotnet/Logline/*.cs` into the Loader only. SpireLens.dll stays one assembly. Core.dll, the hot-reloaded assembly, is untouched. The fetch pins a commit, not an archive hash, as the C build does. No take-up PR moves this pin; a newer logline means moving it here. - **spirelens-db `--log`** (`cmd/spirelens-db`): before, `--log` redirected stdout and stderr into the file, overwrote it on every run, and timed only the first line. Now it appends standard lines through `github.com/romaine-life/logline` v0.1.4: `ingest started`, one `source ingested source=... seen= ingested= unchanged= failed= notes=` line per source, `ingest summary runs= warnings= took=`, the backup's `backup ok|partial|unreachable|...` line with its counts, and finally `ingest finished` or `ingest failed error=...`. Warnings and error text are masked. `--quiet` still leaves warnings out. The console keeps its human report. - Core's importer passes `spirelens-db.log` instead of `last-ingest.log`, since the file now keeps every run. `docs/run-database.md` is updated to match. - The go.mod `go` line moves to 1.26.1, which logline v0.1.4 requires. ## Goes with - shell-config-profile-home appLogs: `spirelens-db` now ships `spirelens-db.log`. Tests: `ci-check` passed (dotnet format and tests, go vet and tests). The Loader isn't in `SpireLens.sln`, so I also built `SpireLens.csproj` locally (Release, `SkipModsDeploy=true`; logline fetched and compiled in), and this PR's release build builds it again. A scratch run of `spirelens-db ingest` and `backup` with `--log` wrote the expected standard lines. The game wasn't run. The design was reviewed with `tmux-strip review`, which answered Fits. Its two fixes are in: the fetch pins a commit rather than an archive hash, and there is no submodule. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Loader's diag log (%TEMP%\spirelens-loader-diag.log, a UTC time and free
text per line, never rotated) is written with RomaineLife.Logline: fixed
messages, the varying parts as fields, exception text masked, moved to .old
past 1 MiB. logline's C# source is compiled into the Loader from
romaine-life/logline at v0.1.4's commit, which the csproj fetches with git
into obj/; Core is untouched and stays one DLL.

spirelens-db's --log no longer redirects stdout into an overwritten file with
one timed line: it appends standard lines (ingest started, a line per source,
the summary, the backup's outcome, finished or failed) through
github.com/romaine-life/logline, and the console keeps its report. Core passes
spirelens-db.log, since the file now keeps every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep packages.lock.json as main has it
All checks were successful
Suite release / deploy-image (push) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite dotnet / scope (pull_request) Successful in 19s
Suite dotnet / check-test-linux (pull_request) Has been skipped
Suite release / home-sync (pull_request) Has been skipped
Suite release / dispatch (pull_request) Has been skipped
Suite go / scope (pull_request) Successful in 20s
Suite release / module (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 26s
Suite release / build (dotnet, windows-latest) (, dotnet, false, windows-latest, , dotnet) (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 19s
Suite default / check-fetches (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite release / build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 24s
Suite go / check-test-linux (pull_request) Successful in 2m16s
Suite dotnet / reused-checks (pull_request) Successful in 22s
Suite go / reused-checks (pull_request) Successful in 17s
Suite default / check-rules (pull_request) Successful in 22s
Suite default / reused-checks (pull_request) Successful in 22s
Suite release / check-build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Successful in 1m29s
Suite dotnet / check-test-windows (pull_request) Successful in 3m1s
Suite go / check-test-windows (pull_request) Successful in 2m2s
Suite release / check-build (dotnet, windows-latest) (, dotnet, false, windows-latest, , dotnet) (pull_request) Successful in 1m48s
Suite release / check-package (pull_request) Successful in 29s
merge-queue landed on main
Suite release / reused-checks (pull_request) Successful in 15s
365d3619ac
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge-queue deleted branch aht-204-logline 2026-11-26 14:30:55 -08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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/spirelens!398
No description provided.