Commit fb49c15
Enable session management v2 by default (#4091)
* Enable session management v2 flag by default
* solve bugs and fix tests
Regenerate aggregator mock to restore alphabetical method order
MergeCapabilities was placed after ProcessPreQueriedCapabilities in the
mock file. Running go generate restores the mockgen-expected alphabetical
order to pass the codegen verification CI check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix composite tool name collision in SMv2 session registration
The v2 session registration path (handleSessionRegistrationV2) was adding
composite tools without checking for name conflicts with backend tools,
unlike the v1 injectCapabilities path which uses validateNoToolConflicts.
- Add GetMultiSession to the SessionManager interface so server.go can
access the session's resolved backend tool list for conflict validation
- Call validateNoToolConflicts before registering composite SDK tools,
skipping them (with an error log) if a collision is detected
- Track actual composite tools added for accurate log output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix composite tool routing failure in SMv2 path
Composite tool workflow steps call the shared router which reads
DiscoveredCapabilities from the request context, but the discovery
middleware was short-circuiting for MultiSession sessions and never
injecting them, causing "capabilities not found in context" errors.
- Add GetRoutingTable() to the MultiSession interface and implement it
on defaultMultiSession (routing table is immutable post-creation)
- Update discovery middleware: instead of skipping context injection for
MultiSession, build AggregatedCapabilities from the session's routing
table and inject it — enabling composite tool workflow steps to route
backend tool calls correctly
- Guard against nil routing table (session initialisation not yet complete)
- Add GetRoutingTable() stub to test fakes in session manager and
integration tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: taskbot <taskbot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 6578f21 commit fb49c15
24 files changed
Lines changed: 1128 additions & 130 deletions
File tree
- cmd
- thv-operator/controllers
- vmcp/app
- deploy/charts/operator-crds
- files/crds
- templates
- docs/operator
- pkg/vmcp
- aggregator
- mocks
- config
- discovery
- server
- sessionmanager
- session
- types
- test/e2e/thv-operator/virtualmcp
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
685 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
686 | 688 | | |
687 | 689 | | |
688 | 690 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| |||
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
| 325 | + | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
| |||
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
335 | | - | |
| 339 | + | |
336 | 340 | | |
337 | 341 | | |
338 | 342 | | |
| |||
522 | 526 | | |
523 | 527 | | |
524 | 528 | | |
525 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
526 | 532 | | |
527 | | - | |
528 | | - | |
| 533 | + | |
| 534 | + | |
529 | 535 | | |
530 | 536 | | |
531 | 537 | | |
| |||
547 | 553 | | |
548 | 554 | | |
549 | 555 | | |
550 | | - | |
| 556 | + | |
551 | 557 | | |
552 | 558 | | |
553 | 559 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| 695 | + | |
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | | - | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| 698 | + | |
698 | 699 | | |
699 | 700 | | |
700 | 701 | | |
701 | 702 | | |
702 | | - | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| |||
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
496 | 577 | | |
497 | 578 | | |
498 | 579 | | |
| |||
0 commit comments