发布

  • [OPIK-5247] [BE] fix: preserve assertion results and status after experiment item aggregation (#5999)

    frostbyte_neo 发布于 2026-03-31 13:54:50 +00:00

    When experiment items are aggregated into experiment_item_aggregates,
    the has_aggregated branch in ExperimentItemDAO was returning an empty
    string for assertions_array instead of reading the stored value from
    the aggregates table. Similarly, DatasetItemVersionDAO was live-joining
    assertion_results instead of reading from experiment_item_aggregates.

    Changes:

    • ExperimentItemDAO: has_aggregated branch now reads ei.assertions_array
      from experiment_item_aggregates instead of returning '' AS assertions_array
    • DatasetItemVersionDAO: has_aggregated branch now reads eia.assertions_array
      from experiment_item_aggregates instead of live-joining assertion_results
    • ExperimentAggregatesDAO: added GET_ASSERTIONS_ARRAY aggregation step that
      collects assertion names, pass/fail values, and reasons into a JSON array
      stored in experiment_item_aggregates.assertions_array
    • ExperimentSourceData: added assertionsArray field to carry aggregated data
    • Migration 000076: adds assertions_array String DEFAULT '[]' column to
      experiment_item_aggregates
    • ExperimentAggregatesIntegrationTest: two new integration tests verifying
      that assertionResults and status are preserved before and after aggregation
      in both the stream endpoint and the dataset items view

    Implements OPIK-5247

    下载附件