发布

  • [OPIK-7177] [FE] fix: surface experiment traces in "Go to logs" and Playground trace link (scope by experiment_id) (#7322)

    frostbyte_neo 发布于 2026-07-02 15:20:47 +00:00

    • [OPIK-7177] [BE][FE] fix: show experiment & playground traces in scoped "Go to logs" views

    Experiment and Playground "Go to logs" tables came up empty even though the
    traces existed and were visible on the experiment item.

    Two independent root causes:

    • Experiment: experiment runs auto-create traces marked visibility_mode=hidden
      (the "invisible" placeholder in ExperimentItemBulkIngestionService). The
      scoped logs sidebar pinned visibility_mode=default, so those never returned.
      Fix (FE): entity-scoped views no longer pin visibility — add
      TRACE_VISIBILITY_MODE.all (maps to "no visibility filter") and default the
      shared TraceLogsViewConfig to it. The experiment view now scopes purely by
      experiment_id (dropped the redundant source=experiment pin) so it returns the
      experiment's traces regardless of source or visibility. The main Logs page
      (source=sdk + default) and the evaluator view (pinned hidden) are unchanged.

    • Playground: playground traces were labelled source=experiment while the
      Playground "Go to logs" filters source=playground — so it never matched.
      Fix (BE): ExperimentTracePersistence now stamps source=PLAYGROUND. No
      migration needed; 'playground' is already a valid source Enum8 value.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • revert(playground): keep dataset-backed experiment traces source=experiment

    Drop the source=PLAYGROUND change in ExperimentTracePersistence. That path is
    the dataset-backed playground experiment (ExperimentExecutionRequest requires a
    datasetId) — those runs are genuine experiments and are correctly source=experiment.
    Only regular no-dataset playground runs should ever be source=playground, and
    they don't go through this path. The real OPIK-7177 fix is the frontend change:
    the experiment "Go to logs" now scopes purely by experiment_id, so it shows the
    experiment's traces regardless of source (manual reference-linked traces are
    stored source=sdk) or visibility.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • fix(playground): open per-result trace in experiment logs, not main Logs

    The trace button on each Playground result row navigated to the main project
    Logs page (source=sdk, which excludes experiment traces by design) with a
    trace= param — the trace opened by id, but the surrounding list was empty. For
    dataset/experiment runs, route it to the experiment logs view instead (the same
    destination as the experiment page's "Go to logs"): the experiment-scoped
    sidebar (tls_open + experiment_ids filter) with the trace pre-opened (tls_trace).
    Non-experiment runs keep the previous project-logs behavior.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

    下载附件