Skip to content

fix(server): strip the log source tag from per-job files#151

Merged
Sootopolis merged 1 commit into
mainfrom
wip
Jul 6, 2026
Merged

fix(server): strip the log source tag from per-job files#151
Sootopolis merged 1 commit into
mainfrom
wip

Conversation

@Sootopolis

Copy link
Copy Markdown
Owner

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 in ccas membership / ccas history output).

FileSink now strips the source prefix from the file write (new ProgressDisplay.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: stripSourceTag removes 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

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>
@Sootopolis Sootopolis merged commit 2bc4457 into main Jul 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant