refactor(nevermore-cli): split batch log parsing into tokenize then fold - #796
Open
Quenty wants to merge 2 commits into
Open
refactor(nevermore-cli): split batch log parsing into tokenize then fold#796Quenty wants to merge 2 commits into
Quenty wants to merge 2 commits into
Conversation
Characterization tests for the parts of parseBatchTestLogs that nothing covered: END markers without a PASS/FAIL suffix or a duration, the END-marker duration fallback, the single-dropped-head rule, the two distinct summary failure reasons, reason joining, malformed markers being content, tracebacks failing a run, single-package fallback logs, and the empty section that reports no counts. These lock in the current observable values so the upcoming Pass 1 restructure can be checked against them.
Pass 1 carried twelve mutable bindings through one loop, and its diagnostic counters doubled as control flow, so any change to the splitting rules risked the verdict. Lines are now classified into tokens first and folded into sections second, which leaves the fold three pieces of state and lets the warning counts be read back off the token list instead of accumulated beside it. The three bindings that spelled out "the head of the log is still unclaimed" collapse into one: a section can only be open once a BEGIN has arrived, so testing for no open section was redundant with testing for no BEGIN. Two anomalies that used to pass silently are now reported, without changing any verdict: a second BEGIN arriving while a section is still open (its output is discarded), and an END naming a slug that is not in this batch. Every observable value is unchanged, as the characterization tests added in the previous commit assert.
Quenty
force-pushed
the
users/james/batch-log-parser-tokenize
branch
from
August 11, 2026 00:39
f52e356 to
dbeecef
Compare
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.
Batch log parsing now classifies each log line into a token and folds the token list into per-package sections, instead of threading twelve mutable bindings through a single loop where the diagnostic counters also decided the parse. Per-package results are byte-for-byte the same; the first commit adds characterization tests that pin the previously untested behavior, and the second commit is the restructure. Two anomalies that used to pass silently are now warned about without changing any verdict: a second BEGIN arriving while a section is still open, and an END naming a slug that is not in this batch.