发布

  • [OPIK-6791] [BE][FE] Add source_queue_id to scores/comments and scope feedback by queue (#7134)

    frostbyte_neo 发布于 2026-06-19 08:38:20 +00:00

    • [OPIK-6791] [BE][FE] Add source_queue_id to scores/comments and scope feedback by queue
    • Add source_queue_id column to authored_feedback_scores and comments tables
    • Pass annotation_queue_id as query param on traces/threads list endpoints
    • Filter feedback scores, comments, and reviewer counts by source_queue_id in queue queries
    • Fix queue list avg feedback scores not filtered by source_queue_id
    • Fix queue details table not passing annotationQueueId to list hooks
    • Scope feedback score deletion by current user (both tables, all entity types)
    • Hide delete button in side panel for scores not owned by current user
    • Add integration test for queue-scoped feedback scores and comments
    • Update existing tests to pass sourceQueueId where needed
    • Revision: Fix migration, DAO bindings, and feedback score delete button

    Add source_queue_id to authored_feedback_scores ORDER BY so
    ReplacingMergeTree deduplicates scores per-queue — the same user can
    now score the same entity/name from different annotation queues without
    one overwriting the other. Combine ADD COLUMN + MODIFY ORDER BY in a
    single ALTER TABLE and drop DEFAULT expression to satisfy ClickHouse
    restrictions. Fix v2 feedback score delete button in open-source mode
    by resolving username to "admin" fallback.

    • Revision 2: Scope feedback score/comment deletion by source_queue_id in SME flow

    When deleting a score from an annotation queue, the delete is now scoped
    to that queue's source_queue_id so scores created from other queues are
    preserved. Without this, deleting a score in one queue would remove the
    same-named score across all queues for that user.

    BE: Add sourceQueueId to DeleteFeedbackScore, DeleteThreadFeedbackScores,
    and wire it through FeedbackScoreService/DAO delete paths (only applied
    to the authored_feedback_scores table, never legacy feedback_scores).

    FE: Pass annotationQueue.id as sourceQueueId in the SME flow delete
    mutations for both traces and threads.

    Tests: Add queue-scoped delete E2E tests for traces and threads,
    use full-object comparison for FeedbackScoreAverage assertions.

    • Revision 3: Revert DAO delete author hardcoding, fix FE ownership check

    Restore main's conditional author behavior in deleteScoreFrom and
    deleteByEntityIdAndNames — use score.author() from the request instead
    of hardcoding userName, preserving SDK backwards compatibility.

    Fix v2 ActionsCell ownership check to use row.author (per-user child
    row field) instead of created_by (inherited from parent spread).

    Update tests to match main's pattern: specify target author explicitly
    with any API key rather than requiring the target user's API key.

    下载附件