Skip to content

feat(agent-service): add agent-service that manages LLM agents - #4495

Merged
bobbai00 merged 33 commits into
apache:mainfrom
bobbai00:branch-1-framework
Apr 28, 2026
Merged

bobbai00 merged 33 commits into
apache:mainfrom
bobbai00:branch-1-framework

Conversation

@bobbai00

@bobbai00 bobbai00 commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR removes the frontend LLM copilot introduced in #4020 and adds a standalone service agent-service that hosts LLM agents. It connects with frontend through the per-agent WebSocket, and the Angular panel/services that drive it.It also talks to the Texera's micro service APIs like for things like retrieving the operator metadata and compiling a workflow. The agent has no editing or execution tools yet, so it can converse about the workflow without changing it.

System Architecture

image

Demo

  1. Read user's workflow:
2026-04-24 22 58 45
  1. Explain certain operators:
2026-04-24 22 59 17

Any related issues, documentation, discussions?

Closes #4492

How was this PR tested?

  • Added several unit tests in agent-service
  • Manual tests the frontend-backend end2end.

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

Generated-by: Claude Code (Claude Opus 4.7)

Introduce a standalone Bun/TypeScript service (agent-service) that hosts
conversational agents backed by the Vercel AI SDK, plus the Angular panel
and services that drive it over HTTP and a per-agent WebSocket.

This slice contains the framework only: step tree with HEAD and checkout,
per-step context assembly from the live DAG (via the compile API),
auto-persist of workflow edits to the dashboard, and shared operator
metadata loaded at startup. The agent has no tools yet, so it can
converse about the workflow without editing or executing it.

Workflow editing/execution tools, the SyncExecutionResource endpoint, and
the single-node and k8s deployment configs ship in follow-up PRs.
@bobbai00 bobbai00 self-assigned this Apr 25, 2026
Add Bun-native unit tests for the two pure-logic state modules
(WorkflowState, WorkflowResultState) covering operator and link CRUD,
sub-DAG walking, ancestor-path result lookup, and checkout semantics.

Add an agent-service job to the build workflow that runs on Ubuntu,
macOS, and Windows: install with bun, prettier check, tsc --noEmit,
and bun test. Run prettier --write across existing source so the new
format:check step is green.
@github-actions github-actions Bot added the ci changes related to CI label Apr 25, 2026
Remove types/execution.ts, agent/workflow-result-state.ts (and its test),
the computingUnitId field, and the result-summary plumbing in server.ts.
The /operator-results route stays and returns an empty map so the frontend
keeps working; branch-2 (tools) populates it once executeOperator lands.

Refactor server.ts to expose a buildApp() factory and start()/import.meta
gate so tests can drive the routes via app.handle(new Request(...)) — the
standard Elysia testing pattern. Move .onError onto the agentsRouter
instance so thrown errors inside its handlers are caught (Elysia 1.x scopes
error handlers to the instance they are attached to). Replace DELETE's
throw with a direct set.status = 404 for predictability.

Add server.test.ts covering /health, agent create/list/get/delete, the
stop/clear/operator-results control routes, settings PATCH round-trip,
invalid JWT rejection, and missing-modelType validation.
Add **/.env.example, **/.prettierrc, and **/bun.lock to paths-ignore.
These are config and lockfile artifacts that do not carry license
headers, and skywalking-eyes flagged them in the agent-service tree.

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this PR ready for review? It's way too big. Maybe separate the removal into its own PR first?

@bobbai00

Copy link
Copy Markdown
Contributor Author

Is this PR ready for review? It's way too big. Maybe separate the removal into its own PR first?

Is this PR ready for review? It's way too big. Maybe separate the removal into its own PR first?

It is ready for review.

I already split the original PR into 4. This is the first one. I will try to do more shrinking on it

Drop the step-id badge that rendered at the top-left of each chat message
and the highlight-affected-operators toggle that rendered at the top-right.
Together they backed a canvas overlay that drew a dashed region around all
operators touched by a user message and a per-operator step badge stack.

Removed plumbing:
 - agent.service: highlightedMessageIdSubject/$, setHighlightedMessage,
   getHighlightedMessageId, operatorStepsMapSubject/$, updateOperatorStepsMap,
   addStepRef, getOperatorStepRefs, getOperatorStepsMap, getOperatorsForMessage,
   extractOperatorIdsFromToolResult, extractOperatorIdsFromObject, tryParseJson
 - agent-types: OperatorStepRef interface
 - agent-chat: highlightedMessageId field, highlightedMessageId$ subscription,
   isMessageHighlighted, toggleMessageHighlight, the badge and toggle markup,
   .message-highlight-btn styles
 - workflow-editor: showStepBadges, stepBadges, messageRegionElement,
   highlightedMessageOperators, highlightedMessageId, currentOperatorStepsMap,
   handleStepBadges, updateStepBadgePositions, onStepBadgeClick,
   handleMessageRegion, updateMessageRegion, updateMessageRegionPath,
   the .step-badges-container/.step-badge/.message-region styles, and the
   step-badges template block
