feat: [ENG-1897] Create brv query-log view oclif command#347
feat: [ENG-1897] Create brv query-log view oclif command#347bao-byterover merged 2 commits intoproj/query-logfrom
Conversation
|
Claude finished @bao-byterover's task in 2m 33s —— View job PR Review: feat: [ENG-1897] Create brv query-log view oclif command
Overall Score: 4/5Good PR. The outside-in scaffolding is intentional and well-executed — stubs are clearly marked with follow-up ticket references (ENG-1887/1888/1889/1895/1896), the Issuessuggestion The // Current:
description: 'Show entries started before this time (ISO date or relative: 1h, 24h, 7d, 2w)',
// Should be:
description: 'Show entries started before this time (ISO date or relative: 30m, 1h, 24h, 7d, 2w)',Same fix needed for the issue The command imports // Current:
import {QUERY_LOG_STATUSES, QUERY_LOG_TIERS, type QueryLogStatus, type QueryLogTier}
from '../../../server/core/interfaces/storage/i-query-log-store.js'
// Cleaner:
import {QUERY_LOG_STATUSES, QUERY_LOG_TIERS, type QueryLogStatus, type QueryLogTier}
from '../../../server/core/domain/entities/query-log-entry.js'nitpick type QueryLogUseCaseDeps = {
queryLogStore: unknown // ← intentional stub, but easy to forget
terminal: Terminal
}The stub is understandable and clearly commented, but once queryLogStore: unknown // TODO(ENG-1888): replace with IQueryLogStore once interface is definednitpick The file only exports constants and derived types — no Praisepraise Extracting dependency construction into a praise export const QUERY_LOG_STATUSES = ['cancelled', 'completed', 'error', 'processing'] as const
export type QueryLogStatus = (typeof QUERY_LOG_STATUSES)[number]This is strictly better than praise Testing that |
|
Claude finished @bao-byterover's task in 2m 13s —— View job PR Review: feat: [ENG-1897] Create brv query-log view oclif command
|
* feat: [ENG-1897] Create brv query-log view oclif command (#347) * feat: [ENG-1897] Create brv query-log view oclif command * feat: [ENG-1897] fix review * feat: [ENG-1896] Implement QueryLogUseCase with list and detail views (#349) * feat: [ENG-1896] Implement QueryLogUseCase with list and detail views * feat: [ENG-1896] Fix review * feat: [ENG-1888] Define IQueryLogStore interface (#351) * feat: [ENG-1887] Define QueryLogEntry entity with discriminated union (#353) * feat: [ENG-1889] Implement FileQueryLogStore with Zod validation (#354) * feat: [ENG-1889] Implement FileQueryLogStore with Zod validation * feat: [ENG-1889] fix review * feat: [ENG-1899] Create brv query-log summary oclif command (#357) * feat: [ENG-1899] Create brv query-log summary oclif command * feat: [ENG-1899] fix review * feat: [ENG-1898] Implement QueryLogSummaryUseCase (#368) * feat: [ENG-1892] Add QueryExecutorResult type with tier and timing metadata (#369) * feat: [ENG-1893] Wire QueryLogHandler into daemon lifecycle (#370) * feat: [ENG-1894] Wire QueryLogHandler into daemon lifecycle (#371) * feat: [ENG-1894] enhance message output * feat: [proj/query-log] fix review * feat: [ENG-2123] brv curate view / brv query-log view truncate long c… (#424) * feat: [ENG-2123] brv curate view / brv query-log view truncate long content * feat: [ENG-2123] fix review * feat: [ENG-2177] Increase Storage Limit for Curate Log and Query Log (#430) * feat: [ENG-2177] Increase Storage Limit for Curate Log and Query Log * feat: [ENG-2177] fix review * feat: [ENG-2177] fix slow test --------- Co-authored-by: Hoang Pham <lehoangpham1092@gmail.com>

Summary
brv query-log viewgives instant, filterable access to query history without starting the daemon, unblocking the Query Recall Metrics & Value Visibility project (ms1).brv query-log viewoclif command with flags (--since,--before,--status,--tier,--limit,--format,--detail) and optional positionalidarg. ExtractedparseTimeFilterfromcurate/view.tsinto a shared utility (src/oclif/lib/time-filter.ts). Created stub domain types, interface, store, and use-case for downstream tickets (ENG-1887/1888/1889/1896) to implement.FileQueryLogStoreandQueryLogUseCaseare stubs. No daemon changes. No TUI changes.Type of change
Scope (select all touched areas)
Linked issues
Root cause (bug fixes only, otherwise write
N/A)N/A
Test plan
test/commands/query-log/view.test.ts-- command integration tests (flag parsing, store instantiation, use-case delegation, error handling)test/unit/oclif/lib/time-filter.test.ts-- unit tests forparseTimeFilter(relative: m/h/d/w, absolute: ISO date/datetime, invalid input)--limit,--format,--detail,--status,--tier,--since,--before) parsed and delegated individually--statusand--tierflags combinedidarg forwarded--since/--beforevalues exit with code 2createDependenciesinstantiates realQueryLogUseCasefromFileQueryLogStoreparseTimeFilter: relative (30m, 1h, 24h, 7d, 2w, 0m, 999d), absolute (date, datetime), invalid (empty, partial, unsupported unit)User-visible changes
brv query-log viewavailable (currently stubs -- outputs nothing until ENG-1896 implements use-case)parseTimeFilterextracted fromcurate/view.ts-- no behavior change for existingbrv curate viewEvidence
(Tests to be run by reviewer -- attach results here)
Checklist
npm test)npm run lint)npm run typecheck)npm run build)mainRisks and mitigations
IQueryLogUseCaseinterface that downstream tickets must fulfill -- type-checking catches driftparseTimeFilterextraction could breakcurate/view