Skip to content

Recover journal prefixes and align Rust/Go journalctl with v262 - #12

Merged
ktsaou merged 11 commits into
masterfrom
fix/journalctl-v262-parity
Oct 27, 2026
Merged

ktsaou merged 11 commits into
masterfrom
fix/journalctl-v262-parity

Conversation

@ktsaou

@ktsaou ktsaou commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Rust and Go readers now recover an incomplete journal's intact entries by default, finish with normal EOF and expose recovery status. The SDK changes align native indexed filtering and position/error behavior, complete Rust's concatenated Zstandard decoding and repair Go indexed aggregation's borrowed-value lifetime.

Both file-backed journalctl commands now target systemd v262. In particular, -F/-N reject incompatible time, cursor and entry filters, grep uses native PCRE2 byte semantics, and unmatched unit wildcards return the native no-data error. Unit naming, wildcard matching and invocation discovery now follow native selection rules. FreeBSD uses a shared CLI compatibility path for extended brackets absent from its native matcher, with ordinary patterns retaining native matching. Invocation queries reuse indexed readers and metadata; follow retains its initial unit expansion and invocation selection. The update also aligns ordered option handling, timestamps, cursor/follow selection, output modes, terminal colors and maintenance behavior.

Unix filenames retain their original bytes through file selection and the additive Rust facade path APIs. Unix patterns use locale-aware native globbing; Windows uses Unicode filenames and matching. Existing string APIs and ordinary cache identity remain compatible. SDKs remain independent of PCRE2/CGO and keep their existing compiler minimums and journal-format baseline.

Validation:

  • Supported-floor Go race tests; Rust CLI unit/subprocess, SDK, registry and cache tests; independent CGO-disabled Go SDK checks.
  • Pinned v262: 1,372 comparisons; query/output/utility: 610; follow: 70 initial passes plus two passing unchanged focused rechecks after fixture-writer readiness timeouts; parser: 134 per language.
  • Portable native smoke: 130 controls, including Unicode patterns and colored grep/JSON.
  • The FreeBSD fallback passes 1,026,675 targeted glibc comparisons across C and UTF-8 locales, including malformed brackets and raw bytes, with address/undefined-behavior checks.
  • Timestamp parsing/rendering: 1,052 controls, including POSIX rules, custom TZDIR, leap records, table/header output and malformed timezone fallback and omitted daylight rules using configured default files. Rendering resolves zone data once and uses the same calendar rules as filtering.
  • All 35 documentation examples and 16 wiki pages pass. Native Linux, macOS, Windows and FreeBSD results are tracked through ordinary PR CI.

Performance evidence uses existing representative command controls and review of the changed work. A 64-invocation listing improved from 56.65 to 10.50 ms in Go and from 74.69 to 19.47 ms in Rust in matched local build profiles; sparse-ID controls also improved. An initial small Go no-ID increase did not reproduce in focused comparisons. The accepted exceptions are limited to fixed CLI startup and age-based vacuum metadata (about 7 ms Go / 3.8 ms Rust extra per 1,000 recent archive names in the retained warm control). SDK and ordinary query performance requirements remain unchanged.

Daemon/host catalog operations retain the documented portable limitations. Broader large-input performance envelopes and polling scalability remain tracked separately.

Coverage now includes the existing portable CLI subprocess controls in both language reports. Full local coverage jobs pass; Go retains every unit-profile block while adding CLI hits, and Rust collects workspace and subprocess profiles together. Runtime source and release performance are unchanged by this reporting update.

SOW-0108, SOW-0159 and SOW-0121 are completed, including the approved archive ordering repair in signed commit 2c12221. Final implementation and closure review passed for that exact commit. The repair passes native Linux, macOS, Windows and FreeBSD CI, both coverage-generation jobs, documentation checks and Go/Rust CodeQL. The final amendment changes lifecycle records only; normal CI reruns against it. This remains a draft for maintainer review; no merge or release is included.

