Skip to content

feat: add deterministic session review projection core - #260

Open
harshitethic wants to merge 3 commits into
Siddhant-K-code:mainfrom
harshitethic:feat/session-review-projection
Open

harshitethic wants to merge 3 commits into
Siddhant-K-code:mainfrom
harshitethic:feat/session-review-projection

Conversation

@harshitethic

Copy link
Copy Markdown

Summary

Adds a dependency-free review projection layer for #242 so the local review UI can consume one deterministic representation of ordered evidence instead of re-implementing relationship and filter logic in the frontend.

What it provides

  • stable timestamp ordering with recorded source order as a tie breaker
  • explicit parent relationship state: none, linked, or orphaned
  • reviewer-oriented filters for files, tools, commands, tests, failures, retries, recovery, decisions, privacy transformations, and gaps
  • source event IDs, raw/provider-specific data, timestamps, parent IDs, and redaction state preserved for inspection
  • missing parents surfaced as gaps without inventing synthetic relationships
  • versioned dictionary serialization for future UI/API consumers

Trust boundary

The projector intentionally classifies only recorded facts. Semantic categories such as tests, commands, retries, and recovery require explicit event metadata; it does not guess them from command text or natural-language output. A clean projection therefore is not a claim of complete provider capture.

Tests

tests/test_review.py covers ordering, linked tool results, orphaned results, category filters, retry/recovery metadata, redaction/privacy visibility, and stable timestamp ties.

Documentation

docs/session-review-projection.md documents ordering, relationship semantics, filter rules, raw evidence preservation, and the no-inference boundary.

Scope

This is a focused core for #242, not a claim to close the UI issue. It does not yet replace the dashboard, render annotations, calculate evidence health, or add keyboard/URL navigation. Those layers can build on this projection without duplicating evidence semantics.

Validation

The implementation and tests are stdlib-only beyond AgentTrace's existing TraceEvent model. The connected development machine is currently offline, so I have not claimed local execution; upstream CI is the verification gate for this branch.

Refs #242.

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