Skip to content

[$25 BOUNTY] [Python] Add independent log parser fixtures #5

Description

@weilixiong

Bounty: $25 (LT)

Area: tools/log_aggregator.py and parser fixture tests

Current state: The legacy log aggregator notes that parser tests can false-pass because the test data was generated by the same parser logic. This leaves JSON, text, and nginx log parsing vulnerable to regressions when real archived log formats drift.

What's needed: Add independent parser fixtures based on hand-written representative log lines and cover the main parser paths without relying on parser-generated samples. Keep the change focused on parser validation and do not change production parsing behavior unless a fixture exposes a clear bug.

Acceptance criteria:

  • Add independent fixtures for JSON, plain text, and nginx-style log lines.
  • Add focused tests or a validation script that verifies parser output for timestamp, level, service/format, and key fields.
  • Include at least one malformed/unsupported line case that should not crash parsing.
  • Existing log aggregation CLI behavior remains compatible.
  • PR description explains the fixture source/intent and validation performed.

Required validation:

  • Run python3 build.py
  • Include the generated diagnostic .logd artifact from diagnostic/build-XXX.logd in the PR; also include diagnostic/build-XXX.json if present
  • Use .github/pull_request_template.md for your submission

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions