Skip to content

feat: manage existing-run experiment membership - #1515

Merged
Cedric Vidal (cedricvidal) merged 311 commits into
integration/taxonomyfrom
cedricvidal-experiment-membership-recovery
Dec 3, 2026
Merged

Cedric Vidal (cedricvidal) merged 311 commits into
integration/taxonomyfrom
cedricvidal-experiment-membership-recovery

Conversation

@cedricvidal

Copy link
Copy Markdown
Collaborator

Summary

Adds complete-set membership revisions for creating Experiments from existing runs and atomically adding, moving, removing, or deleting members.

  • Plans exact current run vectors before mutation, publishes one immutable revision/execution with CAS ownership, and supports deterministic replay plus interruption repair.
  • Keeps Experiment history authoritative while maintaining request.experimentId as denormalized lookup state.
  • Adds REST/OpenAPI and CLI parity, coordinated deletion, Runs-list bulk Create/Move, and current-attempt member removal within the compact Experiment Detail Runs tab.
  • Covers inline/chunked storage transitions, stale/conflicting ownership, replay, retry/replan, deletion coordination, Portal interactions, and Storybook states.

Demos

Before

N/A — existing standalone runs could not be managed as Experiment membership.

After

Integrated Scope Portal walkthrough: bulk Create/Move conflict handling, Atom Experiment navigation, compact attempt history, completed/failed report versions, one-revision member removal, interrupted reconciliation, and retry recovery.

experiment-membership.mp4

Testing

  • pnpm vitest run packages/shared/src/experiments/experiment-store.test.ts apps/api/src/experiment-membership.test.ts apps/api/src/endpoints.test.ts apps/api/src/routes/experiments.test.ts apps/cli/src/commands/experiment.test.ts — passed, 5 files / 210 tests.
  • pnpm --filter portal test -- src/lib/experiment-membership.test.ts src/lib/api-experiment-membership.test.ts src/pages/ExperimentDetail.test.tsx src/pages/ExperimentDetail.play.test.tsx src/pages/ExperimentsList.test.tsx src/pages/ExperimentsList.play.test.tsx src/components/Layout.test.tsx src/components/ExperimentReportCard.test.tsx — passed, 8 files / 39 tests.
  • pnpm --filter portal build — passed.
  • pnpm --filter portal build-storybook — passed.
  • pnpm test -- --testTimeout=15000 — passed before the later Portal-only PR B reconciliation, 286 files / 3,473 tests; affected Portal tests and builds were rerun above after the final merge.
  • Website OpenAPI tests and production build — passed after restoring the website's frozen-lockfile dependencies; generated OpenAPI artifact matches the API snapshot.
  • Retained demo take — H.264/yuv420p, 1440x900, 25 fps, 47.28 seconds / 1,182 frames; full FFmpeg decode and encoded first/last/contact-sheet inspection passed; moov precedes mdat.
  • Compose smoke — environment-blocked, not a product failure. The normal attempt failed with shared Docker VM ENOSPC; the one permitted targeted retry failed at /var/tmp/libpod_builder with the same condition. Safe exact cleanup reclaimed 0 bytes because Docker metadata reported unable to open database file / retained references. Teardown verified zero project containers, networks, and volumes for scope-mt-app-9-cedricvidal-refactored-meme. No further Docker cleanup was attempted.
  • Real Cosmos — not run because credentials were unavailable.

Documentation and compatibility

Updated docs/architecture/app-design.md, docs/architecture/experiments.md, apps/cli/README.md, and the generated website OpenAPI artifact.

The REST API adds existing-run creation plus bulk membership POST/DELETE routes. CLI adds experiment create --request-id, experiment add/move, and experiment remove. Existing APIs remain compatible. Request documents gain optional denormalized membership fields; no data migration or dependency change is required.

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. N/A — only optional schema fields were added.
  • 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 — this adds a new membership workflow.
  • Video showing the behavior after the suggested change.

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

Copilot-Session: 92d03055-789e-48b7-9a44-6de5b357f486
Unblock the required clean full-stack Docker build by restoring the import for the already-rendered CriteriaBadge component.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Add the pp-readout submission handler, exact-vector evidence aggregation, structured artifacts, report APIs, and stale-publication safeguards.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Render current and historical submission readouts, support structured downloads, and add CLI access while removing the duplicated run taxonomy surface.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Describe submission-scoped readouts, refresh API artifacts, and register the production prompt contract and reviewed smoke case.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Install the system CA bundle required by the bundled Copilot CLI, forward configured npm registries, and run all source-based handler registration jobs from development images. Log SDK cleanup failures and add focused container configuration regression coverage.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Use the plural submission reports collection and resolve the current report through the standard report-by-ID resource. Align Portal and CLI clients, filters, Structured JSON retrieval, OpenAPI, tests, and architecture documentation.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
Replace report-version history with attempt-scoped horizontal report-type tabs and deterministic newest-per-type selection.

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

Copilot-Session: 1cbbd5eb-61c6-4e6a-bb38-c377be5b2163
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: 4b4a63b3-29db-4d12-888f-051592682640
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0d6d0638-e765-4142-b984-9fa2b494bb7f
Ensure interrupted membership rollovers claim request ownership before publishing the next experiment revision, clean up failed unpublished claims, and include membership repair in coordinator polling.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Create Experiments from existing standalone requests and add or remove multiple members through a single complete-set revision replacement with exact conflict reporting.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Publish one membership revision before deleting selected members, surface the resulting revision identity, and reject bulk deletion across multiple Experiments to avoid partial success.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Support creating Experiments from existing requests and moving or removing multiple requests with expected revision CAS and resulting revision output.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
Verify inline-to-inline, inline-to-chunked with immutable archive, chunked growth, and chunked-to-inline shrink while preserving exact vectors and fingerprints.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-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
Remove the explicit-empty checkbox, progressively disclose run composition from scenario selection, and keep Experiment API creation discriminated. Add component and Storybook interaction coverage and update the creation guides.

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: 3d995fd8-10c6-477c-b1d4-27ba9b2d762a
…ions

Use the existing required CI credential and advertised model catalog for both calls, and drain each case’s pool even on failure. Keep the production provider default, five cases, three CI samples, and strict majority unchanged.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Rotate the generation in the stored queued state before enqueuing recovery. A delayed renewal, failure, or report pointer from an expired owner cannot update its successor.

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>
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 durable status and report visibility fenced; defer uncertain storage writes and repair the committed report on redelivery. Build exact run manifests and counts in code. Bound and label sampled evidence, treat it as data, and give invalid model references the same bounded correction path as syntax and schema errors.

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 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
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #718

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4181 4173 0 8 0 0 0 2m13s

🎉 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
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #747

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
4190 4182 0 8 0 0 0 2m43s

🎉 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-readout to integration/taxonomy December 3, 2026 20:15
Resolve the squashed parent against its identical unsquashed tree, preserving the reviewed membership diff.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@cedricvidal
Cedric Vidal (cedricvidal) merged commit a509444 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: portal Scope web portal, pages, and user-facing components. area: shared Shared package: types, DB models, and queue/blob/redis clients used by all apps. area: website Scope documentation website (Astro) under website/. 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