session-search[31]: add needs_further_review filter and response field (#67754)

* session-search[31]: replace needs_further_review bool with enum reason filter

Replaces the optional bool needs_further_review filter on both
SearchSessionSummariesParams and SearchSessionSummariesRequest with
repeated NeedsReviewReason filter_needs_further_review_reasons, letting
callers narrow results to sessions flagged for specific reasons rather
than any-or-none. The access graph and public API protos are regenerated
accordingly, and the enterprise service layer is updated to forward the
new field.

tctl recordings search replaces --[no-]needs-review with --review-reason,
a Kingpin enum flag accepting individual reason names or all to match any
flagged session. The valid values live in reviewReasonNames, a single map
that drives both flag validation and proto enum conversion. A parity test
asserts that reviewReasonNames contains exactly one entry per
non-UNSPECIFIED NeedsReviewReason value, so adding a proto reason without
wiring it into the CLI fails the test.

* fix test

* update docs
This commit is contained in:
Tiago Silva
2026-07-03 12:17:55 +00:00
committed by GitHub
parent 9a7052e25f
commit e15fd609d4
11 changed files with 604 additions and 271 deletions
+14
View File
@@ -197,6 +197,10 @@ message SearchSessionSummariesParams {
// the full hybrid pipeline. SEARCH_MODE_KEYWORD_ONLY uses only full-text
// matching; SEARCH_MODE_EMBEDDING_ONLY uses only vector similarity.
SearchMode search_mode = 15;
// filter_needs_further_review_reasons restricts results to sessions that have
// at least one of the given review reasons. An empty list disables this filter.
repeated teleport.summarizer.v1.NeedsReviewReason filter_needs_further_review_reasons = 16;
}
// EmbeddedQuery pairs a free-text query with its pre-computed vector embedding,
@@ -410,6 +414,11 @@ message SessionSummary {
// host_id is the unique identifier of the host where the session occurred.
string host_id = 17;
// needs_further_review_reasons contains the reasons why this session was
// flagged as requiring further human review by the summarizer. Empty when the
// session was not flagged.
repeated teleport.summarizer.v1.NeedsReviewReason needs_further_review_reasons = 18;
}
// StoreSessionSummaryRequest is sent to store a session summary along with
@@ -477,6 +486,11 @@ message StoreSessionSummaryRequest {
// embeddings are the semantic vector embeddings of the session summary,
// used for similarity-based search queries.
repeated EmbeddingChunk embeddings = 18;
// needs_further_review_reasons contains the reasons why this session needs
// further review, as determined by the summarizer. Empty when the session was
// not flagged.
repeated teleport.summarizer.v1.NeedsReviewReason needs_further_review_reasons = 19;
}
// EmbeddingChunk represents a semantic vector embedding for a text chunk from the