Skip to content

fix(backlog): sync PR branch with main before respawning a fix session#163

Merged
tstapler merged 3 commits into
mainfrom
worktree-agent-a0878367c2523521d
Jul 17, 2026
Merged

fix(backlog): sync PR branch with main before respawning a fix session#163
tstapler merged 3 commits into
mainfrom
worktree-agent-a0878367c2523521d

Conversation

@tstapler

@tstapler tstapler commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • AutoReopenForPRFix now proactively merges main into the PR's branch before respawning a fix session, instead of only describing the CI failure in a text note.
  • A clean merge is pushed straight back to the PR's branch on origin; a conflicting merge is aborted (leaving the worktree clean) and the conflicting files are folded into the fix context; an already-synced branch is a silent no-op.

Context

ReconcilePRPending detects CI failures, blocking reviews, and merge conflicts on pr_pending items and calls AutoReopenForPRFix to respawn an autonomous fix session. Previously this only told the respawned session about the failure via a text note — it never verified the branch was actually in sync with main. For CI failures caused by drift (a fix landing on main after the branch was created, or the branch simply going stale) this wasted the respawned session's effort diagnosing something a merge would resolve immediately, and left the PR exposed to the same "drifted from main until it hit a hard conflict" pattern that produced PR #157. The fix makes the sync a programmatic guarantee rather than a prompt instruction, per this codebase's established pattern (see docs/tasks/backlog-feature-improvement.md).

Changes

  • session/git/ops.go: new MergeMainIntoWorktree(worktreePath, mainBranch) — fetches and merges mainBranch, reporting UpToDate / Merged / Conflicted. Up-to-date detection compares HEAD before/after the merge (not merge-output text matching, which is locale/git-version fragile). On conflict it aborts the merge (git merge --abort) so the worktree is always left clean, and reports the conflicting file paths. Non-conflict merge failures (e.g. uncommitted local changes) and fetch failures are propagated as errors rather than misreported as a result state.
  • server/services/backlog_service_triage.go: new BacklogService.syncPRBranchWithMain, called from AutoReopenForPRFix before building the fix context. Finds the worktree behind the currently open PR (most recent completed work ItemSession), merges main into it, and pushes the merge when it brings in new commits. Best-effort — any failure is logged and swallowed, never blocking the fix spawn. The push-failure note gives an explicit git -C <repoPath> push origin <branch> command against the shared repo checkout (not the worktree, which gets cleaned up once the new fix session is spawned) since worktree cleanup never deletes the underlying branch ref.
  • Tests: session/git/ops_test.go (5 tests: up-to-date, clean merge, conflict+abort, fetch failure, non-conflict merge failure) and 7 tests in server/services/backlog_service_triage_test.go covering AutoReopenForPRFix's sync-and-push, push-failure, conflict-folds-into-context, sync-fetch-failure-swallowed, and up-to-date no-op paths end to end.

Impact

  • Scope: session/git and the backlog PR-fix respawn path (server/services/backlog_service_triage.go). Does not touch session/unfinished/gogitstore/ or the VCS widget — those are owned by other in-flight work.
  • Breaking Changes: none — additive, best-effort step ahead of an existing code path.
  • Performance: adds one fetch + merge (and occasionally a push) per PR-fix respawn; negligible relative to spawning a new session. See Known Limitations for a follow-up on bounding worst-case latency.
  • Dependencies: none new.

Testing

  • go test ./session/git/... (5 MergeMainIntoWorktree tests: up-to-date, clean merge, conflict, fetch failure, non-conflict merge failure)
  • go test ./server/services/... (full package, including 7 new AutoReopenForPRFix sync tests)
  • go test ./session/... (full package)
  • golangci-lint run ./session/git/... ./server/services/...
  • go vet ./session/git/... ./server/services/..., gofmt -l on all changed files

