Skip to content

[feat][backend] add extra_output field to ListExperimentResultOApi response#554

Closed
VinCinx wants to merge 8 commits into
mainfrom
add_openapires_param
Closed

[feat][backend] add extra_output field to ListExperimentResultOApi response#554
VinCinx wants to merge 8 commits into
mainfrom
add_openapires_param

Conversation

@VinCinx

@VinCinx VinCinx commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

What type of PR is this?

feat

Check the PR title

[feat][backend] add extra_output field to ListExperimentResultOApi response

  • This PR title match the format: $$$$$$$$
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Add documentation if the current PR requires user awareness at the usage level.
  • This PR is written in English.

(Optional) Translate the PR title into Chinese

为 ListExperimentResultOApi 接口返回值增加 extra_output 字段

(Optional) More detailed description for this PR

en: Add extra_output (containing output_type and url) to the OpenAPI experiment result response. Previously this field was only available via the internal BatchGetExperimentResult API. Changes include: updating the OpenAPI IDL, regenerating kitex_gen, adding entity-to-DTO conversion, injecting fileProvider for URI-to-URL signing, and fixing the private convertor in the experiment package.

zh: 为 OpenAPI 实验结果接口补齐 extra_output 字段(含 output_type 和签名后的 url)。此前该字段仅在内部接口 BatchGetExperimentResult 中返回。改动涉及 IDL 更新、kitex 代码生成、DTO 转换逻辑、fileProvider 注入签名,以及 experiment 包内私有 convertor 的同步修复。

(Optional) Which issue(s) this PR fixes

N/A

VinCinx and others added 3 commits June 22, 2026 19:32
…ponse

- Add EvaluatorExtraOutputContent struct to domain_openapi IDL
- Regenerate kitex_gen from updated IDL
- Add OpenAPIEvaluatorExtraOutputContentDO2DTO convertor
- Inject fileProvider into EvalOpenAPIApplication for URI-to-URL signing
- Add fillExtraOutputURLs to sign TOS URIs before returning response
- Regenerate wire_gen.go
- Add unit tests for extra_output conversion
…riment convertor)

The ListExperimentResultOApi uses openAPIEvaluatorOutputDataDO2DTO (lowercase,
in convertor/experiment/openapi.go) instead of the public
OpenAPIEvaluatorOutputDataDO2DTO (in convertor/evaluator/openapi.go).
The private method was missing the ExtraOutput and Stdout field mapping.
… tracing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.11594% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...modules/evaluation/application/eval_openapi_app.go 54.16% 20 Missing and 2 partials ⚠️

❌ Your patch status has failed because the patch coverage (68.11%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #554      +/-   ##
==========================================
+ Coverage   77.60%   78.06%   +0.45%     
==========================================
  Files         670      670              
  Lines       75995    76214     +219     
==========================================
+ Hits        58979    59494     +515     
+ Misses      13565    13283     -282     
+ Partials     3451     3437      -14     
Flag Coverage Δ
unittests 78.06% <68.11%> (+0.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...luation/application/convertor/evaluator/openapi.go 96.53% <100.00%> (+4.63%) ⬆️
...uation/application/convertor/experiment/openapi.go 89.82% <100.00%> (+6.25%) ⬆️
...d/modules/evaluation/application/experiment_app.go 84.36% <100.00%> (+0.02%) ⬆️
...evaluation/domain/service/expt_result_aggr_impl.go 79.75% <100.00%> (+0.08%) ⬆️
...modules/evaluation/application/eval_openapi_app.go 90.17% <54.16%> (-2.11%) ⬇️

... and 27 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 016641a...3ad78fb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

VinCinx and others added 5 commits June 24, 2026 11:55
…r BatchGetExptAggrResultByExperimentIDs

Add a dedicated table-driven case asserting that experiments whose SpaceID
differs from the input spaceID are filtered out (validExptIDs), so all
downstream queries (BatchGetExptAggrResultByExperimentIDs / GetEvaluatorRefByExptIDs /
batchGetTagInfoByExperimentIDs) only receive the valid exptID and the
cross-space exptID is dropped. Verified via mutation: removing the filter
makes this case fail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rizontal privilege escalation

UpdateExperiment used req.WorkspaceID to overwrite the DB space_id without
verifying ownership, allowing an attacker to move another workspace's
experiment into their own. Validate got.SpaceID == req.GetWorkspaceID()
right after Get and before any write, mirroring DeleteExperiment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add 'workspace mismatch with experiment space' case asserting the request
is rejected before manager.Update is invoked, mirroring the
DeleteExperiment test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VinCinx VinCinx closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants