You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/07/11 07:06:08 UTC
[I] add unit test coverage for agent-service assembleContext (context-utils.ts) [texera]
mengw15 opened a new issue, #6333:
URL: https://github.com/apache/texera/issues/6333
### Task Summary
`agent-service/src/agent/util/context-utils.ts` (codecov ~1.2%) exports `assembleContext(...)`, a pure function (type-only imports, no network) that builds the per-step LLM context: it groups `ReActStep`s by task, serializes completed vs ongoing tasks into markdown sections, appends a dataflow section, and returns `[{ role: "user", content }]`. `agent-service` uses `bun test`; add a `.spec.ts` next to the file (pattern: `util/auto-layout.spec.ts`).
### Behavior to cover
- Empty steps -> returns a single `{ role: "user", content }` message with no task sections
- Steps of a completed task -> `content` contains a `# Completed Tasks` heading + the serialized task
- Steps of an ongoing task -> `content` contains an `# Ongoing Task` heading
- A provided DAG section -> `content` contains `# Current Dataflow` followed by the DAG
- Steps sharing a `messageId` are grouped into the same task
- Return value is always length-1, `role: "user"`, `content` = sections joined by `\n`
- A task with a user step + agent steps renders `## Task (completed|ongoing)` with the request and assistant steps
### 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] add unit test coverage for agent-service assembleContext (context-utils.ts) [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #6333: add unit test coverage for agent-service assembleContext (context-utils.ts)
URL: https://github.com/apache/texera/issues/6333
--
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] add unit test coverage for agent-service assembleContext (context-utils.ts) [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6333:
URL: https://github.com/apache/texera/issues/6333#issuecomment-4943368752
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @mengw15!
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