Skip to content

feat(reasoning): add deterministic explanation support levels - #22

Draft
CoreyLeath-code wants to merge 8 commits into
mainfrom
enhancement/explanation-support-status
Draft

feat(reasoning): add deterministic explanation support levels#22
CoreyLeath-code wants to merge 8 commits into
mainfrom
enhancement/explanation-support-status

Conversation

@CoreyLeath-code

@CoreyLeath-code CoreyLeath-code commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the safe, deterministic portion of #21: every log explanation now states whether it is supported by one detector signal or corroborated by two independent signals. The change does not infer causes, call a model, or manufacture a probabilistic confidence score.

Files changed

File Why
logsight/reasoning.py Adds a typed support_level to every deterministic evidence explanation.
logsight/cli.py Renders evidence strength and support level as literal CLI output.
tests/test_reasoning.py Covers single-signal and corroborated detector combinations.
tests/test_cli.py Verifies users see the support level with evidence-backed findings.
README.md Defines the support-level boundary without claiming model confidence.

Validation performed

GitHub Actions at commit da8e7ee940df39d1306109209d9a07515d5698fb:

  • CI passed: ruff format --check ., ruff check ., mypy, and pytest (58 passed, coverage 94.92%).
  • Benchmark passed: pytest tests/test_benchmarks.py --benchmark-only --benchmark-json=benchmarks/latest.json --no-cov.
  • Package/container passed: source distribution build, Docker build, Docker health command, and installed-package metadata validation.
  • Security passed: Bandit, pip-audit, license report, Gitleaks, and SBOM generation.
  • CodeQL passed.

Risks

  • The added dataclass field is a public API change for callers that instantiate EvidenceExplanation directly.
  • “Corroborated” means two recorded detector reasons on the same entry; it is not a causal conclusion or calibrated probability.

Follow-up recommendations

  1. Establish an approved evaluation corpus and label-review process before adding numeric confidence or causal ranking.
  2. Version any serialized explanation schema before external API consumers depend on it.
  3. Add operator feedback capture only after privacy and retention requirements are agreed.

NEEDS HUMAN DECISION

Approve the evaluation dataset, calibration definition, and privacy policy before any numeric confidence claim or user-feedback collection is introduced.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a2757adb-ebbb-4dda-b23a-a4b6c1e5b221

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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.

1 participant