Define control-plane domain contracts for issue #22#74
Conversation
There was a problem hiding this comment.
Pull request overview
Defines the initial ControlPlaneDomain contract slice for issue #22 in DotPilot.Core, then rewires the RuntimeFoundation contracts/runtime implementation and updates docs/tests so downstream slices can share one serialization-safe domain model.
Changes:
- Add
DotPilot.Core/Features/ControlPlaneDomain(typed IDs, enums, and DTO-style records for control-plane entities). - Update RuntimeFoundation contracts + runtime catalog/probe/deterministic client to consume the shared domain descriptors (e.g., providers, artifacts).
- Add documentation + tests for domain relationships and JSON round-tripping.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| issue-22-domain-model.plan.md | Adds an issue plan and validation notes for the #22 contract slice rollout. |
| docs/Features/control-plane-domain-model.md | Documents the new domain slice and entity relationships (Mermaid map + notes). |
| docs/Features/agent-control-plane-experience.md | Links the feature spec to the new domain model doc. |
| docs/Architecture.md | Updates the architecture map to include the ControlPlaneDomain slice boundary and navigation links. |
| DotPilot/Presentation/Controls/RuntimeFoundationPanel.xaml | Updates provider template typing to bind against ProviderDescriptor. |
| DotPilot.Tests/RuntimeFoundationCatalogTests.cs | Updates artifact assertions to match new ArtifactDescriptor output. |
| DotPilot.Tests/GlobalUsings.cs | Adds global using for the new ControlPlaneDomain namespace. |
| DotPilot.Tests/ControlPlaneDomainContractsTests.cs | Adds identifier semantics, JSON round-trip, and mixed-session coverage for domain DTOs. |
| DotPilot.Runtime/Features/RuntimeFoundation/RuntimeFoundationCatalog.cs | Produces ProviderDescriptor list for the runtime-foundation snapshot. |
| DotPilot.Runtime/Features/RuntimeFoundation/ProviderToolchainProbe.cs | Returns ProviderDescriptor instead of the removed toolchain-status record. |
| DotPilot.Runtime/Features/RuntimeFoundation/DeterministicAgentRuntimeClient.cs | Produces ArtifactDescriptor items instead of string artifact names. |
| DotPilot.Core/Features/RuntimeFoundation/RuntimeFoundationStates.cs | Removes domain enums from RuntimeFoundation (now in ControlPlaneDomain). |
| DotPilot.Core/Features/RuntimeFoundation/RuntimeFoundationIdentifiers.cs | Deletes moved typed identifiers (now in ControlPlaneDomain). |
| DotPilot.Core/Features/RuntimeFoundation/RuntimeFoundationContracts.cs | Switches snapshot providers and produced artifacts to domain descriptors. |
| DotPilot.Core/Features/ControlPlaneDomain/SessionExecutionContracts.cs | Adds session/approval/artifact/telemetry/evaluation DTO contracts. |
| DotPilot.Core/Features/ControlPlaneDomain/ProviderAndToolContracts.cs | Adds provider/runtime/tool DTO contracts. |
| DotPilot.Core/Features/ControlPlaneDomain/ParticipantContracts.cs | Adds workspace/agent/fleet DTO contracts. |
| DotPilot.Core/Features/ControlPlaneDomain/ControlPlaneStates.cs | Adds shared enums for lifecycle/status/metrics/kinds. |
| DotPilot.Core/Features/ControlPlaneDomain/ControlPlaneIdentifiers.cs | Adds shared typed ID record structs with v7 GUID creation + formatting. |
| DotPilot.Core/AGENTS.md | Updates the Core agent guide to include the new ControlPlaneDomain slice. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| { | ||
| Id = WorkspaceId.New(), | ||
| Name = "dotPilot", | ||
| RootPath = "/Users/ksemenenko/Developer/dotPilot", |
| { | ||
| return new ArtifactDescriptor | ||
| { | ||
| Id = ArtifactId.New(), |
| Name = artifactName, | ||
| Kind = artifactKind, | ||
| RelativePath = artifactName, | ||
| CreatedAt = DateTimeOffset.UtcNow, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0bc3ebd09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| return new ArtifactDescriptor | ||
| { | ||
| Id = ArtifactId.New(), |
There was a problem hiding this comment.
Keep deterministic client outputs stable across identical turns
DotPilot.Runtime/AGENTS.md explicitly requires deterministic runtime behavior for provider-independent test coverage, but CreateArtifact now generates a fresh ArtifactId (and in the same helper also stamps UtcNow) on every call, so two identical ExecuteAsync requests produce different payloads. That makes full-result baselines and golden comparisons flaky even when prompt, mode, and session are unchanged.
Useful? React with 👍 / 👎.
| false), | ||
| new ProviderDescriptor | ||
| { | ||
| Id = ProviderId.New(), |
There was a problem hiding this comment.
Preserve stable provider identity between snapshot refreshes
DotPilot.Runtime/AGENTS.md also requires deterministic runtime behavior, but provider IDs are generated with ProviderId.New() during snapshot construction, so the same logical provider gets a new identity every GetSnapshot() call. This breaks ID-based linking in the new domain model (for example AgentProfileDescriptor.ProviderId) because previously captured references cannot reliably match providers after a refresh.
Useful? React with 👍 / 👎.
Summary
Testing
Notes