Repository navigation
Conversation
Table-driven tests for the coercion helpers, edge cases of the per-log post-processors, a mapping test for every field shape, CSV-to-file and unreadable-input CLI paths, and reader re-iteration. Removes the unused ZeekLog.field_types property and an unreachable unflatten branch; the mapping now skips children of flattened fields. Excludes the __main__ guard from coverage and __main__.py from Sonar coverage. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SonarCloud analysis · PR #13Quality gate: ✅ Passed · Open in SonarCloud
Open issues on new code: 1
Machine-readable issue list[
{
"key": "AaBzhJfFIGO5oxXgAtV9",
"severity": "MEDIUM",
"qualities": [
"Maintainability"
],
"path": "tests/test_ecs_branches.py",
"line": 19,
"message": "Unify assertion argument order in this file; both \"actual first\" and \"expected first\" conventions are used.",
"rule": "python:S3415",
"effort": "2min"
}
]Commit |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Why
Local coverage was 95% (Sonar 94.3%, branch 89.2%). Almost every gap was in
ecs.py: coercion helper branches the fixtures never hit, negative branches of the per-log post-processors, and mapping shapes the published field table does not contain.What
_as_int/_as_float/_as_bool/_as_str/_as_ip/_append/_parse_dn; edge cases for the DNS, HTTP, SSL, Kerberos, files, SMB, SOCKS, SIP, MySQL, SSH and x509 post-processors;_common_postwhen no Community ID can be computed;_add_constantsnetwork defaults;ecs_index_bodywith a scalar-that-is-a-parent, aflattenedfield with a child, and anestedfield; CSV to a file; anOSErrorduring anelkrun; header-only logs, re-iteration and borrowed streams in the reader.ecs_index_bodynow skips children offlattenedfields (Elasticsearch cannot map them; the published table has none, so the generated mapping is unchanged, and the integration test that creates it still passes). An unreachable branch inunflattenis gone. The unusedZeekLog.field_typesproperty is removed.if __name__ == "__main__"guard is excluded from coverage viaexclude_also;parsezeeklogs/__main__.pyis excluded from Sonar coverage since only a subprocess test exercises it.Result
Unit (183), integration and corpus (275) suites pass locally against Elasticsearch 9.5.3.
🤖 Generated with Claude Code