Skip to content

tools: Add hand-written fixtures and validation for log parsers - #74

Open
redbelter wants to merge 2 commits into
weilixiong:mainfrom
redbelter:main
Open

tools: Add hand-written fixtures and validation for log parsers#74
redbelter wants to merge 2 commits into
weilixiong:mainfrom
redbelter:main

Conversation

@redbelter

@redbelter redbelter commented Jul 18, 2026

Copy link
Copy Markdown
  • Created test_fixtures.json with JSON, text, nginx format examples
  • Created validate_fixtures.py to verify parser output correctness
  • Fixed extract_service() to:
    • Match [service_name] patterns with letters/digits/hyphens/underscores
    • Skip numeric-only bracket IDs (PIDs)
    • Parse syslog format: Mon DD HH:MM:SS hostname service[pid]:
  • Updated build.py f-string syntax error

Summary

Changes

Testing

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

@redbelter

Copy link
Copy Markdown
Author

Fixes #494 - $25 bounty

- Created test_fixtures.json with JSON, text, nginx format examples
- Created validate_fixtures.py to verify parser output correctness
- Fixed extract_service() to:
  * Match [service_name] patterns with letters/digits/hyphens/underscores
  * Skip numeric-only bracket IDs (PIDs)
  * Parse syslog format: Mon DD HH:MM:SS hostname service[pid]:
- Updated build.py f-string syntax error
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