Reviewer Notes

  • Focus areas: syncPRBranchWithMain's worktree-lookup (findMostRecentSessions + GetWorktreeDataBySessionUUID) and the abort-on-conflict behavior in MergeMainIntoWorktree.
  • Known limitations (both pre-existing in this codebase, not introduced by this diff, and out of scope for this bounded fix — flagged here for transparency and tracked as follow-ups):
    1. SpawnSessionFromItem's reopen path always creates a brand-new branch/worktree off the shared repo's local HEAD (buildRevisionTitle appends -rN; see resolveSessionPath/CreateBacklogWorktree) rather than continuing the branch this PR just merged+pushed, and pushAndCreatePR's "reuse existing PR" check never verifies the new branch matches the tracked PR's head. This diff's sync still has real, standalone value — it keeps the currently open PR in sync with main on GitHub immediately (which can resolve or shrink a main-drift-caused CI failure before the new session even starts) — but for CI failures caused by the PR's own diff (the common case), the actual fix commits land on an unrelated branch. Full resolution requires redesigning branch continuity across reopen iterations, which is shared with AutoReopenAfterFailedReview and deserves its own investigation rather than a rushed change here.
    2. The sync step (fetch + merge + push) has no shared timeout ceiling and runs synchronously inside ReconcilePRPending's sequential per-item loop — worst case (~210s: 60s fetch + 60s merge + 30s abort + 60s push) could stall that tick if the remote is slow/hung. Bounded, not unbounded, and matches the existing timeout style used elsewhere in this file; a shared context.Context deadline threaded through MergeMainIntoWorktree would tighten this but wasn't done here to avoid a larger signature change under review-cycle time pressure.
    3. The branch to sync against is hardcoded as "main" (this repo's convention); no fallback to master/other default branches.

…a fix session

AutoReopenForPRFix respawns an autonomous session whenever ReconcilePRPending
detects a CI failure, blocking review, or merge conflict on a pr_pending item,
but it only ever told the new session about the failure via a text note — it
never actually resynced the branch with main first. A CI failure caused by
drift from main (a fix landing on main after the PR's branch was created, or
the branch simply going stale) wasted the respawned session's effort
diagnosing something a merge would have fixed outright, and left the PR
exposed to the same "developed a hard conflict with nobody proactively
resyncing it" pattern that produced PR #157.

AutoReopenForPRFix now merges main into the worktree behind the currently
open PR (found via the most recent completed work ItemSession) before
building the fix context:
  - a clean merge is pushed straight to the PR's branch on origin, so the
    live PR is resynced even before the new session starts;
  - a merge conflict is aborted immediately (via `git merge --abort`, leaving
    the worktree clean) and the conflicting file paths are folded into the
    fix context so resolving them against main becomes part of the fix;
  - an already-up-to-date branch is a silent no-op.

Adds session/git.MergeMainIntoWorktree (fetch + merge + conflict abort/report,
following the existing session/git/ops.go conventions) and
BacklogService.syncPRBranchWithMain, wired in as a best-effort step ahead of
the existing respawn — any sync failure is logged and swallowed, never
blocking the fix spawn.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Registry Validation

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

Building backend scanner...
Scanning backend features...
Wrote 116 feature files to /tmp/tmp.HZKI0zSbjy/backend
Wrote 14 feature files to /tmp/tmp.HZKI0zSbjy/backend
Wrote 38 feature files to /tmp/tmp.HZKI0zSbjy/backend
Wrote 6 feature files to /tmp/tmp.HZKI0zSbjy/backend
Wrote 10 feature files to /tmp/tmp.HZKI0zSbjy/backend

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

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 8/172 features have testIds (4.7%)

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

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

E2E RPC Latency

list-sessions-ttfb-mean: 8ms (▲ slower +41.1%; baseline: 6ms)
list-sessions-total-mean: 10ms (▲ slower +25.0%; baseline: 8ms)

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Go Benchmarks (Tier 1)

benchmarks/go/tier1-baseline.txt:98: missing iteration count
benchmarks/go/tier1-baseline.txt:199: 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                         83.17n ± 2%
CircularBufferWrite_4KB_Allocs-4                  83.72n ± 3%
CircularBufferGetRecent_4KB-4                     485.6n ± 1%
CircularBufferGetAll-4                            3.764µ ± 2%
GetTimeSinceLastMeaningfulOutput_HotPath-4        65.72n ± 0%
GetTimeSinceLastMeaningfulOutput_ColdPath-4       33.07n ± 0%
geomean                                           173.9n

                                            │ 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          45.87Gi ± 1%
CircularBufferGetRecent_4KB-4      7.855Gi ± 1%
geomean                            18.98Gi

cpu: AMD EPYC 9V74 80-Core Processor                
                                            │ benchmarks/go/tier1-baseline.txt │
                                            │              sec/op              │
CircularBufferWrite_4KB-4                                          62.90n ± 0%
CircularBufferWrite_4KB_Allocs-4                                   62.25n ± 0%
CircularBufferGetRecent_4KB-4                                      459.4n ± 2%
CircularBufferGetAll-4                                             3.196µ ± 2%
GetTimeSinceLastMeaningfulOutput_HotPath-4                         54.41n ± 1%
GetTimeSinceLastMeaningfulOutput_ColdPath-4                        26.77n ± 1%
geomean                                                            142.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                           60.65Gi ± 1%
CircularBufferGetRecent_4KB-4                       8.304Gi ± 2%
geomean                                             22.44Gi

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.867n ± 0%
StripANSI_WithEscapes-4             742.2n ± 0%
ProcessOutput_InactiveState-4       6.321n ± 0%
geomean                             31.82n

                              │ 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: AMD EPYC 9V74 80-Core Processor                
                              │ benchmarks/go/tier1-baseline.txt │
                              │              sec/op              │
StripANSI_PlainText-4                                5.481n ± 3%
StripANSI_WithEscapes-4                              513.1n ± 1%
ProcessOutput_InactiveState-4                        5.127n ± 0%
geomean                                              24.34n

                              │ 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       90.61n ± 6%
ReviewQueue_Add-4                   509.2n ± 3%
geomean                             214.8n

                              │ 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: AMD EPYC 9V74 80-Core Processor                
                              │ benchmarks/go/tier1-baseline.txt │
                              │              sec/op              │
ReviewQueue_ConcurrentReads-4                        63.90n ± 0%
ReviewQueue_Add-4                                    396.2n ± 2%
geomean                                              159.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.710µ ± 1%
CircularBuffer_BurstAppend-4                101.2µ ± 0%
CircularBuffer_GetLastN_LargeBuffer-4       19.69µ ± 0%
CircularBuffer_GetRange_Sequential-4        10.68µ ± 1%
CircularBufferAppend-4                      97.88n ± 1%
CircularBufferGetLastN-4                    2.237µ ± 1%
CircularBufferConcurrentAppend-4            123.4n ± 1%
geomean                                     2.990µ

                                      │ 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      602.8Mi ± 1%

cpu: AMD EPYC 9V74 80-Core Processor                
                                      │ benchmarks/go/tier1-baseline.txt │
                                      │              sec/op              │
CircularBuffer_ConcurrentReadWrite-4                        2.819µ ±  3%
CircularBuffer_BurstAppend-4                                83.06µ ±  1%
CircularBuffer_GetLastN_LargeBuffer-4                       15.79µ ±  1%
CircularBuffer_GetRange_Sequential-4                        11.61µ ± 13%
CircularBufferAppend-4                                      84.30n ±  1%
CircularBufferGetLastN-4                                    2.019µ ±  3%
CircularBufferConcurrentAppend-4                            106.6n ±  1%
geomean                                                     2.588µ

                                      │ 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                       734.9Mi ± 1%

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

                             │ 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: AMD EPYC 9V74 80-Core Processor                
                             │ benchmarks/go/tier1-baseline.txt │
                             │              sec/op              │
StripANSICodes_PlainText-4                          5.737n ± 0%
StripANSICodes_WithEscapes-4                        476.5n ± 1%
IsBanner_PlainText-4                                363.5n ± 1%
geomean                                             99.79n

                             │ 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.274m ± 1%
DetectCommandsInText/NoSlash-4           7.494n ± 0%
DetectCommandsInText/WithCommand-4       1.736µ ± 1%
geomean                                  4.094µ

                                   │ tier1-bench.txt │
                                   │      B/op       │
TokenParser_ProcessUserEntry-4        11.02Mi ± 0%
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          34.00 ± 0%
DetectCommandsInText/NoSlash-4          0.000 ± 0%
DetectCommandsInText/WithCommand-4      6.000 ± 0%
geomean                                            ¹
¹ summaries must be >0 to compute geomean

cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmarks/go/tier1-baseline.txt │
                                   │              sec/op              │
TokenParser_ProcessUserEntry-4                            4.412m ± 1%
DetectCommandsInText/NoSlash-4                            5.183n ± 5%
DetectCommandsInText/WithCommand-4                        1.171µ ± 1%
geomean                                                   2.992µ

                                   │ benchmarks/go/tier1-baseline.txt │
                                   │               B/op               │
TokenParser_ProcessUserEntry-4                         11.02Mi ± 0%
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                           34.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.074m ± 0%
DiffShortstat/GoGitVCSReader-4       76.82n ± 0%
DiffShortstatCached-4                76.58n ± 0%
geomean                              2.625µ

                               │ tier1-bench.txt │
                               │      B/op       │
DiffShortstat/GitVCSReader-4      56.56Ki ± 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: AMD EPYC 9V74 80-Core Processor                
                               │ benchmarks/go/tier1-baseline.txt │
                               │              sec/op              │
DiffShortstat/GitVCSReader-4                          2.687m ± 2%
DiffShortstat/GoGitVCSReader-4                        62.82n ± 2%
DiffShortstatCached-4                                 64.21n ± 1%
geomean                                               2.213µ

                               │ benchmarks/go/tier1-baseline.txt │
                               │               B/op               │
DiffShortstat/GitVCSReader-4                       56.58Ki ± 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 Jul 17, 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.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Frontend Terminal Throughput

terminal-throughput-mean: 16 KB/s ▲ +0.6% (baseline: 16 KB/s)
terminal-throughput-p50: 16 KB/s ▼ -1.4% (baseline: 16 KB/s)

Code review on the branch-sync fix (PR #163) surfaced two MAJOR issues, now
fixed, plus test-coverage gaps, now filled:

- session/git/ops.go: MergeMainIntoWorktree detected an up-to-date merge by
  substring-matching git's merge output ("Already up to date"), which is
  locale- and git-version-fragile (older git prints "Already up-to-date.").
  Now compares HEAD before/after the merge via the package's existing
  getHeadCommitSHA helper instead.

- backlog_service_triage.go: the push-failure note told the next fix session
  to "push it before continuing," but that session gets a brand-new worktree
  (SpawnSessionFromItem always creates one fresh on reopen), not the one the
  merge landed in — the instruction wasn't actionable from there. The note
  now names the branch and gives an explicit `git -C <repoPath> push origin
  <branch>` command against the shared repo checkout, whose branch ref
  survives worktree cleanup.

- Added missing coverage: fetch failure and non-conflict merge failure in
  session/git/ops_test.go; push failure after a successful merge and a
  swallowed sync-fetch failure in backlog_service_triage_test.go.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Registry Validation

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

Building backend scanner...
Scanning backend features...
Wrote 116 feature files to /tmp/tmp.o6HWnKpBfh/backend
Wrote 14 feature files to /tmp/tmp.o6HWnKpBfh/backend
Wrote 38 feature files to /tmp/tmp.o6HWnKpBfh/backend
Wrote 6 feature files to /tmp/tmp.o6HWnKpBfh/backend
Wrote 10 feature files to /tmp/tmp.o6HWnKpBfh/backend

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

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 8/172 features have testIds (4.7%)

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Registry Validation

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

Building backend scanner...
Scanning backend features...
Wrote 116 feature files to /tmp/tmp.XownGGUX7u/backend
Wrote 14 feature files to /tmp/tmp.XownGGUX7u/backend
Wrote 38 feature files to /tmp/tmp.XownGGUX7u/backend
Wrote 6 feature files to /tmp/tmp.XownGGUX7u/backend
Wrote 10 feature files to /tmp/tmp.XownGGUX7u/backend

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

✅ Registry validation passed. Divergence: 0.0%

Test Coverage: 8/172 features have testIds (4.7%)

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

@github-actions

Copy link
Copy Markdown
Contributor

📊 Feature E2E Coverage

Feature coverage report unavailable

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

@tstapler
tstapler merged commit eb5c3bd into main Jul 17, 2026
22 checks passed
@tstapler
tstapler deleted the worktree-agent-a0878367c2523521d branch July 17, 2026 11:35
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