Repository navigation
fix: agent delete-all doesn't clear canvas until next message #18404
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3a4b4a9
test: add failing test for agent delete-all leaving stale nodes on ca…
claude 5f12a64
fix: retry agent reconcile promptly after a scope race, not just on t…
claude 0dcf33e
fix: close reconcile-retry gaps found in review (reset, scope-only, l…
claude bddb824
Merge branch 'main' into fix/agent-delete-all-scope-drop-retry
christian-byrne aad1228
Merge remote-tracking branch 'origin/main' into takeover-18404
christian-byrne b5bbf7b
fix(agent): keep scope-race reconcile recovery armed
christian-byrne 82e386d
test(agent): cover delete and clear canvas journeys
christian-byrne 5a7e813
test(agent): satisfy full-repo lint for clear fixture
christian-byrne 255dbbb
refactor(agent): isolate retry outcome handling
christian-byrne f57e02d
fix(agent): keep live-graph sweep armed and close retry test gaps
claude f15a709
test(agent): wait for the add frame to land before dropping scope
claude 6159d0d
fix(agent): cancel and throttle live sweep retries
christian-byrne 51b1061
Merge remote-tracking branch 'origin/main' into takeover-18404
christian-byrne ca0bd3a
test(agent): exercise scope-loss retry through tab closure
christian-byrne a7a2246
test(agent): lock retry provenance across interleaved frames
christian-byrne ce23c46
fix: make live-sweep retry scheduling idempotent, fix red projection …
claude 1e0e21e
fix(agent): drop the cloud-name fallback too when simulating scope loss
claude a0feb23
refactor(test): extract branches in agentWorkflowScopeFixture to cut …
claude 5691f1b
fix: harden agent scope recovery
ampagent 62e40d7
Merge origin/main into fix/agent-delete-all-scope-drop-retry
ampagent ad6f36b
refactor(agent): split follower and harness branches for fallow
christian-byrne 5b916de
Merge remote-tracking branch 'origin/main' into shepherd-18404-179048…
christian-byrne b6a464c
test(agent): adapt reconcile hook to replay options
christian-byrne 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
85 changes: 85 additions & 0 deletions
85
browser_tests/tests/agent/agentDeleteAndClearWorkflow.spec.ts
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,85 @@ | ||
| import { expect } from '@playwright/test' | ||
|
|
||
| import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' | ||
| import type { RecordedGraphOperation } from '@e2e/fixtures/data/agent/agentConversation' | ||
|
|
||
| test.describe( | ||
| 'Agent delete and clear operations', | ||
| { tag: ['@cloud', '@vue-nodes'] }, | ||
| () => { | ||
| test.describe('delete_node', () => { | ||
| test.use({ conversationCase: 'agent-rec-add-set-delete' }) | ||
|
|
||
| test('removes the requested node while preserving the workflow', async ({ | ||
| agentConversation | ||
| }) => { | ||
| test.setTimeout(90_000) | ||
|
|
||
| await agentConversation.rememberRecoveryGraph() | ||
| await agentConversation.runTurns() | ||
| expect(await agentConversation.isRecoveryGraphUnchanged()).toBe(true) | ||
| }) | ||
| }) | ||
|
|
||
| test.describe('clear_canvas', () => { | ||
| test.use({ conversationCase: 'agent-rec-clear-workflow' }) | ||
|
|
||
| test('leaves the canvas empty after clearing the workflow', async ({ | ||
| agentConversation | ||
| }) => { | ||
| test.setTimeout(90_000) | ||
|
|
||
| await agentConversation.rememberRecoveryGraph() | ||
| await agentConversation.runTurns() | ||
|
christian-byrne marked this conversation as resolved.
Resolved
|
||
| expect(await agentConversation.isRecoveryGraphUnchanged()).toBe(true) | ||
| }) | ||
|
|
||
| test('clears the canvas on its own after the clear frame is rejected for a dropped workflow scope', async ({ | ||
| agentConversation | ||
| }) => { | ||
| test.setTimeout(90_000) | ||
| let restoreScope: (() => Promise<void>) | undefined | ||
| const isClear = (ops: readonly RecordedGraphOperation[]) => | ||
| ops.some((op) => op.op === 'clear') | ||
|
|
||
| await agentConversation.rememberRecoveryGraph() | ||
| try { | ||
| await test.step('deliver the clear while workflow scope is unavailable', async () => { | ||
| await agentConversation.sendPrompt(0) | ||
| await agentConversation.replayResponse(0, { | ||
| beforeGraphOps: async (ops) => { | ||
| if (!isClear(ops)) return | ||
| await expect(agentConversation.vueNodes.nodes).not.toHaveCount( | ||
| 0 | ||
| ) | ||
| restoreScope = await agentConversation.dropWorkflowScope() | ||
| }, | ||
| waitForGraphOpsDelivery: isClear | ||
| }) | ||
| }) | ||
|
|
||
| if (!restoreScope) | ||
| throw new Error('the clear frame never dropped workflow scope') | ||
| const restore = restoreScope | ||
|
|
||
| await test.step('keep the same graph stale after the rejected clear', async () => { | ||
| await expect(agentConversation.vueNodes.nodes).not.toHaveCount(0) | ||
| expect(await agentConversation.isRecoveryGraphUnchanged()).toBe( | ||
| true | ||
| ) | ||
| }) | ||
|
|
||
| await test.step('clear without another frame when scope returns', async () => { | ||
| await restore() | ||
| await expect(agentConversation.vueNodes.nodes).toHaveCount(0) | ||
| expect(await agentConversation.isRecoveryGraphUnchanged()).toBe( | ||
| true | ||
| ) | ||
| }) | ||
| } finally { | ||
| await restoreScope?.() | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| ) | ||
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.