Analysis limitations: on the repair run, Codacy configuration fetching failed with Internal Server Error twice; coverage generation passed but its Codacy upload reported Request URL not found / no data sent. These external API/configuration failures are not code findings and remain unresolved. The earlier Bandit execution error also prevents claiming full Bandit coverage.

Archive ordering repair: clock rollback across writer histories can make stock sequence/time comparisons contradictory. Both CLIs now preserve sequence order within each history and choose the oldest timestamp among available history heads, with deterministic ties. This approved exception avoids Rust sorting panics and makes retention selection agree across languages and enumeration orders. Existing count/size/age stop conditions and protected-file handling are preserved. Validation adds 24 portable observations (130 total), 120 insertion permutations per language and independent 10,000-case models per language; 78 existing utility/oracle observations pass.

Own contributing facet and histogram keys across rolling reader access.
Reuse bounded ENTRY-header storage and avoid redundant native-reader open
and constructor work, with allocation and cross-platform coverage.

Close the reopened SOW-0108 repair with validation and review dispositions.
Preserve paused SDK and journalctl scopes and track independent findings.
Recover intact journal prefixes with observable status, bound native chains, consume complete compressed streams, and align indexed filter positioning and retries. Preserve strict capture and writer behavior, propagate required index failures, and migrate cached indexes.

Record supported-toolchain validation, shared stock-v262 checks, focused performance evidence, review dispositions and SDK SOW completion together.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 215 files, which is 115 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e7705f2c-daf9-4159-ad80-2e36e84be703
Commits

Reviewing files that changed from the base of the PR and between dafcdac and ef382c2.

