- add TopologyAnalysisHandler.Execute() with 5-phase BFS reachability
check between start/end component UUIDs; support CheckInService flag
to skip out-of-service nodes during traversal
- carry task params through RabbitMQ message (TaskQueueMessage.Params)
instead of re-querying DB in handler; update TaskHandler.Execute
interface and all handler signatures accordingly
- fix BuildMultiBranchTree UUIDFrom condition bug; return nodeMap for
O(1) lookup; add QueryTopologicByStartUUID for directed traversal
- add QueryBayByUUID/QueryBaysByUUIDs and
QueryComponentsInServiceByUUIDs (two-column select) to database layer
- add diagram.FindPath via LCA algorithm for tree path reconstruction
- move initTracerProvider to middleware.InitTracerProvider; add
OtelConfig struct to ModelRTConfig for endpoint configuration
- update topology analysis params to start/end_component_uuid +
check_in_service; remove dead topology init code
- introduce typed traceCtxKey to prevent context key collisions (staticcheck fix)
- inject B3 trace values into c.Request.Context() in StartTrace middleware
so handlers using c.Request.Context() carry trace info
- create startup trace context in main.go, replacing context.TODO()
- propagate HTTP traceID/spanID through TaskQueueMessage into RabbitMQ
worker, linking HTTP request → publish → execution on the same traceID
- fix GORM logger null traceID by binding ctx to AutoMigrate and queries
via db.WithContext(ctx)
- thread ctx through handler factory to fix null traceID in startup logs
- replace per-request RabbitMQ producer with channel-based
PushTaskToRabbitMQ goroutine; restrict Swagger to non-production
Split monolithic async_task_handler.go into separate handlers:
- async_task_cancel_handler.go: Handles task cancellation
- async_task_create_handler.go: Handles task creation
- async_task_progress_update_handler.go: Handles progress updates
- async_task_result_detail_handler.go: Handles result details
- async_task_result_query_handler.go: Handles result queries
- async_task_status_update_handler.go: Handles status updates
This improves code organization and maintainability by separating concerns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create task/types_v2.go with unified task type definitions and interfaces
* Add UnifiedTaskType and UnifiedTaskStatus constants
* Define Task:Params interface for parameter validation and serialization
* Define UnifiedTask interface as base for all task implementations
* Add BaseTask for common task functionality