Skip to content

[feat][evaluation] expose target execution context for run initiators - #671

Closed
HearyShen wants to merge 1 commit into
mainfrom
codex/aime-lark-grant-20260917
Closed

HearyShen wants to merge 1 commit into
mainfrom
codex/aime-lark-grant-20260917

Conversation

@HearyShen

Copy link
Copy Markdown
Collaborator

Evaluation targets need the initiator of the specific experiment run when granting access to generated artifacts. Target-registration authors and the experiment's original creator can differ from the owner of a rerun.

Adds an authenticated, read-only execution-context endpoint. It checks workspace access before reading the persisted target record and its associated run, then returns the run initiator and execution coordinates. Missing or deleted records/runs fail closed. Shared targets retain distinct target and experiment workspace IDs.

Validation: the four affected package suites passed; focused tests and race checks cover authorization before lookup, reruns, same-run appends, shared workspaces, missing identities, and soft deletion using the real repository implementation. HTTP/application builds and vet passed. Independent code review found no blocking defects. The generated API changes were reviewed as additions with no removed definitions.

Draft pending downstream integration and end-to-end verification.

@HearyShen HearyShen closed this Sep 18, 2026
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...api/handler/coze/loop/apis/eval_open_apiservice.go 0.00% 2 Missing ⚠️
...ation/application/eval_target_execution_context.go 92.00% 1 Missing and 1 partial ⚠️
...luation/domain/service/target_execution_context.go 90.90% 1 Missing and 1 partial ⚠️
...s/evaluation/infra/repo/experiment/expt_run_log.go 71.42% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #671      +/-   ##
==========================================
+ Coverage   78.82%   78.85%   +0.02%     
==========================================
  Files         707      709       +2     
  Lines       87823    87950     +127     
==========================================
+ Hits        69227    69349     +122     
- Misses      14607    14609       +2     
- Partials     3989     3992       +3     
Flag Coverage Δ
unittests 78.85% <85.71%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
...api/handler/coze/loop/apis/eval_open_apiservice.go 4.54% <0.00%> (-0.07%) ⬇️
...ation/application/eval_target_execution_context.go 92.00% <92.00%> (ø)
...luation/domain/service/target_execution_context.go 90.90% <90.90%> (ø)
...s/evaluation/infra/repo/experiment/expt_run_log.go 83.78% <71.42%> (+7.11%) ⬆️

... and 5 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 b699d63...a2accfb. 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.

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.

1 participant