# Behaviour contract: trino-capture-demo

Generated by Recast on 2026-11-26. Contract hash `sha256:c591118de9d62c0adca85a208604d84a52b67cae9d648a3a7c75533811fc7bc8`.

This is everything the legacy app at http://localhost:8080/ui/ was observed to do and that Recast has frozen. Each behaviour was performed on the legacy UI by Kane CLI and its result confirmed in at least two matching runs, then locked with a hash. Results are read from the app's own API, except `ui.*` values, which Kane read from the page. A rebuild may look and work differently on screen; it keeps the contract when a user can still achieve each intent and the API shows the same result.

## How the rebuild is checked

Point a target environment at the rebuilt UI, then run `pnpm recast check --target trino-preview`. Recast has Kane perform every intent below on the new UI twice and reads the result from the API. A behaviour is **Preserved** when every expected result holds in both runs and **Missing** when it fails in both; anything in between is reported as uncertain, never as a pass.

## Behaviours (1)

### 1. A user can use the "Kill" control on Query Overview - Trino in the web UI

- **Requirement:** `REQ-CAP-QUERY-OVERVIEW-KILL` r1, frozen 2026-11-26, hash `sha256:8bedd251b13b99e5…`
- **What the user does:** Open the details page of the query with ID {{query_id}}, which is currently running, and use its "Kill" control, using only the web UI.
- **Expected result:** `query.errorCode` is `ADMINISTRATIVELY_KILLED`; `query.state` is `FAILED`
- **Starting state for each run:** fixture `trino-481-running-query-v1`, read with oracle `trino-rest-v1`
- **Established by:** 2 of 2 legacy runs satisfied; evidence pack `0265acd36b80a23f…`

How Kane did it on the legacy UI:

1. navigate: Navigate to http://localhost:8080/ui/
2. analyze: a login page appears
3. wait: queued plan (2 steps): type "Username"; click "Log In"
4. type: Type "{{global.username}}" into "Username"
5. click: Clicking Log In button with username and empty password
6. wait: Waiting confirm successful login
7. click: Clicking to open the running query’s details page
8. click: Clicking Kill for the current query
9. wait: Waiting 1000 ms after confirming the query was killed
