Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 43 |
| Duplication | 4 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
…compressible-data-field
There was a problem hiding this comment.
Pull Request Overview
✅ No blocking issues noticed
No blocking implementation findings were identified. The review does note missing direct regression coverage for payload visitors, Netdata, Rust query projection, and unique-value error propagation; these independently specified behaviors should be covered to reduce regression risk.
About this PR
- Add focused automated coverage for the currently unverified payload, Netdata, Rust projection, and unique-value behaviors.
Test suggestions
- GetEntry and entry payload collection preserve readable fields for corrupted zstd, xz, and lz4 DATA
- Payload visitors, entry enumeration, and facade data getters skip only the damaged field
- Explorer facets and rows survive corrupted compressed DATA
- Netdata row expansion skips damaged compressed fields
- Rust journal-engine query projection skips damaged fields
- Unique-value enumeration still returns a decompression error
- Strict Go and Rust verification reject damaged compressed DATA
- Hardening and stock-oracle checks validate preserved rows and dropped fields
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Payload visitors, entry enumeration, and facade data getters skip only the damaged field
2. Netdata row expansion skips damaged compressed fields
3. Rust journal-engine query projection skips damaged fields
4. Unique-value enumeration still returns a decompression error
Make this review better
TIP Add a ticket key to the branch or title so the reviewer can check the PR against it. Or tell us which ticket tracker you use here.
TIP How was this review? Give us feedback
There was a problem hiding this comment.
8 issues found and verified against the latest diff
Confidence score: 3/5
product-scope.mdnow says malformed payloads are field-local, but the sentence below still says they remain errors. Resolve that contradiction so the intended failure behavior is clear.- The reader tests can miss incorrect field drops or returned rows:
run_reader_hardening.pychecks only counts, andreader_decompress_damage_test.godoes not assert thatMESSAGEis unset. Compare the relevant export fields and assert the damaged field is dropped. - The completed SOW has stale differential results presented as current and omits the required failure-handling record. Label the baseline results and document how validation failures are recorded and resolved.
verify_graph.gowraps the decompression error with%v, which loses the error chain. Preserve it with%wso callers can inspect the underlying error.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".agents/sow/done/SOW-0178-20261109-undecompressible-data-costs-one-field.md">
<violation number="1" location=".agents/sow/done/SOW-0178-20261109-undecompressible-data-costs-one-field.md:34">
P3: The differential facts are stale baseline results but are not labeled as pre-change, contradicting the later validation that Go and Rust retain rows and drop the damaged xz field. Mark this differential and the hardening expectation as baseline observations.</violation>
<violation number="2" location=".agents/sow/done/SOW-0178-20261109-undecompressible-data-costs-one-field.md:71">
P3: The analysis claims `docs/Rust-API.md` was part of the documentation change, but this PR updates only `Reader-APIs.md`. Remove it from the changed-docs list or record why the Rust API page needs no update.</violation>
<violation number="3" location=".agents/sow/done/SOW-0178-20261109-undecompressible-data-costs-one-field.md:164">
P3: This completed SOW omits the template’s required `Failure handling` record. Add how failed validation or audits are recorded, repaired, rerun, and prevented from closing the SOW.</violation>
</file>
<file name=".agents/sow/specs/product-scope.md">
<violation number="1" location=".agents/sow/specs/product-scope.md:807">
P2: This new paragraph makes bad DATA type/size and undecodable compressed payloads field-local, but the unchanged sentence just below still says wrong types, malformed nonzero sizes and decompression failures remain errors. Reconcile the two by scoping the older sentence to ENTRY/ENTRY-array tails and the other error classes, or by rewording it to exclude the field-local DATA cases.</violation>
</file>
<file name=".agents/sow/SOW-status.md">
<violation number="1" location=".agents/sow/SOW-status.md:85">
P3: This summary entry is cryptic: 'decisions 1B, xz = B' refers to options that only exist in the SOW file. State the outcome instead, including that the xz behavior intentionally differs from systemd.</violation>
</file>
<file name="go/journal/verify_graph.go">
<violation number="1" location="go/journal/verify_graph.go:1184">
P3: The wrapped decompression error uses `%v` for the underlying error, so its chain is lost. Wrap it with a second `%w` to keep it inspectable.</violation>
</file>
<file name="tests/interoperability/run_reader_hardening.py">
<violation number="1" location="tests/interoperability/run_reader_hardening.py:293">
P2: This oracle check can pass while stock export returns different rows or drops the wrong field, because it validates only row and `MESSAGE` counts. Parse the export records and compare the relevant fields and row identity against `expected` so the hardening test detects incorrect recovery behavior.</violation>
</file>
<file name="go/journal/reader_decompress_damage_test.go">
<violation number="1" location="go/journal/reader_decompress_damage_test.go:101">
P2: This test does not assert that the damaged `MESSAGE` field is actually dropped. Add assertions that the returned row excludes `MESSAGE` and that its facet is reported as unset rather than as the corrupted value; exercise the indexed strategy separately if that path is covered by this behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
The reader-hardening oracle now parses journalctl export output and compares each row's realtime and payloads instead of counting rows and MESSAGE lines. Both explorer damage tests assert MESSAGE is absent from the row and counted only as unset. Go keeps the decompressor error in the wrapped chain. The spec scopes the remaining-errors sentence to tail recovery, and the SOW labels its baseline facts, corrects the docs list and records failure handling.
Stacked on #27 (SOW-0176). Merge after it.
A compressed DATA object that cannot be decoded now costs only its field, not the whole entry, in Go and Rust:
--verifystill report the damage, as systemd does.JournalError::is_recoverable_entry_datainjournal-core, so the SDK andjournal-engineshare one owner.Behavior against a systemd 262 oracle on files with one corrupted compressed field:
Cannot allocate memory)run_reader_hardening.pynow expects stock's rows for the corrupt and oversized zstd streams and checks them against stock-o export; strict verification still rejects those files.Validation: Go and Rust unit tests, reader hardening, compression, verify, mixed directory, live and query matrices, docs examples and the duplication gate.
Summary by cubic
A compressed DATA object that cannot be decoded now costs only its field, not the whole entry, matching systemd 262 for zstd and lz4. Entry reads, payload visitors, entry enumeration, facade data getters, Explorer/Netdata facets, and the Rust log-query row projection skip the damaged field, while unique-value enumeration and
--verifystill report it; corrupt xz drops the field where systemd fails the whole read (documented difference).Refactors
JournalError::is_recoverable_entry_datainjournal-core, giving the SDK andjournal-enginea single owner.Bug Fixes
-o exportoutput and compares per-row realtime and payloads instead of row counts, asserting the damaged MESSAGE field is dropped.Written for commit 2daaa0b. Summary will update on new commits.