addOperator returns an error but still adds the operator
Les mainteneurs répondent en général sous 1 jour
@sunny-kavixo y travaille déjà.
Depuis le 11/11/2026.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- ai-infra-agents, backend
Piste de recherche
Commencez dans agent-service/src/agent/tools/workflow-crud-tools.ts, à createAddOperatorTool, et suivez la validation de inputOperatorIds par rapport à l’ajout de l’opérateur. Reproduisez le problème avec un opérateur source manquant, puis ajoutez un test unitaire ciblé pour le cas d’erreur. Le travail est terminé lorsqu’une erreur laisse WorkflowState inchangé ; déterminez si modifyOperator nécessite le même traitement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What happened?
addOperator can return an error but still add the operator to the workflow.
In agent-service/src/agent/tools/workflow-crud-tools.ts, createAddOperatorTool first calls workflowState.addOperator(operator), and only then checks inputOperatorIds. If a source operator does not exist, it returns [ERROR] ..., but the new operator stays in the workflow, not connected. The agent then saves it to the user's workflow.
Example on main. Prompt: "Add a Limit operator that keeps 10 rows, and connect its input to the existing operator op7." (there is no op7). addOperator returned [ERROR] Source operator "op7" not found, but a Limit operator (op8) still showed up on the canvas. The agent then said: "I can see that you've already added the Limit operator op8". It thought the user added it. Then it tried to connect op8 again and again until the step limit (see #9115, #9116).
Expected: if addOperator fails, the workflow should not change. Check inputOperatorIds (source exists, port index is valid) before adding the operator, or remove the operator when the check fails. modifyOperator has a similar link loop and may need the same fix.
Screenshots
The canvas after the run: an unconnected Limit operator (op8) is on the canvas, even though addOperator returned an error.

Step 3, what the agent was given: op8 is in the workflow, and the agent says "I can see that you've already successfully added the Limit operator op8".

How to reproduce?
- Open an empty workflow, create an agent, and send:
Add a Limit operator that keeps 10 rows, and connect its input to the existing operator op7. - The first
addOperatorreturns[ERROR] Source operator "op7" not found..., but an unconnected Limit operator appears on the canvas.
Unit test idea: call the addOperator tool with inputOperatorIds: {"0": ["missing"]} on an empty WorkflowState. The result starts with [ERROR], but state.getAllOperators() has 1 operator.
Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
57faa6b
What browsers are you seeing the problem on?
Chrome
Relevant log output
agent-service/src/agent/tools/workflow-crud-tools.ts:146 workflowState.addOperator(operator) runs before the inputOperatorIds checks (lines 151-183)
- Langage dominant
- Scala
- Étoiles
- 333
- Forks
- 202
- Merge moyen
- 3 j 11 h
- PR mergées (30 j)
- 185
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/texera
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Failed tool calls are marked as succeeded (isError is always false)Peut-être pris @oliarmak-web l’a pris il y a 14 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
apache/texera#9120 · 8 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
apache/texera#8682 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
JSONL File Scan reads a JSON null as the text "null"Peut-être pris @CaroFernando l’a pris il y a 49 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
apache/texera#8674 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/texera
Issues similaires
-
Stale docs versionOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
? - Needs Triage bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
NVIDIA/cudf-spark#16937 ·
Les mainteneurs répondent en général sous 1 jour
-
LFST not-issued-store count truncation can incorrectly clear strictShouldWaitPeut-être pris @weidingliu l’a pris aujourd’hui. Ouvertemodule: memory type: bug/reported
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
OpenXiangShan/XiangShan#6974 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
-
bug indigo
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
PurpleKingdomGames/indigoengine#300 · 1 commentaire ·
-
JavaReservoirSampleOperator returns the whole input when the dataset size is unknownPeut-être pris @sasmith-14 l’a pris il y a 2 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/wayang#884 · 3 commentaires ·
Les mainteneurs répondent en général sous 2 jours