Files ignored due to path filters: 1
  • rust/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 215
  • .agents/skills/project-journal-compatibility/SKILL.md
  • .agents/skills/project-release/SKILL.md
  • .agents/sow/SOW-status.md
  • .agents/sow/audit.sh
  • .agents/sow/current/SOW-0045-20260528-go-reader-alignment-optimization.md
  • .agents/sow/current/SOW-0071-20260530-runtime-purity-and-optional-platform-services.md
  • .agents/sow/done/SOW-0108-20260614-cross-language-reader-window-accessor.md
  • .agents/sow/done/SOW-0121-20260621-file-backed-journalctl-full-parity.md
  • .agents/sow/done/SOW-0159-20261014-rust-go-sdk-hardening-and-reader-compatibility.md
  • .agents/sow/pending/SOW-0122-20260621-journalctl-performance-followups.md
  • .agents/sow/pending/SOW-0160-20261015-go-xz-reader-dictionary-allocation.md
  • .agents/sow/pending/SOW-0161-20261017-file-indexer-source-posting-membership.md
  • .agents/sow/specs/journalctl-v260-parity-matrix.md
  • .agents/sow/specs/product-scope.md
  • .agents/sow/specs/rust-reader-performance.md
  • .github/workflows/codeql.yml
  • .github/workflows/coverage.yml
  • .github/workflows/journalctl.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • RELEASING.md
  • SOW-status.md
  • docs/Go-API.md
  • docs/Indexed-Snapshots.md
  • docs/Journalctl-CLI.md
  • docs/Reader-APIs.md
  • docs/Rust-API.md
  • go/API.md
  • go/README.md
  • go/adapter/complex_match.go
  • go/adapter/main.go
  • go/adapter/reader_probe.go
  • go/cmd/journalctl/colors.go
  • go/cmd/journalctl/disk_usage_other.go
  • go/cmd/journalctl/disk_usage_unix.go
  • go/cmd/journalctl/file_glob_braces.go
  • go/cmd/journalctl/file_glob_braces_test.go
  • go/cmd/journalctl/file_glob_other.go
  • go/cmd/journalctl/file_glob_unicode.go
  • go/cmd/journalctl/file_glob_unix.go
  • go/cmd/journalctl/introspection.go
  • go/cmd/journalctl/invocation.go
  • go/cmd/journalctl/main.go
  • go/cmd/journalctl/main_test.go
  • go/cmd/journalctl/options.json
  • go/cmd/journalctl/output.go
  • go/cmd/journalctl/output_color.go
  • go/cmd/journalctl/output_links.go
  • go/cmd/journalctl/output_links_test.go
  • go/cmd/journalctl/parser.go
  • go/cmd/journalctl/pcre.go
  • go/cmd/journalctl/table_json.go
  • go/cmd/journalctl/table_json_test.go
  • go/cmd/journalctl/terminal_other.go
  • go/cmd/journalctl/terminal_unix.go
  • go/cmd/journalctl/terminal_windows.go
  • go/cmd/journalctl/timestamp.go
  • go/cmd/journalctl/timestamp_zone.go
  • go/cmd/journalctl/uid_other.go
  • go/cmd/journalctl/uid_unix.go
  • go/cmd/journalctl/unit_name.go
  • go/cmd/journalctl/unit_pattern_compat.h
  • go/cmd/journalctl/unit_pattern_compat_test.go
  • go/cmd/journalctl/unit_pattern_fallback.go
  • go/cmd/journalctl/unit_pattern_test.go
  • go/cmd/journalctl/unit_pattern_unicode.go
  • go/cmd/journalctl/unit_pattern_unix.go
  • go/cmd/journalctl/vacuum_metadata_bsd.go
  • go/cmd/journalctl/vacuum_metadata_linux.go
  • go/cmd/journalctl/vacuum_metadata_other.go
  • go/cmd/journalctl/vacuum_metadata_windows.go
  • go/cmd/journalctl/vacuum_open_other.go
  • go/cmd/journalctl/vacuum_open_unix.go
  • go/cmd/journalctl/vacuum_order.go
  • go/cmd/journalctl/vacuum_order_test.go
  • go/internal/testcmd/reader_core_bench/auxiliary.go
  • go/internal/testcmd/reader_core_bench/filter.go
  • go/internal/testcmd/reader_core_bench/main.go
  • go/journal/array_chain.go
  • go/journal/chain_guard.go
  • go/journal/chain_guard_test.go
  • go/journal/directory_reader.go
  • go/journal/explorer.go
  • go/journal/explorer_window_lifetime_test.go
  • go/journal/facade.go
  • go/journal/facade_test.go
  • go/journal/file_open_native_linux.go
  • go/journal/file_open_native_linux_test.go
  • go/journal/file_open_native_other.go
  • go/journal/indexed_snapshot.go
  • go/journal/reader.go
  • go/journal/reader_access.go
  • go/journal/reader_accessor_stats_test.go
  • go/journal/reader_array_cycle_test.go
  • go/journal/reader_cursor_direction.go
  • go/journal/reader_cursor_direction_test.go
  • go/journal/reader_directory_transition_test.go
  • go/journal/reader_entry.go
  • go/journal/reader_filter.go
  • go/journal/reader_filter_boundary_test.go
  • go/journal/reader_filter_native_test.go
  • go/journal/reader_filter_position_test.go
  • go/journal/reader_filter_posting.go
  • go/journal/reader_filter_realtime.go
  • go/journal/reader_filter_recovery.go
  • go/journal/reader_filter_refresh_test.go
  • go/journal/reader_filter_step.go
  • go/journal/reader_header_access_test.go
  • go/journal/reader_header_bench_test.go
  • go/journal/reader_recovery.go
  • go/journal/reader_recovery_eof_test.go
  • go/journal/reader_recovery_facet_test.go
  • go/journal/reader_recovery_test.go
  • go/journal/reader_test.go
  • go/journal/reader_unique.go
  • go/journal/reader_unique_header_test.go
  • go/journal/reader_zstd_test.go
  • go/journal/verify.go
  • go/journal/verify_index.go
  • go/journal/writer_arrays.go
  • go/journal/writer_objects.go
  • rust/README.md
  • rust/src/adapter/main.rs
  • rust/src/adapter/reader_probe.rs
  • rust/src/cmd/journalctl/Cargo.toml
  • rust/src/cmd/journalctl/build.rs
  • rust/src/cmd/journalctl/colors.rs
  • rust/src/cmd/journalctl/file_glob.rs
  • rust/src/cmd/journalctl/invocation.rs
  • rust/src/cmd/journalctl/main.rs
  • rust/src/cmd/journalctl/native_unit_pattern.c
  • rust/src/cmd/journalctl/output.rs
  • rust/src/cmd/journalctl/output_links.rs
  • rust/src/cmd/journalctl/parser.rs
  • rust/src/cmd/journalctl/pcre.rs
  • rust/src/cmd/journalctl/terminal.rs
  • rust/src/cmd/journalctl/tests/cli_subprocess.rs
  • rust/src/cmd/journalctl/timestamp.rs
  • rust/src/cmd/journalctl/timestamp_zone.rs
  • rust/src/cmd/journalctl/unit_name.rs
  • rust/src/cmd/journalctl/unit_pattern.rs
  • rust/src/cmd/journalctl/vacuum_metadata.rs
  • rust/src/cmd/journalctl/vacuum_order.rs
  • rust/src/crates/journal-core/src/error.rs
  • rust/src/crates/journal-core/src/file/array_chain.rs
  • rust/src/crates/journal-core/src/file/chain_guard.rs
  • rust/src/crates/journal-core/src/file/cursor.rs
  • rust/src/crates/journal-core/src/file/cursor_direction.rs
  • rust/src/crates/journal-core/src/file/file.rs
  • rust/src/crates/journal-core/src/file/file_iterators.rs
  • rust/src/crates/journal-core/src/file/file_mut.rs
  • rust/src/crates/journal-core/src/file/file_payload.rs
  • rust/src/crates/journal-core/src/file/file_tests.rs
  • rust/src/crates/journal-core/src/file/filter.rs
  • rust/src/crates/journal-core/src/file/mmap.rs
  • rust/src/crates/journal-core/src/file/mod.rs
  • rust/src/crates/journal-core/src/file/object.rs
  • rust/src/crates/journal-core/src/file/object_compression.rs
  • rust/src/crates/journal-core/src/file/object_hash.rs
  • rust/src/crates/journal-core/src/file/offset_array.rs
  • rust/src/crates/journal-core/src/file/reader.rs
  • rust/src/crates/journal-core/src/file/reader_recovery.rs
  • rust/src/crates/journal-core/src/file/row_view.rs
  • rust/src/crates/journal-core/src/file/writer_entry_arrays.rs
  • rust/src/crates/journal-core/src/file/zstd_stream.rs
  • rust/src/crates/journal-engine/src/cache.rs
  • rust/src/crates/journal-engine/tests/index_integrity.rs
  • rust/src/crates/journal-index/src/file_indexer.rs
  • rust/src/crates/journal-index/tests/array_integrity.rs
  • rust/src/crates/journal-registry/src/repository/file.rs
  • rust/src/crates/journal-registry/src/repository/mod.rs
  • rust/src/internal/testcmd/reader_core_bench/src/auxiliary.rs
  • rust/src/internal/testcmd/reader_core_bench/src/filter.rs
  • rust/src/internal/testcmd/reader_core_bench/src/main.rs
  • rust/src/journal/src/directory.rs
  • rust/src/journal/src/explorer.rs
  • rust/src/journal/src/facade.rs
  • rust/src/journal/src/lib.rs
  • rust/src/journal/src/parse.rs
  • rust/src/journal/src/reader_helpers.rs
  • rust/src/journal/src/sealed_verify.rs
  • rust/src/journal/src/tests.rs
  • rust/src/journal/src/tests/facade.rs
  • rust/src/journal/src/tests/reader_hardening.rs
  • rust/src/journal/src/verify_graph/io.rs
  • tests/benchmarks/README.md
  • tests/benchmarks/reader_filter_golden.py
  • tests/benchmarks/run_reader_regression_comparison.py
  • tests/coverage/README.md
  • tests/coverage/run_go_coverage.sh
  • tests/coverage/run_rust_coverage.sh
  • tests/interoperability/README.md
  • tests/interoperability/go_fixture_writer.py
  • tests/interoperability/journalctl_color_cases.py
  • tests/interoperability/journalctl_path_cases.py
  • tests/interoperability/journalctl_timestamp_cases.py
  • tests/interoperability/journalctl_unit_cases.py
  • tests/interoperability/journalctl_v262_cases.py
  • tests/interoperability/journalctl_vacuum_cases.py
  • tests/interoperability/run_binary_matrix.py
  • tests/interoperability/run_compact_matrix.py
  • tests/interoperability/run_compression_matrix.py
  • tests/interoperability/run_directory_matrix.py
  • tests/interoperability/run_journalctl_portable_smoke.py
  • tests/interoperability/run_journalctl_query_matrix.py
  • tests/interoperability/run_live_matrix.py
  • tests/interoperability/run_matrix.py
  • tests/interoperability/run_mixed_directory_matrix.py
  • tests/interoperability/run_reader_hardening.py
  • tests/interoperability/run_verify_matrix.py
  • tests/interoperability/test_journalctl_oracle.py
  • tests/parser-parity/check_v260_manifest.py
  • tests/parser-parity/run_parser_parity.py
  • tests/parser-parity/v260-manifest.json
  • tests/parser-parity/v260-manifest.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Comment thread tests/benchmarks/run_reader_regression_comparison.py Fixed
