fix: timestamp columns are sequences; add journal example (1.1.1)#65
Conversation
Adds examples/journal_anomalies.py — anomalies in the systemd journal (point/ structural/collective within a window, or _SYSTEMD_UNIT/PRIORITY distributional drift between two windows via --baseline-since). Pipes journald JSON on stdin so it sniffs as `journal`, and maps findings back to timestamp/unit/message. Building it surfaced a real roles gap: Role::Sequence required STRICT monotonicity, but journald clock columns (__REALTIME_TIMESTAMP etc.) tie/regress, so they were classed measurements and coll.cusum/point flagged their time-advancing "level shift" as noise. Fix: a `timestamp`/`ts` name token now classifies a column as Sequence (skipped by value detectors), kept narrow so response_time-style measurements are unaffected. cadence is role-agnostic, so --cadence on a "timestamp" column still works. No config_version change (classifier refinement, like 1.0.1's procid); goldens unaffected. Verified: journal example now shows real CPU_USAGE_NSEC spikes (not timestamp noise); drift mode flags unit/priority shifts. Gate: cargo-mutants 0-missed on roles.rs (39 caught); full workspace green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 22 minutes and 43 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
What
Adds
examples/journal_anomalies.py— a worked example of anomalyx on systemd-journal telemetry:--baseline-since→ distributional drift of_SYSTEMD_UNIT/PRIORITYbetween two windows.It pipes journald JSON on stdin (so it content-sniffs as
journal, not plain JSON) and maps each finding back to its timestamp / unit / message.The fix it surfaced
Building it exposed a real roles gap:
Role::Sequencerequired strict monotonicity, but journald clock columns (__REALTIME_TIMESTAMP,__MONOTONIC_TIMESTAMP, …) tie/regress just often enough to fail it — so they were classedmeasurement, andcoll.cusumflagged their "level shift" (time advancing) andpointtheir jumps. Pure noise.Fix: a
timestamp/tsname token now classifies a column assequence(skipped by the value detectors), kept deliberately narrow soresponse_time-style measurements (which you do want outliers on) are unaffected.cad.regularityis role-agnostic, so--cadence timestamp(beaconing) still works.No
config_versionchange — a classifier refinement, like 1.0.1'sprocid; goldens unaffected (scan_basichas no timestamp column).Verified
Journal example now shows real
CPU_USAGE_NSECspikes onuser@1000.service(modz ~10) instead of timestamp noise;--baseline-sinceflagsPRIORITY(KS) and_SYSTEMD_UNIT(χ²=122) drift between windows.Gate
cargo-mutants0 missed onroles.rs(39 caught / 1 unviable); fmt/clippy/full-workspace green. The example lives outside the Cargo workspace (no build/gate impact).🤖 Generated with Claude Code