Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ jobs:
- name: Integration crate unit tests
run: cargo test --manifest-path harness/evals/integration/Cargo.toml

- name: Validate integration scenarios
run: make -C harness integration-validate

- name: Run integration scenarios
run: make -C harness integration-e2e III_BIN="${{ steps.engine.outputs.bin }}" INTEGRATION_REPEAT=2

Expand Down
44 changes: 44 additions & 0 deletions console/web/e2e/durable-hydration.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { expect, expectPassingResult, openSession, test } from './harness-stack'

test.use({ scenario: 'streamed-text' })

test('hydrates a durable transcript again after a page reload', async ({
page,
stack,
}) => {
const completed = stack.waitForTurnCompleted()
await stack.trigger('harness::send', stack.ready.send)
expect(await completed).toMatchObject({ status: 'completed' })

await openSession(page, stack.ready)
await expect(
page.locator('[data-message-role="user"]', {
hasText: stack.ready.message,
}),
).toHaveCount(1)
await expect(
page.locator('[data-message-role="assistant"]', {
hasText: 'fixture complete',
}),
).toHaveCount(1)

await page.reload()
await page
.getByRole('button', {
name: `open ${stack.ready.session.title}`,
exact: true,
})
.click()
await expect(
page.locator('[data-message-role="user"]', {
hasText: stack.ready.message,
}),
).toHaveCount(1)
await expect(
page.locator('[data-message-role="assistant"]', {
hasText: 'fixture complete',
}),
).toHaveCount(1)

expectPassingResult(await stack.finish())
})
34 changes: 34 additions & 0 deletions console/web/e2e/exactly-once-function.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { expect, expectPassingResult, openSession, test } from './harness-stack'

test.use({ scenario: 'exactly-once-function' })

test('renders one completed function call and its durable result', async ({
page,
stack,
}) => {
const completed = stack.waitForTurnCompleted()
await stack.trigger('harness::send', stack.ready.send)
expect(await completed).toMatchObject({ status: 'completed' })

await openSession(page, stack.ready)
const functionId = stack.ready.functions.record
expect(functionId).toBeTruthy()
const card = page.locator('[data-message-role="function-call"]', {
hasText: functionId,
})
await expect(card).toHaveCount(1)
await expect(card).toHaveAttribute('data-function-id', functionId)
await expect(card).toHaveAttribute('data-function-status', 'done')
await expect(
page.locator('[data-message-role="assistant"]', {
hasText: 'recorded once',
}),
).toHaveCount(1)

const result = await stack.finish()
expectPassingResult(result)
const recordCalls = (result.evidence?.recorder_events ?? []).filter(
(event) => event.kind === 'target_call' && event.function_id === functionId,
)
expect(recordCalls).toHaveLength(1)
})
Loading
Loading