Skip to content

test: add independent log parser fixtures for JSON, text, and nginx formats (fixes #5) - #59

Open
Fuhua-GIF wants to merge 67 commits into
weilixiong:mainfrom
Fuhua-GIF:feat/log-parser-fixtures
Open

test: add independent log parser fixtures for JSON, text, and nginx formats (fixes #5)#59
Fuhua-GIF wants to merge 67 commits into
weilixiong:mainfrom
Fuhua-GIF:feat/log-parser-fixtures

Conversation

@Fuhua-GIF

Copy link
Copy Markdown

Summary

Adds independent parser fixture tests for tools/log_aggregator.py, as requested in #5.

Changes

  • Added tests/test_log_parser_fixtures.py: 5 tests with hand-written (NOT parser-generated) fixtures:
    1. JSON parser correctly parses 4 hand-written JSON log fixtures (various levels, fields, nested data)
    2. Text parser correctly parses 4 hand-written text log fixtures (INFO, ERROR, WARN, DEBUG)
    3. Nginx parser correctly parses 3 hand-written nginx access log fixtures (200, 500, 404 status codes)
    4. 5 malformed/unsupported lines (invalid JSON, random text, empty, truncated nginx, partial match) do not crash any parser
    5. Parser independence verified - each parser produces expected output fields for its format

Fixture Sources

All fixtures are hand-written based on real-world log formats:

  • JSON fixtures follow structured logging conventions (timestamp, level, service, message)
  • Text fixtures follow common syslog-style format (timestamp level [service] message)
  • Nginx fixtures follow the standard nginx access log format (combined log format)
  • Malformed fixtures represent common edge cases (invalid JSON, empty lines, truncated logs)

Testing

python3 tests/test_log_parser_fixtures.py

All 5 tests pass. No production parsing behavior was changed.

Checklist

  • Independent fixtures for JSON, plain text, and nginx-style log lines
  • Tests verify parser output for timestamp, level, service/format, and key fields
  • At least one malformed/unsupported line case included (5 total)
  • Existing log aggregation CLI behavior remains compatible
  • PR description explains fixture source/intent and validation performed

Fixes #5

lobster-trap and others added 30 commits June 16, 2026 11:25
Merges external bounty submission for issue Saiaaax#1. Structural review confirmed source changes, tests, issue closure, and required diagnostic bundle. Local Java execution was unavailable in this runner; submitted diagnostic JSON reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#2. The PR removes ComplianceAuditor class-load network I/O, adds explicit override loading with tests, and includes diagnostic/build-807b0396.json plus diagnostic/build-807b0396.logd. Local Java execution could not be rerun in this environment because no Java runtime is installed; submitted diagnostic metadata reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#9. The focused package test ok  	github.com/tent-of-trials/market/analytics	(cached) passes locally, the diff check is clean, and the PR includes diagnostic/build-968e5b08.json plus diagnostic/build-968e5b08.logd with the market module reported as PASS.
Merged after owner review for fork bounty issue Saiaaax#19. The PR includes diagnostic/build-c55f8a6d.json plus split diagnostic/build-c55f8a6d-part001.logd through part006.logd. The submitted diagnostic metadata failed because that runner lacked Ruby, so I reran validation locally in an isolated temporary GEM_HOME with the service dependencies installed: , , and  all passed; the test run reported 5 runs, 10 assertions, 0 failures.
Merged after owner review for fork bounty issue Saiaaax#3. The PR includes source changes, a focused Java regression test, diagnostic/build-acbafcb1.json, and diagnostic/build-acbafcb1.logd. Local Java execution could not be rerun in this environment because no Java runtime is installed; the submitted diagnostic metadata reports the affected compliance module as PASS.
Merged after owner review for fork bounty issue Saiaaax#6. Focused validation passed in a sparse checkout with cd market && go test ./gateway. The PR includes diagnostic/build-54fd6e7a.json and diagnostic/build-54fd6e7a.logd with the market module reported as PASS.
Merged after owner review for fork bounty issue Saiaaax#5. Focused validation passed in a sparse checkout with cd market && go test ./ws. The PR includes diagnostic/build-f994d258.json and diagnostic/build-f994d258.logd with the market module reported as PASS.
Merged after owner review for fork bounty issue Saiaaax#8. Focused validation passed in a sparse checkout with cd market && go test ./analytics. The PR includes diagnostic/build-d8fc4651.json and diagnostic/build-d8fc4651.logd with the market module reported as PASS. Fixes Saiaaax#8.
jaxassistant55 and others added 29 commits June 20, 2026 19:10
…ualization-14

Virtualize large order book rendering
Generate structured compliance report payloads
…-base-url

Require explicit API base URL outside development
# Conflicts:
#	frontend/package.json
…le-flight

Fix auth refresh single-flight
…webhook-18-validated

Load log watchdog Slack webhook from configuration
…ion-dry-run-20

Add legacy migration dry-run restore validation
…hutdown-15

Define logger post-shutdown behavior
…t-all-16

Implement connector wait-all timeout handling
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.

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

8 participants