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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to