Skip to content

feat(agents): drop the legacy Conversation/Message model - #82

Merged
ExtraToast merged 1 commit into
mainfrom
drop/legacy-conversations
Sep 17, 2026
Merged

ExtraToast merged 1 commit into
mainfrom
drop/legacy-conversations

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

Summary

Second of three steps toward moving the renamed Conversation model onto /api/v1/conversations (#68). Drops the legacy Conversation/Message model entirely: domain classes, ids, statuses, the ConversationStartedEvent (no listener consumes it), both ports, the codegen-backed jOOQ repositories, both controllers, their DTOs, command handlers, query services, their tests, and the message and conversation tables.

This is the removal that #81 made possible. oasdiff raises api-path-removed-without-deprecation on a path that disappears, but nothing when the base already marks it deprecated — and #81 put that marker on main.

Validation

  • :api:test — 594 tests, 592 passed, 0 failed, 2 pre-existing skips
  • :api:integrationTest — 115 tests, 113 passed, 0 failed, 2 skipped
  • detekt (main, test, integrationTest) + ktlint --warning-mode=fail — clean
  • Spec regenerated and committed: 540 lines removed, six endpoints gone
  • oasdiff breaking against the current origin/mainno breaking changes

That last line is the whole point of the sequence. The identical removal was flagged before #81 landed.

Notes

  • /api/v1/conversations is absent from the service until step three lands. Neither agents-ui nor home-portal calls it — agents-ui uses /api/v1/chat-sessions exclusively — but an undocumented external caller cannot be ruled out from this repo. The endpoints are published in @jorisjonkers-dev/agents-api-client, so worth a glance at real traffic before merging if that is cheap to check.
  • The conversation and message tables are dropped by migration in FK order. They are separate from chat_sessions, which step three renames and which keeps all its rows.
  • Two ArchUnit rules had hard-coded predicates that went empty when these classes disappeared. One matched @Service, an annotation unique to the three deleted handlers; it now matches on the CommandHandler interface. ArchUnit's failOnEmptyShould turned that into a hard failure rather than a silent pass, which is how it was caught.

Next: #79 rebased onto this — the rename, the ownership fix from #80, and the deprecated /api/v1/chat-sessions alias.

refs #68

Nothing in this workspace calls /api/v1/conversations any more --
agents-ui talks to /api/v1/chat-sessions exclusively -- and no listener
was ever registered for ConversationStartedEvent. Drop the model, its
ports, jOOQ repos, controller, DTOs, command handlers and query
services, and the message/conversation tables (V26).

The ArchUnit "command handlers end with CommandHandler" rule matched
only on @service, which was unique to the three handlers just removed;
every remaining handler is @component, so the rule started checking
zero classes and failing outright (ArchUnit's failOnEmptyShould).
Match the CommandHandler interface instead of the stereotype so the
rule stays live regardless of which annotation a handler carries.
@ExtraToast ExtraToast added type: feature New user-facing or operator-facing capability. area: agents Agent runtime, agent APIs, tools, prompts, or UI. component: api HTTP API, OpenAPI contract, or API client concern. labels Sep 17, 2026
@ExtraToast ExtraToast self-assigned this Sep 17, 2026
@ExtraToast
ExtraToast merged commit 92c5cc0 into main Sep 17, 2026
9 checks passed
@ExtraToast
ExtraToast deleted the drop/legacy-conversations branch September 17, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent runtime, agent APIs, tools, prompts, or UI. component: api HTTP API, OpenAPI contract, or API client concern. type: feature New user-facing or operator-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant