-
Notifications
You must be signed in to change notification settings - Fork 42.2k
sessions: add agent attempt comparisons #335498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Megan Rogge (meganrogge)
wants to merge
37
commits into
microsoft:main
Choose a base branch
from
meganrogge:agents/vscode-issue-335085-implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
53c4801
sessions: add agent attempt comparisons
meganrogge f718691
sessions: address agent comparison feedback
meganrogge a9a2bbd
sessions: fix agent comparison CI
meganrogge 3009205
sessions: register comparison service in fixture
meganrogge 91f1f9d
sessions: refresh comparison fixture modules
meganrogge 42b0027
sessions: invalidate comparison fixture cache
meganrogge b4c6a26
sessions: stabilize comparison fixtures
meganrogge 5f6af65
sessions: update comparison screenshots
meganrogge a4c9a19
sessions: remove fixture cache diagnostics
meganrogge 4bec7c0
sessions: add agent comparison attempt setup
meganrogge 3aef817
sessions: refine agent attempt comparisons
meganrogge 743c95a
sessions: add post-judge review flow
meganrogge 2066ec7
sessions: tile comparison attempts while running
anthonykim1 d0ca7f4
sessions: refine comparison review completion
meganrogge 2525c87
sessions: polish comparison progress and actions
meganrogge 77f1c16
sessions: use tmux-style comparison grid layouts
anthonykim1 c401dde
sessions: move comparison results into judge
meganrogge e240d56
Merge remote-tracking branch 'meganrogge/agents/vscode-issue-335085-i…
meganrogge 842a95b
sessions: prioritize comparison review sessions
meganrogge 8fdef5c
sessions: fix comparison attempt scrolling
meganrogge bedd1d4
Merge origin/main into agents/vscode-issue-335085-implementation
meganrogge 94a3e2a
sessions: improve comparison accessibility
meganrogge 39bbfdd
sessions: improve comparison judge reliability
meganrogge 8057ff0
sessions: use stable attempt numbers in judge verdicts
meganrogge 69e388a
sessions: fix parallel agents action label
meganrogge 05960bf
sessions: add customizable synthesis plans
anthonykim1 5c6bd3a
sessions: simplify synthesis option labels
anthonykim1 6b658a4
sessions: remove visible attempt number prefixes
anthonykim1 fc2bb65
sessions: hide editor when opening comparison grid
anthonykim1 5adc83a
sessions: refine comparison progress UI
meganrogge b25a00c
Merge remote comparison updates
meganrogge 80626e4
sessions: fix comparison tool CI
meganrogge a59334c
sessions: harden comparison lifecycle
meganrogge 25b364f
sessions: type comparison launch results
meganrogge 25235f9
sessions: add close affordance to tiled headers
anthonykim1 3d310a3
sessions: open comparison setup before config resolves
meganrogge c091619
Merge branch 'agents/vscode-issue-335085-implementation' of github.co…
meganrogge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Session comparison architecture | ||
|
|
||
| > **Specification change gate:** Update this document only when comparison ownership, participant roles, persistence, or lifecycle invariants change. | ||
|
|
||
| ## Scope | ||
|
|
||
| Session comparisons run the same task through multiple Sessions providers and preserve every implementation in an isolated worktree. The workflow is provider-neutral: comparison code uses `ISessionsManagementService`, while providers remain responsible for resolving their own model identifiers, creating worktrees, and deleting sessions. | ||
|
|
||
| ## Ownership | ||
|
|
||
| | Concern | Owner | | ||
| |---|---| | ||
| | Comparison records, participant lifecycle, selection, and cleanup | `ISessionComparisonService` | | ||
| | Harness and shared-model selection | new-session composer | | ||
| | Session creation, model resolution, and worktree isolation | Sessions provider through `ISessionsManagementService` | | ||
| | Attempt evidence and user actions | comparison editor | | ||
| | Structured recommendation | visible Judge child session and `completeAttemptComparison` tool | | ||
|
|
||
| Comparison records are persisted in profile storage. Session and chat resources remain provider-owned identities; the comparison record does not duplicate provider session state. | ||
|
|
||
| ## Participant hierarchy | ||
|
|
||
| Each comparison has one visible coordinator session. Attempts, the Judge, and an optional synthesis are created with `createdBySession` pointing to that coordinator: | ||
|
|
||
| - **Coordinator:** stable parent and grouping anchor; it does not implement the task. | ||
| - **Attempt:** one selected harness, one provider-resolved instance of the shared logical model, and one isolated worktree. | ||
| - **Judge:** starts after at least two successfully launched attempts reach a terminal state and submits one structured verdict. | ||
| - **Synthesis:** optional new attempt using the recommended or selected attempt's harness. It never mutates an original attempt. | ||
|
|
||
| The ordinary session-group and child-session mechanisms render this hierarchy. Comparison code must not create a second session tree. | ||
|
|
||
| ## Lifecycle invariants | ||
|
|
||
| 1. The prompt, attachments, workspace, branch, permission level, and logical model selection are shared across attempts. | ||
| 2. Every harness must support worktree configuration and resolve the selected logical model to its provider-local model identifier. | ||
| 3. Attempts launch concurrently. One launch failure is recorded without deleting successful attempts. | ||
| 4. The Judge receives references to successful attempts and must classify tests, build, lint, and diagnostics as `passed`, `failed`, `notRun`, or `unknown`. | ||
| 5. Selecting an attempt opens its session and records a preference; it does not apply changes to the user's working tree. | ||
| 6. Synthesis creates a new isolated child. Original attempts remain until an explicit, confirmed discard. | ||
| 7. Cleanup reports partial deletion failures and retains records for attempts that could not be deleted. | ||
|
|
||
| ## Evidence | ||
|
|
||
| The comparison editor derives file counts, diff size, elapsed time, file overlap, attempt-specific files, and starting-source/base-branch agreement from provider-neutral session state. Missing evidence is shown as unknown rather than inferred as successful or equal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.