refactor(agent-service): centralize backend DTOs, metadata, endpoint config, and auth#5928
Draft
bobbai00 wants to merge 2 commits into
Draft
refactor(agent-service): centralize backend DTOs, metadata, endpoint config, and auth#5928bobbai00 wants to merge 2 commits into
bobbai00 wants to merge 2 commits into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
This was referenced Jun 24, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5928 +/- ##
============================================
+ Coverage 56.25% 56.83% +0.58%
Complexity 2992 2992
============================================
Files 1120 1124 +4
Lines 43175 43042 -133
Branches 4658 4632 -26
============================================
+ Hits 24286 24463 +177
+ Misses 17469 17159 -310
Partials 1420 1420
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jun 24, 2026
bobbai00
added a commit
to bobbai00/texera
that referenced
this pull request
Jun 28, 2026
…#5930) ### What changes were proposed in this PR? Removes the step-checkout feature from agent-service, which was wired end-to-end but unreachable — nothing in the product ever invokes the frontend `checkoutStep()`, so the backend `/agents/:id/checkout` endpoint and its `headChange` WebSocket broadcast were never triggered. Removing the dead vertical slice: - `agent-service/src/server.ts` — drop the `POST /:id/checkout` route and the `headChange` / `workflowContent` members of the outgoing WebSocket-message type. - `agent-service/src/agent/texera-agent.ts` — drop `TexeraAgent.checkout()`. - `frontend/.../agent/agent.service.ts` — drop the `case "headChange"` WS handler and the unused `checkoutStep()` method. HEAD *tracking* is retained: `init`/`step` messages still carry `headId`, and the chat panel still walks the ancestor path from HEAD to render the visible step chain. Only the backward HEAD move (checkout) is removed. This branches from `main` and is independent of the type-refactor stack (apache#5751 → apache#5928/apache#5927). Note apache#5751 currently lists `headChange` as a server message; whichever merges second will drop it from the union — a trivial reconciliation. ### Any related issues, documentation, discussions? Closes apache#5942 Part of apache#5747. Independent of the stack (branches from `main`). ### How was this PR tested? agent-service: `tsc --noEmit` clean, 93/93 `bun test` pass, prettier clean. Frontend: the removed `checkoutStep()` had zero callers and the `headChange` handler is now unreachable; verified no remaining `checkout`/`headChange` references and no orphaned imports. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 (1M context) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…config, and auth Consolidate the agent-service type/config layer. Stacked on the WS PR (apache#5751); types/execution.ts is left untouched (its redesign is a separate PR). - types/dto.ts: backend request/response DTOs (workflow persistence, compiling-service responses, WorkflowFatalError). - types/metadata.ts: operator-metadata types extracted from api/backend-api. - config/endpoints.ts: getServiceEndpoints() centralizing backend base URLs. - auth/jwt.ts: relocated from api/auth-api; update import paths. - Replace `any` with precise types across src/types/*; type ReActStep tool/message fields precisely. - Consume the centralized types at call sites (clients, server, agent utils). - Expand test coverage (jwt, workflow-system-metadata, compile/workflow clients); rename *.test.ts -> *.spec.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qFkyrpTd5PrkNBPcBeo4Q
ee9205f to
af73dff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Centralizes the agent-service type/config layer (no runtime behavior change). Stacked on #5751 (the WS-types PR).
types/dto.ts— backend request/response DTOs (workflow persistence, compiling-service responses,WorkflowFatalError).types/metadata.ts— operator-metadata types extracted fromapi/backend-api.config/endpoints.ts—getServiceEndpoints()centralizing backend base URLs.auth/jwt.ts— relocated fromapi/auth-api; import paths updated.anywith precise types acrosssrc/types/*; typeReActSteptool/message fields.workflow-system-metadata, compile/workflow clients) and rename*.test.ts→*.spec.ts.types/execution.tsis intentionally untouched here — its redesign is #5927.Any related issues, documentation, discussions?
Closes #5748
Part of #5747.
How was this PR tested?
bunx tsc --noEmit,bun test(126 pass / 0 fail), andprettier --checkall pass inagent-service.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)