An operator answers why an agent acted via global Explore and a world-class provenance Trace Inspector.
Milestone 4.D.2 — Explore & Provenance Trace Inspector
Status: In progress (evidence-partial) — PR #911 / issue #910. Residual register: infra/assurance/p6/d2-residual-register.json. Hosted P6 gates remain open; do not treat local contract tests as slice certification.
Outcome: An operator answers why an agent acted without first choosing an agent or session, using joinable evidence and an honest Trace Inspector.
Track: Track D — Operator Capability Slices
Dependencies: 4.D.1; 4.P.2 (canonical evidence + Trace Inspector must-fix checklist); 4.P.3 field policy; 4.P.4 query grammar; 4.C.5 release-evidence soak for streaming claims
Estimated effort: 4 weeks
Why this milestone exists
This is the differentiated product wedge: an auditable context-and-policy provenance debugger, not a generic APM clone (F4-003, F4-009).
Purpose
Make Explore and Trace Inspector useful without overstating what the evidence plane can prove. Start with metadata and progressively disclose richer provenance only after each contract and assurance gate closes.
Dependencies
4.D.1 real authenticated shell and D1 contracts; 4.P.2 canonical evidence and Trace Inspector must-fix checklist; 4.P.3 field policy; 4.P.4 query grammar; and 4.C.5 release-evidence soak for streaming claims.
Scope
Explore
Global query bar with autocomplete, facets, saved-view-ready URL grammar, results for traces/sessions/failures, preserve list filters when opening detail.
Trace Inspector — three-layer progressive disclosure
- Summary strip: agent/session/model/provider, tokens, latency stages (label unavailable stages), completeness/sampling/freshness/retention badges.
- Candidate matrix: sortable rows with score contribution, rank, Δrank vs similarity, category, tokens, disposition; exclusion groups Included / Budget-excluded / Filtered / Failed.
- Explain tree (selected item): additive waterfall or stacked contribution for composite weights
0.40 / 0.25 / 0.20 / 0.10 / 0.05; keep score / rank / resource / outcome semantics separate.
Also: timeline/flame view, directive+routing decision links, tools timeline, model/fallback, evaluation links, redacted JSON, copy-link, bidirectional pivots.
Reproducibility contract
Surface weights, half-lives, tokenizer/packing policy versions, replay status, and directive version hash used at inference time.
Deliverables
Explore query and URL grammar, metadata-first results, the three-layer Trace Inspector, provenance links, safe redacted views, and explicit completeness/freshness/retention state.
Non-goals
This milestone does not create missing trace/span evidence, claim complete raw conversation availability, enable replay or controlled actions, or substitute fixtures for backend provenance. Full-detail views remain disabled or explicitly degraded when joins, authorization, redaction, retention, or freshness evidence is incomplete.
Contract and data requirements
Stable Trace/Span DTO with server-enforced org_id scope; copyable IDs (trace_id, span_id, request_id, session_id, checkpoint_id); completeness, sampling, freshness, retention, provenance links. Org B lookups against Org A IDs return 404; searches return empty.
Product and UX requirements
Safe rendering of hostile prompt/tool content (F4-008). Never infer success from missing data. Live selection freezes before detail. Keyboard-safe panels; axe; screen-reader-visible status changes. Metadata-only launch before redacted expansions.
Non-functional requirements
Golden multi-step trace; point lookup by known IDs; query and page-load budgets; assembly correctness prerequisites F4-028–031 either fixed or residual-risk accepted with UI labels.
Verification gates
Golden-trace fixture asserts joinable summary, assembly stages, selected/excluded memories, conversation source state, tool events, and raw JSON authorization state. Cross-tenant denial. Accessibility suite. Performance budget report.
Acceptance evidence
Attach the closed-or-accepted P.2 must-fix record, OpenAPI/query-contract and runtime-DTO evidence, golden multi-step trace results, cross-tenant denial results, metadata-only degraded-mode screenshots, hostile-content/a11y reports, and performance/freshness/completeness evidence. A fixture is test evidence only; it is not production data evidence.
Completion rule
Complete only when the metadata-first inspector is backed by joinable, tenant-scoped contracts and all expanded fields carry provenance, freshness, completeness, retention, and authorization state. Any unresolved evidence gap must remain visibly degraded or disabled and have an owner or accepted residual risk.
Implementation sequence
- Close or explicitly accept the P.2 identity, join, field-policy, and publication gaps.
- Ship Explore query grammar and metadata-only results with stable URL state and cursor semantics.
- Add Trace Inspector summary and candidate/exclusion views, then enable provenance expansions only as evidence gates pass.
- Run hostile-content, accessibility, cross-tenant, performance, and rollback checks before enabling richer payloads.
Open questions
- What identity/cardinality rules govern request, trace, span, run, session, checkpoint, memory, directive, and usage-fact joins?
- Which fields may be shown in metadata-only mode, and what exact step-up policy governs redacted/raw expansion?
- What publication watermark and retention semantics are authoritative when ClickHouse projections lag or omit rows?
Rollout and rollback
Trigger: content expansion leaks, inspector latency/SLO breach, or cross-tenant provenance joins. Reversal: disable content expansion and restore metadata-only trace views. Verify: Explore lists remain available; expanded payloads stay redacted or hidden until the flag is restored.
Findings addressed
F4-003, F4-008, F4-009, F4-021–031.
Research depth
Further audit context (provenance only — roadmap and engineering pages are authoritative):
- Trace Inspector data-contract gaps
- Trace Inspector memory-assembly panel (UX)
- Composite-score memory-assembly panel
Exit checklist
- P.2 Trace Inspector must-fix checklist closed or residual-risk recorded.
- Three-layer UI + exclusion groups + weight contract implemented or fixture-proven.
- Golden multi-step + cross-tenant denial attached.
- Hostile-content and a11y evidence attached.
- Degraded fields explicitly labeled in UI and docs.
Last updated on