The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
08a2eac8eb7151eaac33b18cd8a47a20599e5fa7 / Xinyuan Lin <[email protected]>
test(amber): cover ExecutionConsoleService's console routing and debug commands 
(#7441)

### What changes were proposed in this PR?

The suite covered the `ConsoleMessageProcessor` object; the service
class around it was untouched. That class owns the console diff the
frontend is driven from, the worker-to-operator keying that decides
where a message lands, and the websocket handler behind the debugger.

Converts the spec to a TestKit suite and adds 8 tests:

- a **debugger** message is never truncated, while an ordinary one still
is — the debugger's output is the frame the user asked to see
- the diff reports **only messages added since the last state**; the
frontend appends what it is sent, so emitting the whole buffer would
duplicate every earlier line on each update
- a console message is filed under the **logical** operator id — the
worker id carries the physical layer and worker index, and anything else
strands the output where the frontend will not look for it
- a debug command is attributed to `USER-<uid>`, falls back to
`USER-UNKNOWN` with no session user, is filed under the operator rather
than the worker, and is forwarded to the coordinator with the worker it
names

**Verified by mutation**, all reverted (production diff empty):

| Mutation | Result |
|---|---|
| truncate debugger messages too | red |
| send the whole console buffer instead of the diff | red |
| file the message under the physical op id | red |
| file the message under the raw worker id | red |
| attribute every debug command to a constant | red |
| file the debug command under the worker | red |
| forward the wrong id to the coordinator | red |
| drop the command from the message title | red |

Everything runs on an empty-plan `AmberClient` with a mocked
coordinator: no engine, database or Iceberg storage. The Iceberg-backed
writer path (`getOrCreateWriter` and the execution-state commit loop) is
`private` and storage-bound; it is left uncovered rather than padded
with a no-throw test, and the spec says so.

One note recorded in the spec: the console store's event observable
replays on subscribe, so the diff test subscribes first and asserts on
the batch published for the second message.

No production file is touched.

### Any related issues, documentation, discussions?

Closes #7438

### How was this PR tested?

```
sbt "WorkflowExecutionService/testOnly 
org.apache.texera.web.service.ExecutionConsoleServiceSpec"
```

```
[info] Tests: succeeded 13, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
```

8 new on top of the existing 5. `Test/scalafmtCheck` and `Test/scalafix
--check` both pass.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

---------

Signed-off-by: Xinyuan Lin <[email protected]>
Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/31343295104

With regards,
GitHub Actions via GitBox

Reply via email to