feat: add deterministic evidence-health assessment core - #256
Open
harshitethic wants to merge 9 commits into
Open
feat: add deterministic evidence-health assessment core#256harshitethic wants to merge 9 commits into
harshitethic wants to merge 9 commits into
Conversation
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
Adds a dependency-free, versioned evidence-health core for captured agent sessions, plus focused tests and user-facing semantics documentation.
This is a scoped foundation for #240 rather than claiming the entire issue is complete. The PR intentionally implements the deterministic calculation layer first; wiring the result into every CLI/API/dashboard surface can build on this without duplicating health rules.
What the core detects
The result is versioned and machine-readable with
healthy,partial,unknown, andinvalidstates plus stable reason codes.Trust boundary
A key constraint from #240 is that a clean timeline must not be presented as proof of complete capture. This implementation therefore never guesses provider limitations from absent events. Provider blind spots must be supplied explicitly by the capture adapter / future capture matrix work (#239), and they are kept distinct from observed structural defects.
The empty-evidence path also preserves any observable export failures and declared provider blind spots instead of returning early and discarding those signals; the overall state remains
unknownbecause there is still no event stream to assess.That keeps the core local and dependency-free, matching the repository's architecture constraints.
Tests
tests/test_evidence_health.pycovers:Documentation
docs/evidence-health.mddocuments statuses, reason semantics, the distinction between observed defects and provider limitations, and what a healthy result does not claim.Scope / follow-ups
This PR does not claim to close #240 yet. Remaining integration work includes exposing the same result through the CLI/replay/API/dashboard and sourcing provider limitations from the capture matrix rather than ad-hoc callers. Keeping those integrations separate avoids inventing provider metadata before #239 defines it and avoids coupling the calculation engine to the dashboard work in #242.
Validation
The fork workflow is currently waiting for upstream approval, so CI has not executed yet. The implementation follows the repository's stdlib-only constraint and includes a dedicated unittest module. Once approved, CI is the authoritative full-repository validation.
Intended local commands:
python -m unittest discover -s tests -p 'test_evidence_health.py' -v python -m unittest discover -s tests -vNo runtime dependencies or storage-format changes are introduced.