Add independent log-parser fixtures and validation script (#5)#63
Open
harshith8gowda wants to merge 5 commits into
Open
Add independent log-parser fixtures and validation script (#5)#63harshith8gowda wants to merge 5 commits into
harshith8gowda wants to merge 5 commits into
Conversation
Hand-written fixtures (JSON, text, nginx) plus a malformed-line safety case, and a validation script asserting timestamp/level/service/key-field extraction. Fixes the false-pass risk in the legacy parser test data (bounty jackjin1997#5).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds independent log-parser fixtures and a validation script for
tools/log_aggregator.py. The legacy parser test data was generated by the same parser logic and could false-pass; these fixtures are hand-written from real log examples and were never produced by the parser.Changes
tools/tests/fixtures/json_sample.log— 3 structured JSON lines (level / severity / lvl variants)tools/tests/fixtures/text_sample.log— 3 plain-text lines (ISO, standard, syslog timestamps)tools/tests/fixtures/nginx_sample.log— 2 nginx access-log lines (status 200 and 500)tools/tests/fixtures/malformed.log— 4 partial / unsupported lines that must not crash parsingtools/tests/test_log_parser_fixtures.py— validation script asserting timestamp, level, service/format, and key fields for each format, plus malformed-line safetytools/tests/README.md— explains fixture source and how to run the validationTesting
Result: 34/34 checks passed on the committed hand-written fixtures (ran locally, exit 0).
[auth]bracket service, ISO/standard/syslog timestamps, level tokensDid NOT change production parsing behavior. CLI aggregation remains compatible.
Checklist
Diagnostic build note
The repo
python3 build.pydiagnostic step requires the full multi-language toolchain (cargo, npm, go, gcc, cmake) plus theencryptlyWindows binary, which is not available in this Linux-based CI environment, so a.logdcould not be generated here. The validation script above is self-contained and is the substantive evidence for this fixtire/validation bounty. Adiagnostic/build-1462fe7e.jsonartifact from a scopedbuild.py -m backendrun is included for transparency.Closes #5