Skip to content

feat(search): cross-session FTS search for triage context and prior art - #324

Draft
tstapler wants to merge 5 commits into
mainfrom
backlog/stapler-squad-session-search-fts5
Draft

feat(search): cross-session FTS search for triage context and prior art#324
tstapler wants to merge 5 commits into
mainfrom
backlog/stapler-squad-session-search-fts5

Conversation

@tstapler

@tstapler tstapler commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

When triaging a new backlog item, there's no way to see whether similar work has been attempted before — no visibility into prior decisions or failed approaches. This extends the existing BM25 history-search engine (SearchClaudeHistory, GetClaudeHistoryMessages, ListClaudeHistory) with session-level dedup, ±5-message context windows, best-effort automation-session exclusion, project scoping (with worktree resolution), and anchor-based scroll paging — all additive, wire-compatible extensions, not a new RPC (per this repo's own architecture-review precedent: adding a parallel SearchSessions RPC would have duplicated ~90% of the existing handler). Surfaces a "Find related past work" search box in the backlog triage panel.

Closes backlog item 3141f49f-5ea7-4839-a848-5670635bff9e.

What Changed

  • server/services/search_related_work.go (new): pure helper functions — groupResultsBySession, contextWindowAndBookends, isAutomationSession/filterAutomationSessions (also reused by ListClaudeHistory's new automation filter), resolvedProject/filterByProject (worktree-aware via live Instance.MainRepoPath)
  • server/services/search_service.go: wires the above into SearchClaudeHistory (project → automation → dedup → truncate → context-enrich, with oversampled raw fetch so a small limit doesn't starve dedup) and GetClaudeHistoryMessages (new anchor_index scroll paging + an out-of-bounds-offset bug fix), and adds exclude_automation_sessions to ListClaudeHistory
  • proto/session/v1/session.proto: additive optional fields only on SearchClaudeHistoryRequest/Response, GetClaudeHistoryMessagesRequest, ListClaudeHistoryRequest — existing callers (useHistoryFullTextSearch.ts, HistorySearchResults.tsx) see byte-identical behavior when unset
  • web-app/src/components/backlog/TriageRelatedWorkSection.tsx (new): the triage panel's search box — pre-populated with the item title, debounced, session-deduped, click-through opens /history?sessionId=&messageIndex= in a new tab via a real <a> element
  • web-app/src/app/history/page.tsx: reads that deep link via useSearchParams (wrapped in Suspense, matching this repo's own backlog/page.tsx precedent)
  • server/services/backlog_debug_seed_handler.go: small e2e-test-only addition (an ended flag) so the triage e2e spec can exercise the live (non-readOnly) TriageReviewPanel

Test plan

  • go build ./... — clean
  • go test ./server/services/... — all pass (dedup, context/bookend incl. a boundary-overlap regression, automation filtering on both SearchClaudeHistory and ListClaudeHistory, project scoping incl. worktree resolution, anchor paging incl. out-of-bounds regression)
  • go test ./... (full suite) — all packages pass
  • make lint — 0 issues
  • cd web-app && npx tsc --noEmit — clean
  • cd web-app && npx jest --no-coverage — 268 suites pass (2 pre-existing failures unrelated to this change, confirmed via git stash against the clean baseline)
  • make registry-diff — 0% divergence
  • cd tests/e2e && npx playwright test triage-related-work.spec.ts against a live isolated test server — both specs pass, including a deterministic click-through test (mocks the search RPC via page.route, same pattern vcs-widget.spec.ts already uses) verifying the result card opens a new tab anchored on the message index without disturbing the triage panel's own state
  • sdd:6-verify ran 4 parallel review agents (Go idioms, React idioms, architecture, refactor-candidates) — all MUST FIX findings resolved, including a real bookend-overlap correctness bug and an accessibility regression from a <label>/aria-label conflict I'd introduced
  • Automated backlog review — PASS on second cycle (first PARTIAL flagged the e2e click-through gap, fixed and re-reviewed)

🤖 Generated with Claude Code

https://claude.ai/code/session_01QFjiqYD6vPT9TV3TATahh7

tstapler and others added 3 commits August 3, 2026 10:50
…6.1)

sdd:6-verify's architecture review flagged that Story 1.6.1's GWT for the
no-live-Instance worktree case describes an outcome the plan's own literal
code sample never implements. Documents the deliberate shipped behavior
(exclude rather than keep) and why the two GWTs aren't simultaneously
satisfiable from entry.Project alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFjiqYD6vPT9TV3TATahh7
Extends SearchClaudeHistory/GetClaudeHistoryMessages/ListClaudeHistory with
additive fields for session-level dedup, ±5-message context windows with
bookends, best-effort automation-session exclusion (live Instance.Hidden),
project scoping with worktree resolution, and anchor-based scroll paging.
Surfaces a "Find related past work" search box in the backlog triage panel,
pre-populated with the item title, session-deduped and repo-scoped, with
click-through to the session's history page anchored on the matched message.

- server/services/search_related_work.go: pure helper functions (dedup,
  context window, automation/project filters), reused by both
  SearchClaudeHistory and the ListClaudeHistory browse-mode path
- proto: additive optional fields only, wire-compatible with existing callers
- web-app: TriageRelatedWorkSection.tsx composed into TriageReviewPanel,
  useHistoryFullTextSearch.ts extended additively, history/page.tsx gains
  a ?sessionId=&messageIndex= deep link
- backlog_debug_seed_handler.go: e2e-test-only `ended` seed flag so the
  triage e2e spec can exercise the live (non-readOnly) TriageReviewPanel

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFjiqYD6vPT9TV3TATahh7
The reviewer flagged that the e2e spec dropped the actual click-through
assertion AC #10 requires ("an e2e test covers the triage panel's
search-and-click-through flow end to end") — the prior spec only verified
the search box auto-populates, deliberately skipping the click assertion
because the real SearchClaudeHistory index build on a real dev machine's
~/.claude/projects tree is unbounded and non-deterministic.

Adds a second e2e test that mocks the SearchClaudeHistory ConnectRPC call
(page.route, an established pattern already used by vcs-widget.spec.ts) to
deterministically produce one hit, then verifies clicking the result card
opens a new tab at /history?sessionId=&messageIndex= and leaves the
original tab's triage panel state untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFjiqYD6vPT9TV3TATahh7
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

✅ Registry Validation

Registry Validation
===================

Building backend scanner...
Scanning backend features...
Wrote 117 feature files to /tmp/tmp.YdlibSqASP/backend
Wrote 15 feature files to /tmp/tmp.YdlibSqASP/backend
Wrote 45 feature files to /tmp/tmp.YdlibSqASP/backend
Wrote 8 feature files to /tmp/tmp.YdlibSqASP/backend
Wrote 12 feature files to /tmp/tmp.YdlibSqASP/backend

=== Backend Registry Diff ===
Committed: 181  Generated: 181  Divergence: 0.0%
⚠️  109 feature(s) missing // +api: marker (markerFound: false)

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 27/181 features have testIds (14.9%)

Divergence > 2% blocks merges. Coverage reporting is advisory only.

@tstapler

tstapler commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded: this branch's last known commit (654c601) is already present on main, so this item's work has already shipped through another path. No further fix is needed here.

@tstapler tstapler closed this Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Go Benchmarks (Tier 1)

benchmarks/go/tier1-baseline.txt:96: missing iteration count
benchmarks/go/tier1-baseline.txt:195: missing iteration count
tier1-bench.txt:98: missing iteration count
tier1-bench.txt:198: missing iteration count
goos: linux
goarch: amd64
pkg: github.com/tstapler/stapler-squad/session
cpu: AMD EPYC 7763 64-Core Processor                
                                            │ tier1-bench.txt │
                                            │     sec/op      │
CircularBufferWrite_4KB-4                         80.93n ± 0%
CircularBufferWrite_4KB_Allocs-4                  84.27n ± 0%
CircularBufferGetRecent_4KB-4                     505.9n ± 7%
CircularBufferGetAll-4                            3.786µ ± 3%
GetTimeSinceLastMeaningfulOutput_HotPath-4        65.78n ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4       32.76n ± 0%
geomean                                           174.4n

                                            │ tier1-bench.txt │
                                            │      B/op       │
CircularBufferWrite_4KB-4                        0.000 ± 0%
CircularBufferWrite_4KB_Allocs-4                 0.000 ± 0%
CircularBufferGetRecent_4KB-4                  4.000Ki ± 0%
CircularBufferGetAll-4                         40.00Ki ± 0%
GetTimeSinceLastMeaningfulOutput_HotPath-4       0.000 ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4      0.000 ± 0%
geomean                                                     ¹
¹ summaries must be >0 to compute geomean

                                            │ tier1-bench.txt │
                                            │    allocs/op    │
CircularBufferWrite_4KB-4                        0.000 ± 0%
CircularBufferWrite_4KB_Allocs-4                 0.000 ± 0%
CircularBufferGetRecent_4KB-4                    1.000 ± 0%
CircularBufferGetAll-4                           1.000 ± 0%
GetTimeSinceLastMeaningfulOutput_HotPath-4       0.000 ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4      0.000 ± 0%
geomean                                                     ¹
¹ summaries must be >0 to compute geomean

                              │ tier1-bench.txt │
                              │       B/s       │
CircularBufferWrite_4KB-4          47.14Gi ± 0%
CircularBufferGetRecent_4KB-4      7.540Gi ± 7%
geomean                            18.85Gi

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                            │ benchmarks/go/tier1-baseline.txt │
                                            │              sec/op              │
CircularBufferWrite_4KB-4                                          184.4n ± 5%
CircularBufferWrite_4KB_Allocs-4                                   180.4n ± 3%
CircularBufferGetRecent_4KB-4                                      747.6n ± 8%
CircularBufferGetAll-4                                             5.172µ ± 8%
GetTimeSinceLastMeaningfulOutput_HotPath-4                         50.37n ± 1%
GetTimeSinceLastMeaningfulOutput_ColdPath-4                        25.64n ± 0%
geomean                                                            234.5n

                                            │ benchmarks/go/tier1-baseline.txt │
                                            │               B/op               │
CircularBufferWrite_4KB-4                                         0.000 ± 0%
CircularBufferWrite_4KB_Allocs-4                                  0.000 ± 0%
CircularBufferGetRecent_4KB-4                                   4.000Ki ± 0%
CircularBufferGetAll-4                                          40.00Ki ± 0%
GetTimeSinceLastMeaningfulOutput_HotPath-4                        0.000 ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4                       0.000 ± 0%
geomean                                                                      ¹
¹ summaries must be >0 to compute geomean

                                            │ benchmarks/go/tier1-baseline.txt │
                                            │            allocs/op             │
CircularBufferWrite_4KB-4                                         0.000 ± 0%
CircularBufferWrite_4KB_Allocs-4                                  0.000 ± 0%
CircularBufferGetRecent_4KB-4                                     1.000 ± 0%
CircularBufferGetAll-4                                            1.000 ± 0%
GetTimeSinceLastMeaningfulOutput_HotPath-4                        0.000 ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4                       0.000 ± 0%
geomean                                                                      ¹
¹ summaries must be >0 to compute geomean

                              │ benchmarks/go/tier1-baseline.txt │
                              │               B/s                │
CircularBufferWrite_4KB-4                           20.68Gi ± 4%
CircularBufferGetRecent_4KB-4                       5.103Gi ± 9%
geomean                                             10.27Gi

pkg: github.com/tstapler/stapler-squad/session/detection/ratelimit
cpu: AMD EPYC 7763 64-Core Processor                
                              │ tier1-bench.txt │
                              │     sec/op      │
StripANSI_PlainText-4               6.868n ± 0%
StripANSI_WithEscapes-4             746.4n ± 0%
ProcessOutput_InactiveState-4       6.317n ± 1%
geomean                             31.87n

                              │ tier1-bench.txt │
                              │      B/op       │
StripANSI_PlainText-4              0.000 ± 0%
StripANSI_WithEscapes-4            136.0 ± 0%
ProcessOutput_InactiveState-4      0.000 ± 0%
geomean                                       ¹
¹ summaries must be >0 to compute geomean

                              │ tier1-bench.txt │
                              │    allocs/op    │
StripANSI_PlainText-4              0.000 ± 0%
StripANSI_WithEscapes-4            5.000 ± 0%
ProcessOutput_InactiveState-4      0.000 ± 0%
geomean                                       ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                              │ benchmarks/go/tier1-baseline.txt │
                              │              sec/op              │
StripANSI_PlainText-4                                6.791n ± 0%
StripANSI_WithEscapes-4                              706.3n ± 1%
ProcessOutput_InactiveState-4                        17.04n ± 0%
geomean                                              43.40n

                              │ benchmarks/go/tier1-baseline.txt │
                              │               B/op               │
StripANSI_PlainText-4                               0.000 ± 0%
StripANSI_WithEscapes-4                             136.0 ± 0%
ProcessOutput_InactiveState-4                       0.000 ± 0%
geomean                                                        ¹
¹ summaries must be >0 to compute geomean

                              │ benchmarks/go/tier1-baseline.txt │
                              │            allocs/op             │
StripANSI_PlainText-4                               0.000 ± 0%
StripANSI_WithEscapes-4                             5.000 ± 0%
ProcessOutput_InactiveState-4                       0.000 ± 0%
geomean                                                        ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/tstapler/stapler-squad/session/queue
cpu: AMD EPYC 7763 64-Core Processor                
                              │ tier1-bench.txt │
                              │     sec/op      │
ReviewQueue_ConcurrentReads-4       83.02n ± 2%
ReviewQueue_Add-4                   507.8n ± 5%
geomean                             205.3n

                              │ tier1-bench.txt │
                              │      B/op       │
ReviewQueue_ConcurrentReads-4      0.000 ± 0%
ReviewQueue_Add-4                  640.0 ± 0%
geomean                                       ¹
¹ summaries must be >0 to compute geomean

                              │ tier1-bench.txt │
                              │    allocs/op    │
ReviewQueue_ConcurrentReads-4      0.000 ± 0%
ReviewQueue_Add-4                  4.000 ± 0%
geomean                                       ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                              │ benchmarks/go/tier1-baseline.txt │
                              │              sec/op              │
ReviewQueue_ConcurrentReads-4                        81.70n ± 4%
ReviewQueue_Add-4                                    494.8n ± 1%
geomean                                              201.1n

                              │ benchmarks/go/tier1-baseline.txt │
                              │               B/op               │
ReviewQueue_ConcurrentReads-4                       0.000 ± 0%
ReviewQueue_Add-4                                   640.0 ± 0%
geomean                                                        ¹
¹ summaries must be >0 to compute geomean

                              │ benchmarks/go/tier1-baseline.txt │
                              │            allocs/op             │
ReviewQueue_ConcurrentReads-4                       0.000 ± 0%
ReviewQueue_Add-4                                   4.000 ± 0%
geomean                                                        ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/tstapler/stapler-squad/session/scrollback
cpu: AMD EPYC 7763 64-Core Processor                
                                      │ tier1-bench.txt │
                                      │     sec/op      │
CircularBuffer_ConcurrentReadWrite-4        3.859µ ± 2%
CircularBuffer_BurstAppend-4                101.9µ ± 0%
CircularBuffer_GetLastN_LargeBuffer-4       22.09µ ± 9%
CircularBuffer_GetRange_Sequential-4        14.64µ ± 9%
CircularBufferAppend-4                      99.06n ± 1%
CircularBufferGetLastN-4                    2.636µ ± 3%
CircularBufferConcurrentAppend-4            131.3n ± 1%
geomean                                     3.310µ

                                      │ tier1-bench.txt │
                                      │      B/op       │
CircularBuffer_ConcurrentReadWrite-4       6.062Ki ± 0%
CircularBuffer_BurstAppend-4               62.50Ki ± 0%
CircularBuffer_GetLastN_LargeBuffer-4      56.00Ki ± 0%
CircularBuffer_GetRange_Sequential-4       28.00Ki ± 0%
CircularBufferAppend-4                       24.00 ± 0%
CircularBufferGetLastN-4                   6.000Ki ± 0%
CircularBufferConcurrentAppend-4             32.00 ± 0%
geomean                                    3.077Ki

                                      │ tier1-bench.txt │
                                      │    allocs/op    │
CircularBuffer_ConcurrentReadWrite-4         2.000 ± 0%
CircularBuffer_BurstAppend-4                1.000k ± 0%
CircularBuffer_GetLastN_LargeBuffer-4        1.000 ± 0%
CircularBuffer_GetRange_Sequential-4         1.000 ± 0%
CircularBufferAppend-4                       1.000 ± 0%
CircularBufferGetLastN-4                     1.000 ± 0%
CircularBufferConcurrentAppend-4             1.000 ± 0%
geomean                                      2.962

                             │ tier1-bench.txt │
                             │       B/s       │
CircularBuffer_BurstAppend-4      599.1Mi ± 0%

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                      │ benchmarks/go/tier1-baseline.txt │
                                      │              sec/op              │
CircularBuffer_ConcurrentReadWrite-4                         3.434µ ± 2%
CircularBuffer_BurstAppend-4                                 114.0µ ± 1%
CircularBuffer_GetLastN_LargeBuffer-4                        22.56µ ± 1%
CircularBuffer_GetRange_Sequential-4                         12.63µ ± 5%
CircularBufferAppend-4                                       109.1n ± 0%
CircularBufferGetLastN-4                                     2.408µ ± 2%
CircularBufferConcurrentAppend-4                             155.2n ± 1%
geomean                                                      3.331µ

                                      │ benchmarks/go/tier1-baseline.txt │
                                      │               B/op               │
CircularBuffer_ConcurrentReadWrite-4                        6.062Ki ± 0%
CircularBuffer_BurstAppend-4                                62.50Ki ± 0%
CircularBuffer_GetLastN_LargeBuffer-4                       56.00Ki ± 0%
CircularBuffer_GetRange_Sequential-4                        28.00Ki ± 0%
CircularBufferAppend-4                                        24.00 ± 0%
CircularBufferGetLastN-4                                    6.000Ki ± 0%
CircularBufferConcurrentAppend-4                              32.00 ± 0%
geomean                                                     3.077Ki

                                      │ benchmarks/go/tier1-baseline.txt │
                                      │            allocs/op             │
CircularBuffer_ConcurrentReadWrite-4                          2.000 ± 0%
CircularBuffer_BurstAppend-4                                 1.000k ± 0%
CircularBuffer_GetLastN_LargeBuffer-4                         1.000 ± 0%
CircularBuffer_GetRange_Sequential-4                          1.000 ± 0%
CircularBufferAppend-4                                        1.000 ± 0%
CircularBufferGetLastN-4                                      1.000 ± 0%
CircularBufferConcurrentAppend-4                              1.000 ± 0%
geomean                                                       2.962

                             │ benchmarks/go/tier1-baseline.txt │
                             │               B/s                │
CircularBuffer_BurstAppend-4                       535.2Mi ± 2%

pkg: github.com/tstapler/stapler-squad/session/tmux
cpu: AMD EPYC 7763 64-Core Processor                
                             │ tier1-bench.txt │
                             │     sec/op      │
StripANSICodes_PlainText-4         6.878n ± 2%
StripANSICodes_WithEscapes-4       689.2n ± 0%
IsBanner_PlainText-4               477.2n ± 0%
geomean                            131.3n

                             │ tier1-bench.txt │
                             │      B/op       │
StripANSICodes_PlainText-4        0.000 ± 0%
StripANSICodes_WithEscapes-4      56.00 ± 0%
IsBanner_PlainText-4              0.000 ± 0%
geomean                                      ¹
¹ summaries must be >0 to compute geomean

                             │ tier1-bench.txt │
                             │    allocs/op    │
StripANSICodes_PlainText-4        0.000 ± 0%
StripANSICodes_WithEscapes-4      4.000 ± 0%
IsBanner_PlainText-4              0.000 ± 0%
geomean                                      ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                             │ benchmarks/go/tier1-baseline.txt │
                             │              sec/op              │
StripANSICodes_PlainText-4                          6.755n ± 0%
StripANSICodes_WithEscapes-4                        668.9n ± 1%
IsBanner_PlainText-4                                457.2n ± 0%
geomean                                             127.4n

                             │ benchmarks/go/tier1-baseline.txt │
                             │               B/op               │
StripANSICodes_PlainText-4                         0.000 ± 0%
StripANSICodes_WithEscapes-4                       56.00 ± 0%
IsBanner_PlainText-4                               0.000 ± 0%
geomean                                                       ¹
¹ summaries must be >0 to compute geomean

                             │ benchmarks/go/tier1-baseline.txt │
                             │            allocs/op             │
StripANSICodes_PlainText-4                         0.000 ± 0%
StripANSICodes_WithEscapes-4                       4.000 ± 0%
IsBanner_PlainText-4                               0.000 ± 0%
geomean                                                       ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/tstapler/stapler-squad/session/tokens
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ tier1-bench.txt │
                                   │     sec/op      │
TokenParser_ProcessUserEntry-4           5.216m ± 2%
DetectCommandsInText/NoSlash-4           7.497n ± 0%
DetectCommandsInText/WithCommand-4       1.657µ ± 0%
geomean                                  4.017µ

                                   │ tier1-bench.txt │
                                   │      B/op       │
TokenParser_ProcessUserEntry-4        1.060Mi ± 4%
DetectCommandsInText/NoSlash-4          0.000 ± 0%
DetectCommandsInText/WithCommand-4      433.0 ± 0%
geomean                                            ¹
¹ summaries must be >0 to compute geomean

                                   │ tier1-bench.txt │
                                   │    allocs/op    │
TokenParser_ProcessUserEntry-4          33.00 ± 0%
DetectCommandsInText/NoSlash-4          0.000 ± 0%
DetectCommandsInText/WithCommand-4      6.000 ± 0%
geomean                                            ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ benchmarks/go/tier1-baseline.txt │
                                   │              sec/op              │
TokenParser_ProcessUserEntry-4                            3.913m ± 0%
DetectCommandsInText/NoSlash-4                            6.622n ± 0%
DetectCommandsInText/WithCommand-4                        1.603µ ± 0%
geomean                                                   3.463µ

                                   │ benchmarks/go/tier1-baseline.txt │
                                   │               B/op               │
TokenParser_ProcessUserEntry-4                         1.050Mi ± 3%
DetectCommandsInText/NoSlash-4                           0.000 ± 0%
DetectCommandsInText/WithCommand-4                       433.0 ± 0%
geomean                                                             ¹
¹ summaries must be >0 to compute geomean

                                   │ benchmarks/go/tier1-baseline.txt │
                                   │            allocs/op             │
TokenParser_ProcessUserEntry-4                           33.00 ± 0%
DetectCommandsInText/NoSlash-4                           0.000 ± 0%
DetectCommandsInText/WithCommand-4                       6.000 ± 0%
geomean                                                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/tstapler/stapler-squad/session/unfinished
cpu: AMD EPYC 7763 64-Core Processor                
                               │ tier1-bench.txt │
                               │     sec/op      │
DiffShortstat/GitVCSReader-4         3.165m ± 1%
DiffShortstat/GoGitVCSReader-4       76.87n ± 0%
DiffShortstatCached-4                75.62n ± 0%
geomean                              2.640µ

                               │ tier1-bench.txt │
                               │      B/op       │
DiffShortstat/GitVCSReader-4      62.57Ki ± 0%
DiffShortstat/GoGitVCSReader-4      0.000 ± 0%
DiffShortstatCached-4               0.000 ± 0%
geomean                                        ¹
¹ summaries must be >0 to compute geomean

                               │ tier1-bench.txt │
                               │    allocs/op    │
DiffShortstat/GitVCSReader-4        360.0 ± 0%
DiffShortstat/GoGitVCSReader-4      0.000 ± 0%
DiffShortstatCached-4               0.000 ± 0%
geomean                                        ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                               │ benchmarks/go/tier1-baseline.txt │
                               │              sec/op              │
DiffShortstat/GitVCSReader-4                          2.334m ± 1%
DiffShortstat/GoGitVCSReader-4                        59.68n ± 0%
DiffShortstatCached-4                                 60.31n ± 6%
geomean                                               2.033µ

                               │ benchmarks/go/tier1-baseline.txt │
                               │               B/op               │
DiffShortstat/GitVCSReader-4                       62.56Ki ± 0%
DiffShortstat/GoGitVCSReader-4                       0.000 ± 0%
DiffShortstatCached-4                                0.000 ± 0%
geomean                                                         ¹
¹ summaries must be >0 to compute geomean

                               │ benchmarks/go/tier1-baseline.txt │
                               │            allocs/op             │
DiffShortstat/GitVCSReader-4                         360.0 ± 0%
DiffShortstat/GoGitVCSReader-4                       0.000 ± 0%
DiffShortstatCached-4                                0.000 ± 0%
geomean                                                         ¹
¹ summaries must be >0 to compute geomean

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

E2E RPC Latency

list-sessions-ttfb-mean: 7ms (▼ faster -2.2%; baseline: 7ms)
list-sessions-total-mean: 11ms (▼ faster -19.7%; baseline: 13ms)

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Frontend Terminal Throughput

terminal-throughput-mean: 14 KB/s ▲ +2.3% (baseline: 14 KB/s)
terminal-throughput-p50: 16 KB/s ▲ +1.1% (baseline: 16 KB/s)

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

UX Analysis

Check Status Details
✅ Axe Core (WCAG 2.1 AA) success Critical/serious violations block merge
⚠️ Lighthouse Performance Score: unknown Warning if < 70 (non-blocking)
🤖 Claude UX Analysis Advisory See docs/qa/ for findings

Axe Core excludes terminal rendering areas (intentional design).
Lighthouse runs in desktop preset for this developer tool.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎬 E2E Feature Demos

2 shard(s) recorded feature flows for this PR.

recordings shard 1
recordings shard 2

Demo preview opens directly in browser (single-file HTML). Raw WebM recordings in ZIP. Expires after 30 days.

- Fix TestGetClaudeHistoryMessages_AnchorIndexCentersWindow: it only
  asserted message count/length, which would pass even if anchor-centering
  were silently broken (all seeded messages had identical content). Now
  asserts actual window position via unique per-message content.
- Remove a vacuous not.toHaveFocus() assertion in the empty-itemTitle test
  (nothing in the component ever sets focus, so it was always true) and add
  a real, dedicated focus-management test with populated results instead.
- Drop includeContext:true from the triage panel's search query: the
  backend context_window/bookend fields it fetches are parsed by the hook
  but never rendered by SessionHitCard (v1 ships snippet-only cards per
  project_plans/session-search-fts5/design/ux.md) — was paying a full
  conversation-file read per hit on every debounced keystroke for unused
  data.
- Parallelize per-hit context-window enrichment (enrichWithContext) so
  future callers that do set include_context don't pay N sequential
  full-file reads.
- Extract SearchClaudeHistory's project/automation/dedup/truncate/context
  pipeline into applyResultPostProcessing, shrinking the handler and making
  the pipeline unit-testable independent of the RPC.
- DRY up three identical filter-in-place loops (filterAutomationSessions,
  filterByProject, filterHistoryEntriesByAutomation) into a shared
  filterInPlace[T] generic, per this repo's own
  interface-pollution-checklist rule 5 (generalize once 2+ call sites need
  identical logic — now three do).
- Reject offset>0 combined with group_by_session/exclude_automation_sessions/
  project (previously just a documented, unenforced limitation) and reject
  anchor_index+tail combined (previously an unenforced "mutually exclusive"
  comment), each with CodeInvalidArgument, plus regression tests for both.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFjiqYD6vPT9TV3TATahh7
@tstapler tstapler reopened this Aug 7, 2026
@tstapler

tstapler commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Reopening — the auto-close was a false positive. 654c6012fe33289f904d77b13aa4d1c71ab216b1 is not an ancestor of main (git merge-base --is-ancestor confirms), and none of this PR's files (e.g. server/services/search_related_work.go) exist on main. This branch (backlog/stapler-squad-session-search-fts5) was previously reused across many unrelated sessions' planning-only commits before this session's work — 654c601 was the tip of that unrelated history, not evidence this feature shipped. Possibly related to the false-positive class the very latest main commit (0bbb46f, "fix(backlog): closeIfSupersededByMain false-positives on empty BaseCommitSha") addresses, but apparently not this exact case.

…-session-search-fts5-ship

# Conflicts:
#	web-app/src/gen/session/v1/session_pb.ts
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✅ Registry Validation

Registry Validation
===================

Building backend scanner...
Scanning backend features...
Wrote 117 feature files to /tmp/tmp.ADdHIybjCX/backend
Wrote 15 feature files to /tmp/tmp.ADdHIybjCX/backend
Wrote 45 feature files to /tmp/tmp.ADdHIybjCX/backend
Wrote 8 feature files to /tmp/tmp.ADdHIybjCX/backend
Wrote 12 feature files to /tmp/tmp.ADdHIybjCX/backend

=== Backend Registry Diff ===
Committed: 181  Generated: 181  Divergence: 0.0%
⚠️  109 feature(s) missing // +api: marker (markerFound: false)

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 27/181 features have testIds (14.9%)

Divergence > 2% blocks merges. Coverage reporting is advisory only.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📊 Feature E2E Coverage

Feature coverage report unavailable

Run make e2e-report locally to view the full Allure report.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✅ Registry Validation

Registry Validation
===================

Building backend scanner...
Scanning backend features...
Wrote 117 feature files to /tmp/tmp.ZUhdgHKIwO/backend
Wrote 15 feature files to /tmp/tmp.ZUhdgHKIwO/backend
Wrote 46 feature files to /tmp/tmp.ZUhdgHKIwO/backend
Wrote 8 feature files to /tmp/tmp.ZUhdgHKIwO/backend
Wrote 14 feature files to /tmp/tmp.ZUhdgHKIwO/backend
Wrote 6 feature files to /tmp/tmp.ZUhdgHKIwO/backend

=== Backend Registry Diff ===
Committed: 186  Generated: 186  Divergence: 0.0%
⚠️  109 feature(s) missing // +api: marker (markerFound: false)

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 36/186 features have testIds (19.4%)

Divergence > 2% blocks merges. Coverage reporting is advisory only.

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