Skip to content

refactor(nevermore-cli): split batch log parsing into tokenize then fold - #796

Open
Quenty wants to merge 2 commits into
mainfrom
users/james/batch-log-parser-tokenize
Open

refactor(nevermore-cli): split batch log parsing into tokenize then fold#796
Quenty wants to merge 2 commits into
mainfrom
users/james/batch-log-parser-tokenize

Conversation

@Quenty

@Quenty Quenty commented Aug 11, 2026

Copy link
Copy Markdown
Owner

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.

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.
@Quenty
Quenty deployed to integration August 11, 2026 00:36 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Results

ℹ️ No changed packages with deploy targets were discovered for this PR. · View logs

Test Results

ℹ️ No changed packages with test targets were discovered for this PR. · View logs

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
Quenty force-pushed the users/james/batch-log-parser-tokenize branch from f52e356 to dbeecef Compare August 11, 2026 00:39
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