fix(server): strip the log source tag from per-job files#151
Merged
Conversation
The [Kind/slug] source prefix earns its keep only on the multiplexed server console, where interleaved jobs need disambiguating. A per-job log file is single-source, and the CLI streams exactly one such file per job — so there the tag is pure repetition on every line (visible in `ccas membership` / `ccas history` output). FileSink now strips the source prefix from the file write (via a new ProgressDisplay.stripSourceTag, the inverse of the formatter's prefix) while the stdout tee keeps it. A message that itself starts with a bracket (e.g. the reconciliation [LEFT CLUB] headings) is preserved — only the tag directly abutting the level bracket is removed, and per-job files always carry the tag, so the second bracket is unambiguously it. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Follow-up to #149. The
[Kind/slug]source tag helps on the multiplexed server console (interleaved jobs), but a per-job log file is single-source and the CLI streams exactly one such file per job — so there the tag repeats on every line (noise inccas membership/ccas historyoutput).FileSinknow strips the source prefix from the file write (newProgressDisplay.stripSourceTag, the inverse of the formatter prefix); the stdout tee keeps it. Only the tag directly abutting the[LEVEL HH:mm:ss]bracket is removed, so a message that itself starts with a bracket (e.g. the reconciliation[LEFT CLUB]headings) is preserved — safe because every per-job-file line carries the tag, making the second bracket unambiguously the source tag.Fixes
None linked (surfaced while dogfooding #149).
Testing
sbt test— 1015 pass, 0 fail (pre-push + local).TestJobLogSink+1: file content drops the tag, stdout tee keeps it.TestProgressBar+1:stripSourceTagremoves the prefix and preserves a bracketed message + a no-tag line.Note
Separate from #150 (log-follow stream idle-timeout drop) — that's a stream-lifecycle bug, unrelated to log formatting.
🤖 Generated with Claude Code