Repository navigation
fix: isolate profile variation submissions - #1614
Draft
Cedric Vidal (cedricvidal) wants to merge 1 commit into
Draft
Cedric Vidal (cedricvidal) wants to merge 1 commit into
Cedric Vidal (cedricvidal) wants to merge 1 commit into
Conversation
Move profile fan-out ownership into the API so every profile resolves against fresh shared run intent. Keep Portal and CLI payloads free of profile-managed fields and document the cross-client ownership invariant. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Profile variation submissions could leak baseline profile-managed resource values into every variation, causing profiles with different bindings to conflict before comparative runs were created.
This change makes the API authoritative for profile fan-out. It rejects request-level profile-managed fields in variation mode, resolves each profile independently from the shared run intent, and keeps Portal and CLI submissions thin and consistent. It also documents the cross-client ownership invariant for future changes.
Closes #1613
Demos
Before
Baseline profile resources are copied into shared request state and conflict with the comparison profile.
before-profile-variation.mp4
After
The API creates two isolated requests whose persisted resource values come from their respective profiles.
after-profile-variation.mp4
Testing
pnpm exec vitest run apps/api/src/endpoints.test.ts apps/cli/src/commands/run.test.ts apps/portal/src/pages/SubmitRun.variations.test.tsx --reporter=default- passed, 188 testspnpm --filter api build- passedpnpm --filter cli build- passedpnpm --filter portal build- passedgit diff --check- passedbaseline/repositoryandcomparison/repositoryindependentlyDocumentation and compatibility
Updated
docs/architecture/app-design.md,docs/architecture/resources.md, andAGENTS.mdto document API-owned fan-out and profile isolation.Variation-mode API submissions now reject request-level worker, model, reasoning effort, agent version, MCP server, skill, extension, and resource fields. This is an intentional contract tightening that prevents ambiguous shared/profile state. Single-profile submissions are unchanged. No migration, dependency, or upgrade steps are required.
Checklist
up()/down()and keep it CosmosDB-compatible. (N/A - no database changes.)NOTICE/NOTICE-REVIEW.txtwithpnpm noticeas needed. (N/A - no dependency changes.)