@bobbai00
bobbai00 force-pushed the branch-1-framework branch from 038c08f to b1b6b5e Compare April 25, 2026 19:52
The service backed canvas diff highlighting for agent-applied actions
(showDiff/clearDiff/toggleDiff via the version-diff helpers in
WorkflowVersionService). Nothing renders agent actions on the canvas
anymore, so drop the service and remove its single injection in
WorkflowEditorComponent. The version-diff helpers it called remain;
they are still used by WorkflowVersionService for the workflow version
history feature.
Eight files in this branch had drift unrelated to the agent-service
framework. Restore each to main:
 - dashboard/component/admin/user: drop sortByAffiliation/sortByJoiningReason
   columns
 - dashboard/service/user/workflow-version: drop highlightOpVersionDiffSimple
   and highlightOpBoundaryDashed (only callers were the now-removed
   AgentActionService)
 - dashboard/type/dashboard-entry: revert coverImageUrl signature tweak
 - workspace/component/menu: restore Status toggle, Edit Description button,
   region toggle, and onClickOpenShareAccess revoke-redirect logic
 - workspace/component/property-editor/operator-property-edit-frame: drop
   the editingTitle wrapper and the orphan .agent-interaction-controls
   styles (no markup consumed them)
 - Delete bin/agent-service.dockerfile. The framework PR no longer
   ships a deploy artifact; the dockerfile belongs with the deploy PRs
   (single-node, k8s).
 - Restore bin/computing-unit-master.dockerfile (drop the LICENSE/NOTICE
   copy and application.ini removal — unrelated to agent-service).
 - Restore bin/litellm-config.yaml (drop the extra commented-out model
   entries; the proxy already accepts the upstream model list).
@github-actions github-actions Bot removed the infra label Apr 25, 2026
bobbai00 and others added 2 commits April 25, 2026 14:57
…t-fixtures.ts to match main

Both diffs were unrelated to the agent-service framework — drift left
behind on this branch from earlier work.

@aglinxinyuan aglinxinyuan left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge the Agent panel with the right panel or the bottom panel? Currently, we have three panels: left, right, and bottom. We share the same design as the most popular IDEs. As you can see in your demo screenshot, the agent panel overlaps with the right panel.

Example of an IDE with agent chat:
Image

bobbai00 pushed a commit to bobbai00/texera that referenced this pull request May 30, 2026
Switch regions back to the pure body/visibility approach from apache#4112.
apache#4495 had regions hidden via a hide-region CSS class on the main paper
only, with the element defaulting to visible — so the mini-map (which
shares the model but not the class) showed region hulls regardless of
the toggle, and freshly-created regions reappeared on every execution
update.

Now the region element defaults to visibility: hidden and toggleRegion
flips body/visibility on the shared model, so both the main canvas and
the mini-map stay in sync (apache#5120 and apache#4027). Drops the hide-region class
and SCSS rule. Tests updated accordingly.
xuang7 pushed a commit to Sentiaus/victor-texera that referenced this pull request May 31, 2026
### What changes were proposed in this PR?

Restores the **Regions** and **Status** toggles under View, both of
which broke after apache#4495 switched these elements from JointJS
`visibility` attributes to CSS classes.

- **Regions**: region visibility is now a shared, persistent flag on
`JointGraphWrapper` (`setRegionsDisplayed` / `getRegionsDisplayed` /
stream). The editor applies it to the shared JointJS model both when the
flag changes and whenever regions are recreated on a
`RegionUpdateEvent`. Because the model is shared, the toggle drives both
the main canvas (apache#5120) and the mini-map (apache#4027), and it survives the
region elements being recreated during execution (previously regions
went hidden mid-run even with the toggle on). The menu toggle just sets
the flag; the editor owns applying it. The `hide-region` CSS class/SCSS
rule are removed.
- **Status** (`workflow-editor.component.scss`,
`workflow-editor.component.ts`, `menu.component.ts`): re-added the
`hide-operator-status` SCSS rule (retargeted to the renamed
`.texera-operator-state` element), added the default class so Status
starts hidden, and fixed the stale `.operator-status` selector in
`applyOperatorStatusPosition()`.

Unit tests added for the toggle delegation, status repositioning, the
default `hide-operator-status` class, and region visibility across
creation / recreation / toggling.

Here is a demo of the style after fix:
<img width="1707" height="1162" alt="2026-05-30 11 35 33"
src="https://github.com/user-attachments/assets/ae5fc0d3-76f1-4bf8-914e-2644f89b46c2"
/>


### Any related issues, documentation, discussions?

Closes apache#5120

Regression from apache#4495.

### How was this PR tested?
Manual + unit tests.


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

Generated-by: Claude Opus 4.8 (1M context)

---------

Co-authored-by: Bob Bai <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…che#4495)

### What changes were proposed in this PR?

This PR removes the frontend LLM copilot introduced in apache#4020 and adds a
**standalone service `agent-service`** that hosts LLM agents. It
connects with frontend through the per-agent WebSocket, and the Angular
panel/services that drive it.It also talks to the Texera's micro service
APIs like for things like retrieving the operator metadata and compiling
a workflow. The agent has no editing or execution tools yet, so it can
converse about the workflow without changing it.

#### System Architecture
<img width="750" height="600" alt="image"
src="https://github.com/user-attachments/assets/153bb757-fa10-4c5e-bf3e-4310cde6f8d8"
/>

#### Demo

1. Read user's workflow:
<img width="3054" height="1350" alt="2026-04-24 22 58 45"
src="https://github.com/user-attachments/assets/07c83da6-b3c3-4458-8188-f95683bd08d3"
/>


2. Explain certain operators:
<img width="3054" height="1350" alt="2026-04-24 22 59 17"
src="https://github.com/user-attachments/assets/a94b3701-5d96-4ae4-9d93-bf3a0262d7b7"
/>



### Any related issues, documentation, discussions?

Closes apache#4492 

### How was this PR tested?
- Added several unit tests in `agent-service`
- Manual tests the frontend-backend end2end.

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

Generated-by: Claude Code (Claude Opus 4.7)

---------

Co-authored-by: Chen Li <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
### What changes were proposed in this PR?

Restores the **Regions** and **Status** toggles under View, both of
which broke after apache#4495 switched these elements from JointJS
`visibility` attributes to CSS classes.

- **Regions**: region visibility is now a shared, persistent flag on
`JointGraphWrapper` (`setRegionsDisplayed` / `getRegionsDisplayed` /
stream). The editor applies it to the shared JointJS model both when the
flag changes and whenever regions are recreated on a
`RegionUpdateEvent`. Because the model is shared, the toggle drives both
the main canvas (apache#5120) and the mini-map (apache#4027), and it survives the
region elements being recreated during execution (previously regions
went hidden mid-run even with the toggle on). The menu toggle just sets
the flag; the editor owns applying it. The `hide-region` CSS class/SCSS
rule are removed.
- **Status** (`workflow-editor.component.scss`,
`workflow-editor.component.ts`, `menu.component.ts`): re-added the
`hide-operator-status` SCSS rule (retargeted to the renamed
`.texera-operator-state` element), added the default class so Status
starts hidden, and fixed the stale `.operator-status` selector in
`applyOperatorStatusPosition()`.

Unit tests added for the toggle delegation, status repositioning, the
default `hide-operator-status` class, and region visibility across
creation / recreation / toggling.

Here is a demo of the style after fix:
<img width="1707" height="1162" alt="2026-05-30 11 35 33"
src="https://github.com/user-attachments/assets/ae5fc0d3-76f1-4bf8-914e-2644f89b46c2"
/>


### Any related issues, documentation, discussions?

Closes apache#5120

Regression from apache#4495.

### How was this PR tested?
Manual + unit tests.


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

Generated-by: Claude Opus 4.8 (1M context)

---------

Co-authored-by: Bob Bai <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 25, 2026
…che#8613)

### What changes were proposed in this PR?

Removes `AgentService`'s scroll-to-step request stream, which can never
fire. Pure deletion, no behaviour change: **−74 lines**.

The chain exists end to end but has no trigger: `requestScrollToStep()`
is the only producer and nothing calls it, so `scrollToStepSubject`
never emits, the `agent-chat` subscriber never runs, and the private
`scrollToStep()` it dispatches to is unreachable.

```
(no caller)  ->  requestScrollToStep()  ->  scrollToStepSubject  ->  agent-chat subscriber  ->  scrollToStep()
     ^ the chain starts here and nothing ever enters it
```

### History

| | |
| --- | --- |
| **Introduced by** | apache#4495 (2026-04-27) — "feat(agent-service): add
`agent-service` that manages LLM agents", which shipped the whole chain
at once |
| **Usage removed by** | **never wired up** — no file outside
`agent.service.ts` has called `requestScrollToStep` at any point in the
history, and no UI control invokes it |

> Reviewer note: the sibling `showPortShapes$` stream in the same
"canvas annotation state" block **is** live and is untouched; only the
scroll-to-step members and the section comment's mention of them change.
`scrollToMessage` and `setHoveredMessage`, which the dead handler
called, both keep other callers.

### Any related issues, documentation, discussions?

Closes apache#8610

### How was this PR tested?

Existing tests only — this PR removes code and the tests that covered
it.

From `frontend/`:

- `npx ng test --watch=false --include='**/agent.service.spec.ts'
--include='**/agent-chat.component.spec.ts'
--include='**/agent-panel.component.spec.ts'` — 193 tests pass across
the three files.
- `yarn --cwd frontend format:ci` — clean.

Verification, re-runnable by a reviewer:

```
git grep -nF 'scrollToStep$'     # use -F: a trailing $ is a regex anchor
git grep -n requestScrollToStep
```

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

Generated-by: Claude Code (Claude Opus 5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 27, 2026
### What changes were proposed in this PR?

Deletes six dead members of `AgentChatComponent`. **+3/−91 lines.**
There is no behaviour change.

- `getToolResult`, `getToolOperatorAccess` and `hasOperatorAccess`. The
step-detail modal's template calls `ReActStepDetailModalComponent`'s own
copies of these, not the chat component's.
- `closeDetailsModal`, which is no longer bound anywhere. The modal
closes through the `[(visible)]` binding.
- The private `scrollToMessage`, which lost its only caller in apache#8613.
- The `messageInput` `@ViewChild`, which was never read, and its
`#messageInput` template ref.

The spec loses the four cases that only exercised these members, plus
the `scrollIntoView` stub that existed for `scrollToMessage`.

### History

| | |
| --- | --- |
| **Introduced by** | apache#4020 (2025-11-25), "feat: introduce the LLM-based
workflow copilot": `getToolResult`, `closeDetailsModal`, `messageInput`.
apache#4495 (2026-04-27) added `getToolOperatorAccess`, `hasOperatorAccess`
and `scrollToMessage` |
| **Usage removed by** | apache#4495 (2026-04-27), "feat(agent-service): add
agent-service that manages LLM agents". It moved step details into
`ReActStepDetailModalComponent` (with its own copies) and deleted the
chat template's calls. The three members it added, and `messageInput`,
were **never used**. `scrollToMessage` was never reachable, and apache#8613
removed its only static caller |

It has been dead for five months.

> Reviewer note: open draft apache#5928 (bobbai00) also drops the
operator-access members as part of a larger refactor. If it lands
second, the conflict is a trivial delete/delete. apache#8613 should have taken
`scrollToMessage` with its caller; this PR finishes that.

### Any related issues, documentation, discussions?

Closes apache#8696

### How was this PR tested?

No new tests. The kept cases, including the `[(visible)]`
two-way-binding case, cover what remains.

From `frontend/`:

- `npx ng test --watch=false --include='**/agent-chat.component.spec.ts'
--include='**/agent-panel.component.spec.ts'`: 2 files, 103 tests, all
pass.
- `yarn format:ci`: clean.
- `npx ng build`: success.

To re-check:

```
git grep -n "closeDetailsModal\|scrollToMessage\|messageInput" -- frontend   # no hits
```

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 28, 2026
)

### What changes were proposed in this PR?

Deletes four unused members of `WorkflowUtilService`, plus the rxjs
import and the three spec cases that existed only for them. **+1/−85
lines.** There is no behaviour change. The constructor still fills
`operatorSchemaList` from the metadata subscription; only the
`.next(true)` to a Subject with no subscriber goes.

### History

| | |
| --- | --- |
| **Introduced by** | apache#712 (2019-06-06):
`operatorSchemaListCreatedSubject` + getter. apache#754 (2020-12-11), "Added
operator grouping feature": `getGroupRandomUUID`. apache#1309 (2021-08-28),
"Re-enabling breakpoints": `getBreakpointRandomUUID`. apache#4020
(2025-11-25), "feat: introduce the LLM-based workflow copilot":
`getOperatorTypeList` |
| **Usage removed by** | apache#1674 (2022-10-05), the Yjs shared-editing
frontend, removed the last live path to `getGroupRandomUUID` (apache#3033
later deleted its last textual call, inside a dead `getNewGroup`). apache#4495
(2026-04-27) removed the copilot tool that called `getOperatorTypeList`.
The stream and `getBreakpointRandomUUID` were **never used** |

The oldest of these has been dead for seven years, and the newest for
five months.

### Any related issues, documentation, discussions?

Closes apache#8716

### How was this PR tested?

No new tests. The 15 remaining service cases cover what is left.

From `frontend/`:

- `npx ng test --watch=false`, with one `--include` per spec that
imports `workflow-util.service` (20 files): 724 tests, all pass.
- `yarn format:ci`: clean.
- `npx ng build`: success.

To re-check:

```
git grep -n -E "getOperatorTypeList|getGroupRandomUUID|getBreakpointRandomUUID|OperatorSchemaListCreated" -- frontend   # no hits
```

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 4, 2026
…#8829)

### What changes were proposed in this PR?

Removes a class binding in `AgentPanelComponent` that can never apply.
**+1/−11 lines.** There is no behaviour change.

`<ul id="return-button">` has `[ngClass]="{'shadow': !width}"` and
`*ngIf="width"` on the **same element**. `*ngIf` creates the element
only while `width` is truthy, and `!width` is then always `false`. So
`shadow` is never set on a rendered element. `width` is a `number` that
is only ever 0, the 400px minimum, a resize width, or a range-checked
stored width, so there is no value that is both truthy and falsy.

The PR removes:

- the binding;
- the `.shadow` rule, which nothing else in this component's template
uses (the styles are encapsulated);
- `NgClass` from the imports, because this was the template's only
`ngClass`.

The `*ngIf` and every live style on the element stay.

### History

| | |
| --- | --- |
| **Introduced by** | apache#4020 (2025-11-25), "feat: introduce the LLM-based
workflow copilot": the binding, the `*ngIf` and the `.shadow` rule
together. apache#4873 (2026-05-03) later added the `NgClass` import when the
component became standalone |
| **Usage removed by** | **never used**. The binding has been
unreachable since the line was written. apache#4495 only moved the files |

It has never applied, in the ten months since it was added.

### Any related issues, documentation, discussions?

Closes apache#8828

### How was this PR tested?

No new tests; no spec referenced the class.

From `frontend/`:

- `npx ng test --watch=false
--include='**/agent-panel.component.spec.ts'
--include='**/workspace.component.spec.ts'`: 2 files, 86 tests, all
pass. These are the only specs that render the panel.
- `yarn format:ci`: clean.
- `npx ng build`: success.

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 10, 2026
)

### What changes were proposed in this PR?

Removes the unused parts of the agent panel's
`ReActStepDetailModalComponent`. **+1/−97 lines.** There is no behaviour
change.

- **The `agentId` input.** `agent-chat` binds it, but neither the
modal's class nor its template reads it, so the binding goes too.
- **`getMessageRoleColor` and `getToolCallStrings`,** with the private
`formatAsFunction` that only the latter calls. The template never calls
them. Only their own spec cases did, and those three cases go with them.
- **`react-step-detail-modal.component.scss` and its `styleUrls`
entry.** The file holds only the license header and one comment, so it
emits no styles.

The helpers the template does call (`getTextFromMessage`,
`getToolCallSummaries`, the tool-result and operator-access helpers) and
their spec cases stay.

### History

| | |
| --- | --- |
| **Introduced by** | apache#4495 (2026-04-28), "feat(agent-service): add
`agent-service` that manages LLM agents", together with the modal |
| **Usage removed by** | **never used**. Only spec cases (apache#5612) ever
called the two helpers |

They have been unused for the six months since they were added.

### Any related issues, documentation, discussions?

Closes apache#9392.

### How was this PR tested?

No new tests. The modal's remaining cases stay.

From `frontend/`:

- `npx ng test --watch=false
--include='**/react-step-detail-modal.component.spec.ts'
--include='**/agent-chat.component.spec.ts'
--include='**/agent-panel.component.spec.ts'`: 3 files, 125 tests, all
pass. The last two specs cover the modal's host (`agent-chat`) and the
panel around it.
- `npx tsc --noEmit -p src/tsconfig.app.json` and `-p
src/tsconfig.spec.json`: clean.
- `yarn format:ci`: clean.
- `yarn build` (production, AOT): success.

To re-check:

```
git grep -n -E "getMessageRoleColor|getToolCallStrings|formatAsFunction|react-step-detail-modal.component.scss"   # no hits
git grep -n agentId -- frontend/src/app/workspace/component/agent/agent-panel/react-step-detail-modal   # no hits
```

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
…9686)

### What changes were proposed in this PR?

Remove code that nothing uses, and constructs that repeat a default or
an alias, from the Python tests, the agent service, three frontend
specs, the AsterixDB source and the RustFS test container, and make an
unreachable error check in the single-node example loader reachable
(**+84/−137 lines**). Only the loader's behavior changes: a workflow
file that `jq` cannot parse is now reported and skipped instead of
aborting the loader.

- **Python tests (14 files):** `test_console_message.py` drops the
unused `internal_queue` and `timed_buffer` fixtures and their imports.
Two tests drop fixture parameters they never read (`executor`,
`a_timestamp`), and `test_proxy_client.py` names an unused loop value
`_`. The others write `dict(...)` calls as literals, return from
fixtures that yield without teardown, drop empty `@pytest.fixture()`
parentheses, merge nested `with` blocks, return a value directly instead
of through a local, take the first element with `next(iter(...))`, and
spell `datetime.timezone.utc`, `socket.timeout` and `bytes()` as
`datetime.UTC`, `TimeoutError` and `b""` (Ruff targets Python 3.11).
- **Agent service:** `src/agent/index.ts` and `src/api/index.ts` only
re-export modules that callers import directly. No file imports either
barrel, and the package entry is `src/index.ts`.
`workflow-system-metadata.ts` drops the unused `OperatorSchema` and
`ValidationError` type imports.
- **Frontend specs:** the dataset and model creator specs drop
`FormsModule` and `HttpClientTestingModule`, which
`createFormlyModalFixture` already provides, and the admin Gmail spec
drops three modules that the standalone component and its stubbed
service do not need.
- **`load-examples.sh`:** tests the `content=$(jq -c .
"$workflow_file")` assignment in the `if` instead of checking `$?` after
it. The script runs under `set -euo pipefail` and `main` calls
`load_workflows` directly, so the old check could never fire: a workflow
file that `jq` could not parse aborted the loader and skipped the files
after it, although the comment above `FAILURES` calls each failure
deliberately non-fatal. Now `print_error` counts the file, the loop
moves on, and `main` still exits non-zero at the end.
`test_load_examples_sh.sh` adds a case with an unparseable workflow
sorted ahead of a good one.
- **AsterixDB source:** `AsterixDBConnUtil` and `AsterixDBSourceOpExec`
assign the version response and the parsed row once as `val`s instead of
overwriting `null` and `None` placeholders.
- **`RustFSContainer`:** drops the Scaladoc lines saying the console is
left disabled. RustFS 1.0.0 enables the console by default, and the
fixture does not override it.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Python tests: apache#1259 (2021-07-23), apache#1498 (2022-04-15),
apache#1452 (2022-05-13), apache#2067 (2023-07-27), apache#1748 (2023-11-09), apache#2815
(2024-09-05), apache#4520 (2026-04-27), apache#4704, apache#4719 and apache#4795 (2026-05-03),
apache#4893 (2026-05-04), apache#6643 (2026-07-20), apache#6988 (2026-07-29), apache#7374
(2026-08-07), apache#7579 (2026-08-13), apache#8067 (2026-08-29), apache#8542
(2026-09-15), apache#9279 (2026-11-04), apache#8704 (2026-11-05), apache#9623
(2026-11-23); agent service: apache#4020 (2025-11-25), apache#4495 and apache#4540
(2026-04-28); frontend specs: apache#6513 (2026-07-18), apache#6576 (2026-07-20),
apache#8068 (2026-08-28); `load-examples.sh`: apache#4247 (2026-03-02); AsterixDB
source: apache#1044 (2021-02-25); `RustFSContainer`: apache#8542 (2026-09-15) |
| Usage removed by | Creator spec modules: apache#9522 (2026-11-22,
`refactor(frontend): share dataset and model resource UI`) moved both
specs to `createFormlyModalFixture`. Everything else: unused,
unreachable or redundant since introduction. |

As of 2026-11-24:
- The AsterixDB placeholders have been overwritten before any read for
over 5 years.
- The console-message fixtures have been unused for over 2 years.
- The `load-examples.sh` check has been unreachable for almost 9 months.
- The agent-service barrels have had no importer for the 7 months the
service has existed.
- The creator spec modules have been redundant for 2 days.

### Any related issues, documentation, discussions?

Closes apache#9685.

### How was this PR tested?

Ran on this branch and on `main` at `424b2a757a` (Windows 11; Python
3.12 with CI's pinned `ruff` 0.14.7; Node 24 with Yarn 4.14.1; Bun
1.3.13; JDK 17; the loader test in an Alpine container with Bash 5.2.21
and jq 1.7.1):

```bash
cd amber
ruff check src/main/python src/test/python
ruff format --check src/main/python src/test/python
pytest $(git diff --name-only --relative origin/main -- src/test/python)
cd ../agent-service
bun test
bun run typecheck
cd ../frontend
npx ng test --watch=false --include='**/user-dataset-creator.component.spec.ts' --include='**/user-model-creator.component.spec.ts' --include='**/admin-gmail.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" WorkflowCore/Test/compile WorkflowOperator/scalafmtCheckAll WorkflowCore/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowCore/scalafixAll --check"
bash bin/single-node/tests/test_load_examples_sh.sh
```

- **Python:**
  - Ruff passes on all 218 files.
- The 14 changed test files run 288 tests with the same outcome per test
on both sides: 218 pass, 67 are skipped and 3 fail.
- The three failures are timestamp cases in
`test_ui_parameter_contract.py` that expect UTC and come out 8 hours off
in this machine's time zone. They fail the same way on `main`.
- **Agent service:** all 361 tests in 20 files and the typecheck pass on
both sides.
- **Frontend:** the three specs run 37 tests, all passing on both sides.
The spec typecheck, prettier-eslint and ESLint pass.
- **Scala:** the 11 `source.sql` suites, including the three AsterixDB
specs, run 204 tests that all pass on both sides. WorkflowCore's tests
compile, and scalafmt and scalafix pass on both modules.
- **`load-examples.sh`:** `test_load_examples_sh.sh` passes all 11
checks. Against `main`'s loader, the 9 existing checks pass and the 2
new ones fail: `jq` exits 5 at the malformed file, and the loader stops
there without creating the other workflow.

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

Generated-by: Claude Code (Claude Opus 5.5)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove redundant code from the frontend, the licensing scripts, two
Scala sources and the agent service (**+26/−41 lines**). There is no
behavior change.

- **Dataset and model detail pages:** each `route.params` emission was
switched to `this.route.data`, and the empty `.subscribe()` threw away
what that emitted. The pages now `tap` the params, so the same fetches
run in the same order without the extra subscription. The dataset page's
`THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and
the hub spec import the copy in `hub-workflow-detail.component.ts`,
never this one.
- **Version uploader:** the abort handler's 404 branch called `done()`
and returned, which is what the handler already does for every error it
does not retry. Its three constants become file-local: nothing imported
`FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two.
The spec now states the retry policy it expects.
- **Computing-unit actions:** `confirmAndTerminate` reads
`unit.computingUnit.uri` and `unit.computingUnit.name` before
`unit?.computingUnit.type`, so the `?.` goes.
- **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec
imported it, and the spec now checks the backend's `"LoopEnd"` name
directly.
- **Agent interaction:** two imports from `agent.service` become one.
- **Licensing scripts:** `audit_jar_licenses.py` stored each group's
notice hash in a field that nothing reads, and the NOTICE test helper
`make_jar` had an `extra` parameter that no caller passes.
- **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import
javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers.
- **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms
list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case
AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`.
The `_` matches those types as well, so each becomes `case _`.
- **`agent-service/.dockerignore`:** Docker reads the ignore file at the
root of the build context. CI's image matrix
(`build-and-push-images.yml`) and `bin/build-images.sh` both use the
repository root as the context, and the agent Dockerfile copies
`agent-service/...` paths from there, so the root `.dockerignore`
applies and this file is never read.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269
(2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05),
moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09);
loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13);
licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10);
`PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013
(2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25);
`agent-service/.dockerignore`: apache#4495 (2026-04-28) |
| Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01)
added the agent image's Dockerfile with paths from the repository root,
so no build has read the file. Everything else: unused or redundant
since introduction. |

