feat(sensor): report bounded parser health and suspected format drift - #131
Open
barisozbas wants to merge 1 commit into
Open
barisozbas wants to merge 1 commit into
barisozbas wants to merge 1 commit into
Conversation
Summary: Add fixed-code parser recovery counters and per-source health summaries across all ten capture sources, including runs with no usable sessions. Keep operational records separate from captured telemetry and export them only with --otel-config. Rotate diagnostics.jsonl and error.log, record partial run failures, and add --fail-on-error for schedulers that need strict exit status. Document incomplete coverage, single-writer rotation, and unchanged legacy console output. This change builds on #130 and should merge after it. The PR targets its feature branch to keep the diagnostic diff separate; main-only CI will run after retargeting. Test Plan: Synthetic tests cover partial/zero-output failures, malformed records, expected live tails, missing inputs, log rotation, fixed-schema privacy, resource accounting, and in-memory OTLP health serialization. No real sessions or collectors are used. Revert Plan: Revert this commit to restore the previous error reporting and CLI exit behavior. Existing diagnostic files remain on disk and can be archived by the operator.
2 tasks
barisozbas
marked this pull request as ready for review
September 19, 2026 12:56
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
Add fixed-code parser recovery counters and per-source health summaries across
all ten capture sources, including runs with no usable sessions. Keep operational
records separate from captured telemetry and export them only with --otel-config.
Rotate diagnostics.jsonl and error.log, record partial run failures, and add
--fail-on-error for schedulers that need strict exit status. Document incomplete
coverage, single-writer rotation, and unchanged legacy console output.
This change builds on #130 and should merge after it. The PR targets its feature
branch to keep the diagnostic diff separate; main-only CI will run after retargeting.
What type of PR is this?
Related issue: None; sensor health monitoring.
Why? Parsers often recover locally from bad input without reporting the
failure to operators. Zero-output runs can therefore look healthy. These records
distinguish absent input, empty capture, expected skips, corruption, partial failure,
and explicitly unsupported formats without copying captured content into error logs.
Test Plan
Synthetic tests cover partial/zero-output failures, malformed records, expected
live tails, missing inputs, log rotation, fixed-schema privacy, resource accounting,
and in-memory OTLP health serialization. No real sessions or collectors are used.
413 sensor tests pass locally on Python 3.9 and 3.12. Ruff, whitespace checks,
source/wheel builds, and pre-publish validation pass. Platform-specific DSH and
Gemini CI tests pass on Linux, macOS, and Windows; the full CI matrix requires
retargeting to main after #130 merges.
Potential risks:
error.loggains a versioned health schema, and newdiagnostics.jsonlrecords are written even with--no-save. Rotation assumes oneactive writer per output directory. Drift is a hint, not a completeness guarantee;
some recovery paths and unknown record kinds remain unclassified. Legacy console
output and old error-log entries are unchanged. Captured telemetry is not redacted
or otherwise modified by the diagnostic schema.
Revert Plan
Revert this commit to restore the previous error reporting and CLI exit behavior.
Existing diagnostic files remain on disk and can be archived by the operator.