Skip to content

fix(examples): log skipped malformed JSONL lines - #117

Merged
AbirAbbas merged 1 commit into
Agent-Field:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/log-malformed-jsonl
Aug 10, 2026
Merged

fix(examples): log skipped malformed JSONL lines#117
AbirAbbas merged 1 commit into
Agent-Field:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/log-malformed-jsonl

Conversation

@andrewwhitecdw

Copy link
Copy Markdown
Contributor

analyze_v2.py and analyze_pipeline.py already narrowed JSONL parsing to json.JSONDecodeError, but the exception handler silently discarded bad lines. Print a warning to stderr so corrupted or partial log data is no longer invisible.

Signed-off-by: Andrew White andrew.white@cdw.com

analyze_v2.py and analyze_pipeline.py already narrowed parsing to
json.JSONDecodeError, but the except branch silently discarded bad
lines. Print a warning to stderr so corrupted log data is visible.

Signed-off-by: Andrew White <andrew.white@cdw.com>
Signed-off-by: Andrew White <andrewh@cdw.com>

@AbirAbbas AbirAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified with a live run: malformed lines now emit one bounded (200-char) stderr warning each, blank lines stay silent, and valid input parses unchanged (sys was already imported in both files). LGTM.

@AbirAbbas
AbirAbbas merged commit 678ab81 into Agent-Field:main Aug 10, 2026
2 checks 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.

2 participants