As of 2026-11-25:
- The SQL sources' fallback arms have listed redundant types for over 5
years.
- The dataset page's discarded subscription is almost 3 years old.
- The version uploader's 404 branch has been redundant for over 10
months.
- `agent-service/.dockerignore` has gone unread for almost 7 months.
- The duplicate agent import is 12 days old.

### Any related issues, documentation, discussions?

Closes apache#9691.

### How was this PR tested?

Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24
with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff`
0.14.7; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
pytest bin/licensing
ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py
python bin/licensing/audit_jar_licenses.py <directory of 60 jars>
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check"
```

- **Frontend:** the six specs run 379 tests, all passing on both sides.
Both typechecks, prettier-eslint and ESLint pass.
- **Python:** the licensing tests run 53 tests and 5 subtests, all
passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints
the same report on both sides for 60 jars from the local Coursier cache.
- **Scala:**
  - The 11 `source.sql` suites run 204 tests, all passing on both sides.
- The two PVE resource suites run 75 tests on both sides: 74 pass and 1
is canceled. The canceled test needs a file that is not executable,
which this Windows filesystem cannot represent.
  - scalafmt and scalafix pass on both modules.
- **`agent-service/.dockerignore`:** no image was built. The build
context comes from `context="."` for every
`bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from
the `..` that `bin/build-images.sh` passes from `bin/`.

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

Generated-by: Claude Code (Claude Opus 5.5)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 27, 2026
### What changes were proposed in this PR?

Remove code that nothing uses from the frontend's agent service and the
agent panel (**+73/−365 lines**). There is no behavior change.

- **`AgentService`:**
- Eight public methods have no caller outside the service's own spec:
`getAgent`, `getAgentWorkflowId`, `getAgentCount`, `isAgentConnected`,
`getHeadId`, `getVisibleSteps`, `getReActStepsByOperatorAccess` and
`getStepsByOperatorIds`. The agent service's routes stay.
- Nothing reads the port-shape toggle: `showPortShapes$`,
`togglePortShapes` and `getShowPortShapes`.
- `AgentInfo`'s `isBaselineMode` and `createdAt` are set when an agent
is mapped but never read. The specs' agent fixtures drop them.
- The `ApiMessageResponse` interface is unused, and the `ModelMessage`
and `WorkflowContent` imports are never referenced.
- **Agent panel template:** the tab loop's `let i = index` and the tab
title's `let-active="active"` declare variables that nothing reads.
- **Service spec:**
  - The ten cases that cover only the removed methods go.
- Assertions that read the current HEAD or steps through `getHeadId` or
`getVisibleSteps` now take the latest value of `getHeadIdObservable` or
`getReActStepsObservable`. Unlike the removed getters, those create
tracking for an unknown id, and the two accessor cases now assert that.
Three cases are renamed to match.
- The `getAllAgents` case now checks the mapped name and model type, and
that the delegate's `userToken` is dropped. Only a removed `getAgent`
case checked the token before.
- A new case covers `getReActSteps` on a successful response, including
the operator-access `Map` that the chat's export iterates. Only the
removed `getReActStepsByOperatorAccess` cases covered that path before.

| Event | PR / Commit |
| --- | --- |
| Introduced by | All of it: apache#4495 (2026-04-27) |
| Usage removed by | Never used |

As of 2026-11-26, all of it has gone unused for the 7 months since it
was added.

### Any related issues, documentation, discussions?

Closes apache#9727.

### How was this PR tested?

Ran on this branch and on `main` at `fec4330be6` (Windows 11; Node 24
with Yarn 4.14.1):

```bash
cd frontend
npx ng test --watch=false --include='**/agent.service.spec.ts' --include='**/agent-interaction.component.spec.ts' --include='**/agent-chat.component.spec.ts' --include='**/agent-panel.component.spec.ts' --include='**/agent-registration.component.spec.ts' --include='**/react-step-detail-modal.component.spec.ts' --include='**/workflow-editor.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
npx ngc -p src/tsconfig.app.json --noEmit
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$')
```

- **Specs:** the seven specs that import the agent service or its types
run 436 tests on this branch and 445 on `main`, all passing.
- `main` has the removed methods' ten cases, and this branch adds the
`getReActSteps` success case. Three cases are renamed, as above.
  - Every other test keeps its name and outcome.
- **Controls:** if a step event stops advancing HEAD, the two step-event
cases that now read `getHeadIdObservable` fail. If the mapped agent
keeps the delegate's `userToken`, the `getAllAgents` case fails. If
`getReActSteps` returns the fetched steps unconverted, or
`getHeadIdObservable` stops creating tracking for a new id, the matching
new assertion fails.
- **Checks:** both typechecks, the AOT compile (the template changes),
prettier-eslint and ESLint pass.

To re-check, this returns no hits on this branch and 56 on `main`:

```bash
git grep -nE "getAgentWorkflowId|\.getAgent\(|getAgentCount|isAgentConnected|getHeadId\(|getVisibleSteps|getReActStepsByOperatorAccess|getStepsByOperatorIds|PortShapes|isBaselineMode|ApiMessageResponse|let-active=|of agents; let i" -- frontend/src/app/workspace/service/agent frontend/src/app/workspace/component/agent
```

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

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI dependencies Pull requests that update a dependency file frontend Changes related to the frontend GUI service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Managing LLM agents using a dedicated micro service

6 participants