Comment thread tests/interoperability/run_reader_hardening.py Fixed
Comment thread .agents/sow/specs/product-scope.md Fixed
Comment thread tests/interoperability/README.md Fixed
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch 2 times, most recently from f5063ba to 0fc3d82 Compare October 18, 2026 16:06
Comment thread go/cmd/journalctl/output.go Fixed
Comment thread go/cmd/journalctl/output.go Fixed
Comment thread go/cmd/journalctl/main.go Fixed
Comment thread go/cmd/journalctl/main.go Fixed
Comment thread go/cmd/journalctl/output.go Fixed
Comment thread go/cmd/journalctl/output.go Fixed
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch 2 times, most recently from 837873a to 1f84cca Compare October 19, 2026 13:48
Comment thread tests/interoperability/journalctl_color_cases.py Fixed
Comment thread tests/interoperability/journalctl_color_cases.py Fixed
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch 5 times, most recently from b12c8ff to e3ed6ec Compare October 21, 2026 19:08
Comment thread go/cmd/journalctl/unit_pattern_compat.h Fixed
Comment thread go/cmd/journalctl/unit_pattern_compat.h Fixed
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch 4 times, most recently from eff0231 to bed8c11 Compare October 21, 2026 20:05
Comment thread go/cmd/journalctl/timestamp_zone.go Fixed
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch from bed8c11 to 45e0de2 Compare October 21, 2026 20:16
@ktsaou
ktsaou force-pushed the fix/journalctl-v262-parity branch from fcd918b to 2c12221 Compare October 24, 2026 08:09

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed against the latest diff

You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread rust/src/crates/journal-core/src/file/cursor.rs
Comment thread .agents/sow/pending/SOW-0122-20260621-journalctl-performance-followups.md Outdated
Comment thread rust/src/cmd/journalctl/parser.rs
Comment thread go/journal/facade.go Outdated
Comment thread rust/src/cmd/journalctl/file_glob.rs
Comment thread tests/interoperability/journalctl_vacuum_cases.py
Comment thread tests/interoperability/run_journalctl_portable_smoke.py
Comment thread rust/src/journal/src/verify_graph/io.rs
Comment thread rust/src/adapter/main.rs
Comment thread rust/README.md Outdated
Comment thread tests/interoperability/test_journalctl_oracle.py Fixed
@ktsaou
ktsaou marked this pull request as ready for review October 27, 2026 05:38

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request is too large for an AI review. Its diff is over the size the reviewer can fetch from the Git provider. Splitting it into smaller pull requests lets the reviewer cover it.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@ktsaou
ktsaou merged commit 00d33d4 into master Oct 27, 2026
35 of 36 checks passed
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.

3 participants