You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/10 00:40:40 UTC
[I] Drive TexeraAgent.sendMessage with a stand-in language model [texera]
aglinxinyuan opened a new issue, #7486:
URL: https://github.com/apache/texera/issues/7486
### Task Summary
`sendMessage` is the largest untested region in the whole service: lines 475–712 of
`texera-agent.ts`, 238 of the file's 292 uncovered lines. The existing 26-test spec stops at the
model boundary and never enters it, which leaves the ReAct loop, its usage accounting, its branch
bookkeeping, and every one of its failure paths unexercised.
None of that needs the network. `ai@7.0.48` ships `MockLanguageModelV4` from the `ai/test` export,
and it satisfies the same `LanguageModel` type `TexeraAgentConfig` already accepts — so the loop can
be driven in-process, with `fetch` spied on as a tripwire to prove no call escapes.
Five traps are worth writing down, because each one produces a test that passes while asserting
nothing:
1. **`LanguageModelV4Usage` is nested.** A flat `{ inputTokens: 11 }` is silently discarded and
every usage assertion then passes against a gutted mapping.
2. **`LanguageModelV4FinishReason` is an object** (`{ unified, raw }`), not a string. A bare
`finishReason: "stop"` runs fine under `bun test` and fails `tsc --noEmit`.
3. **A tool call's `input` must be a JSON string**, not an object.
4. **Setting a delegate config makes the first turn refresh from the backend**, and that refresh
replaces the whole workflow — operators seeded directly on the agent are wiped, so they have to
arrive through the `fetch` stub.
5. **`maxSteps: 0` is an infinite loop.** `stepCountIs(0)` never fires. Do not write that test; it
hangs the suite rather than failing it.
Only `getStepsById` (line 261) would remain uncovered, and it has no call site anywhere in the repo.
### 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: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Drive TexeraAgent.sendMessage with a stand-in language model [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #7486: Drive TexeraAgent.sendMessage with a stand-in language model
URL: https://github.com/apache/texera/issues/7486
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Drive TexeraAgent.sendMessage with a stand-in language model [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7486:
URL: https://github.com/apache/texera/issues/7486#issuecomment-5234718799
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @aglinxinyuan!
It looks like the issue description doesn't quite follow our template yet:
- This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org