Skip to content

feat: add Experiment lifecycle recovery - #1517

Merged
Cedric Vidal (cedricvidal) merged 351 commits into
integration/taxonomyfrom
cedricvidal-experiment-lifecycle
Dec 3, 2026
Merged

Cedric Vidal (cedricvidal) merged 351 commits into
integration/taxonomyfrom
cedricvidal-experiment-lifecycle

Conversation

@cedricvidal

Copy link
Copy Markdown
Collaborator

Summary

Adds recoverable Experiment deletion and restore as the fifth stacked Experiment successor PR.

  • Persists lifecycle identity, phase, CAS version, exact chunk-backed request/report target snapshots, progress, blockers, and deletion provenance.
  • Freezes Experiment mutation and publication before cascading; queue claims and worker final writes reject deleted or lifecycle-active records.
  • Restores only children owned by the exact operation, preserves independently deleted records, and rolls to a fresh execution when the restored request/run vector drifted.
  • Repairs interrupted operations from dispatcher polling, isolates per-Experiment repair failures, and rotates blocked work fairly.
  • Adds project-scoped REST, CLI, Portal, Storybook, migration, OpenAPI, and architecture/website documentation surfaces.

Stacked on #1516.

Demos

Before

N/A — Experiment lifecycle management did not previously exist.

After

Lifecycle list visibility, deletion progress, retained deleted state, child-first restore, and reconciled active state:

experiment-lifecycle.mp4

Deletion progress:

Experiment deletion progress

Restore progress:

Experiment restore progress

Testing

  • pnpm test — passed 294 files / 3,528 tests before final review fixes.
  • pnpm test — passed 293 files / 3,529 tests after final review fixes; one unrelated Windows PowerShell test timed out.
  • pnpm exec vitest run scripts/build-windows-worker.test.ts — passed 8/8 on immediate isolated rerun.
  • Consolidated lifecycle coverage — passed 130/130 tests before final review; focused lifecycle/coordinator/migration regressions passed 18/18 after review fixes.
  • Production builds passed for shared, telemetry, db-migrations, API, CLI, Portal, readout-handler, report-generator, Storybook, and documentation website.
  • OpenAPI generation/snapshot, Storybook play coverage, website tests/build, and git diff --check passed.
  • Compose smoke attempted once with the isolated worktree project; blocked before startup by host Podman ENOSPC at /var/tmp/libpod_builder…. No prune, delete, or retry was performed.
  • Walkthrough take 2 validated as H.264/yuv420p, 1440×900, 25 fps, faststart; full decode and representative encoded-frame inspection passed.

Documentation and compatibility

  • Updated docs/architecture/experiments.md and docs/architecture/app-design.md.
  • Updated the website Experiment guide and regenerated the committed OpenAPI document.
  • Migration 036 adds Cosmos-compatible lifecycle polling and deletion-provenance indexes.
  • Existing active Experiment behavior remains compatible; deleted records remain hidden unless includeDeleted / Show deleted is explicit.

Checklist

  • If Portal features changed, keep CLI capabilities in sync.
  • If Portal components changed, update their Storybook stories.
  • If database changes require a migration, include up() / down() and keep it CosmosDB-compatible.
  • If dependencies changed, update the lockfile and regenerate NOTICE / NOTICE-REVIEW.txt with pnpm notice as needed. (N/A — no dependency changes.)
  • Video showing the behavior before the suggested change (N/A — new capability.)
  • Video showing the behavior after the suggested change

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b4a63b3-29db-4d12-888f-051592682640
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
Add compact attempt-scoped Runs, Reports, and Processing tabs with URL-backed report type and version history selection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b4a63b3-29db-4d12-888f-051592682640
Keep report identity, controls, badges, and actions anchored while only the report body changes across completed, processing, blocked, failed, and empty states.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b4a63b3-29db-4d12-888f-051592682640
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a

# Conflicts:
#	apps/portal/src/pages/ExperimentDetail.test.tsx
#	apps/portal/src/pages/ExperimentDetail.tsx
#	docs/architecture/experiments.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Extend versioned report templates to Experiment executions with immutable template identities, independent scheduling and retries, API and CLI parity, Portal configuration and report history, migration coverage, prompt evaluations, and documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a1387f4c-83dd-48cb-9e8c-07398fefd60e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
@github-actions github-actions Bot added type: documentation Documentation additions, corrections, and improvements. area: worker Coding agent worker runtime, task execution, and lifecycle. area: cli Scope command-line interface and terminal workflows. area: infrastructure Cloud resources, hosting, networking, and shared infrastructure. language: javascript Work involving JavaScript code, tooling, or dependencies. area: portal Scope web portal, pages, and user-facing components. area: reporting Generation and delivery of benchmark reports. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. labels Oct 17, 2026
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #283

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3530 3526 4 0 0 0 0 2m1s

❌ Some tests failed!

Name Failure Message
❌ ExperimentStore CAS contracts > plans chunked-to-chunked growth and chunked-to-inline shrink independently Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
❌ ExperimentDetail > starts an asynchronous deletion from the confirmation dialog Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
❌ ExperimentDetail > shows deleted lifecycle progress and restores the Experiment Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
❌ ExperimentDetail > removes selected current members in one revision-guarded request Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".

Github Test Reporter

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b4a63b3-29db-4d12-888f-051592682640

# Conflicts:
#	docs/architecture/experiments.md
…into cedricvidal-experiment-membership-recovery
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
…from clearing

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…tion

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Journal and fence provisional user-run claims before publication. Recover interrupted batches and ambiguous finalization from pinned identities, and keep retained members on their exact historical runs. Limit projected selection reads, conditional claim batches and bulk deletion size.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Keep verified members and profile membership on disk. Send only exact aggregates and bounded sampled evidence to the model, then stream all runs and profiles into the original artifact layout. Exercise 4,097 and 250,000 members without a population or artifact-size cutoff.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #724

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4218 4210 0 8 0 0 0 2m48s

🎉 All tests passed!

Github Test Reporter

Validate the exact sampled identity and bounded excerpt, not whether the prose is a literal substring. Keep correction of invalid references within the existing three attempts.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e767814e-3331-4a7e-ae96-15207b53ac9c
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #746

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4227 4219 0 8 0 0 0 2m48s

🎉 All tests passed!

Github Test Reporter

@cedricvidal
Cedric Vidal (cedricvidal) marked this pull request as ready for review December 3, 2026 19:47
Base automatically changed from cedricvidal-experiment-report-templates to integration/taxonomy December 3, 2026 20:42
Resolve the squashed report-template ancestry using its identical unsquashed parent tree; retain the reviewed lifecycle patch unchanged.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@cedricvidal
Cedric Vidal (cedricvidal) merged commit 3e63122 into integration/taxonomy Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: api Scope REST API, run orchestration, SSE streaming, and endpoints. area: cli Scope command-line interface and terminal workflows. area: infrastructure Cloud resources, hosting, networking, and shared infrastructure. area: portal Scope web portal, pages, and user-facing components. area: reporting Generation and delivery of benchmark reports. area: shared Shared package: types, DB models, and queue/blob/redis clients used by all apps. area: website Scope documentation website (Astro) under website/. area: worker Coding agent worker runtime, task execution, and lifecycle. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. type: documentation Documentation additions, corrections, and improvements. type: enhancement New functionality or improvements to existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants