aglinxinyuan opened a new issue, #7382:
URL: https://github.com/apache/texera/issues/7382
### Task Summary
`TexeraAgent` has no spec, and it is the largest untested file in the
service.
Most of the class is bookkeeping that `sendMessage` maintains but that needs
no model to exercise. The interesting part is that the ReAct step tree is a
real **tree**, not a list: each step carries a `parentId`, and a `head` pointer
selects the active branch. Regenerating an answer leaves the abandoned branch
in `stepsById`, so the two readers must disagree on purpose:
```
INITIAL ── a ── b head = b
└─ c
getVisibleReActSteps() -> [a, b] the conversation the user sees
getAllSteps() -> [a, b, c] everything retained
```
`getReActStepsByOperatorIds` then attributes each step to the operators it
touched, by reading the tool results. That attribution is gated on the tool's
**name** agreeing with its message, so a delete tool echoing "Added operator X"
cannot claim X — and the structured-JSON path uses a stricter exact-name gate
than the text path does. The asymmetry is deliberate and currently unpinned.
Also uncovered: partial `updateSettings` (only `allowedOperatorTypes`
triggers a system-prompt rebuild), the defensive copy in `getSettings`, and
`clearHistory` / `stop` / `destroy`.
Note that an empty `operatorIds` filter means "no filter" and returns every
step — the opposite reading would blank the history whenever no operator is
selected.
The LLM loop in `sendMessage` is out of scope here; it needs the AI SDK
stubbed and deserves its own pass.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]