Feature/gh 284 stories 1 8 moved - #292
Merged
Merged
Conversation
added 8 commits
July 7, 2026 17:13
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the migration “write” pipeline to actually materialize canonical race-domain entities (drivers/races/selections/positions) and adds operational tooling around safety, diagnostics, parity/idempotency metadata, and rollback for admin workflows.
Changes:
- Add a canonical write service invoked from the worker after reconciliation, including conflict policy handling and conflict diagnostics persistence.
- Add parity snapshot checksums + idempotency metadata to
MigrationImportRuns, and expand admin APIs/models/tests to expose kickoff preview metadata and rollback/audit details. - Update the admin web UI/models and add a runbook/epic references for traceability.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/F1.Web.Tests/AdminMigrationRunsTests.cs | Updates web tests for expanded kickoff/detail models (conflict diagnostics + kickoff metadata). |
| tests/F1.Infrastructure.Tests/Relational/MigrationImportRunServiceTests.cs | Adds/updates relational characterization and new assertions for parity/idempotency/canonical writes/conflict policy behavior. |
| tests/F1.Api.Tests/Services/MigrationRunAdminServiceTests.cs | Adds unit tests for non-empty DB confirmation, kickoff metadata preview, rollback, and conflict diagnostics inclusion. |
| tests/F1.Api.Tests/Controllers/MigrationRunsControllerTests.cs | Adds controller tests for rollback validation and OK payload behavior. |
| src/F1.Web/Pages/AdminMigrationRuns.razor | Sends the new kickoff confirmation flag and refreshes UI behaviors around kickoff. |
| src/F1.Web/Models/AdminMigrationRunModels.cs | Adds new DTO fields for conflict diagnostics and kickoff preview metadata. |
| src/F1.Infrastructure/Data/F1DbContext.cs | Adds new DbSets and EF mappings for conflict diagnostics/rollback audits + new run metadata columns. |
| src/F1.Infrastructure/Data/Entities/MigrationImportRunEntity.cs | Adds persisted parity/idempotency fields on migration runs. |
| src/F1.Infrastructure/Data/Entities/MigrationImportRollbackAuditEntity.cs | New entity for rollback audit persistence. |
| src/F1.Infrastructure/Data/Entities/MigrationImportConflictDiagnosticEntity.cs | New entity for canonical write conflict diagnostic persistence. |
| src/F1.DataSyncWorker/Services/MigrationImportRunService.cs | Persists parity/idempotency metadata from completion metadata into MigrationImportRuns. |
| src/F1.DataSyncWorker/Services/MigrationImportOrchestrator.cs | Integrates canonical writes, parity snapshot hashing/comparison, and idempotency metadata into the run lifecycle. |
| src/F1.DataSyncWorker/Services/MigrationCanonicalWriteService.cs | New canonical writer that upserts race-domain entities with conflict policy + diagnostics and transactional behavior. |
| src/F1.DataSyncWorker/Services/IMigrationCanonicalWriteService.cs | New abstraction for canonical writing. |
| src/F1.DataSyncWorker/Program.cs | Registers the canonical write service in DI. |
| src/F1.DataSyncWorker/Options/MigrationImportOptions.cs | Adds options for conflict policy and failure injection stage. |
| src/F1.DataSyncWorker/Models/MigrationImportModels.cs | Extends run completion metadata with parity/idempotency fields. |
| src/F1.Api/Services/MigrationRunAdminService.cs | Adds non-empty DB confirmation gate + kickoff preview metadata, rollback implementation, conflict diagnostics + rollback audits in run detail, and temp-path allowlist adjustment. |
| src/F1.Api/Services/IMigrationRunAdminService.cs | Extends kickoff command and adds rollback command/result + interface method. |
| src/F1.Api/Dtos/AdminMigrationRunDtos.cs | Adds rollback/conflict DTOs and extends kickoff request/response and run detail payload. |
| src/F1.Api/Controllers/MigrationRunsController.cs | Threads the kickoff confirmation flag and adds the admin rollback endpoint. |
| docs/runbooks/migration-write-pipeline-trace.md | Adds a runbook trace (currently inconsistent with updated pipeline behavior). |
| docs/epics/gh-284-migration-write-correctness-and-non-empty-db/epic-migration-write-correctness-and-non-empty-db.md | References the new runbook artifact for acceptance criteria traceability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 16 commits
July 7, 2026 17:26
…dCanonicalWriteFields migration
…owlist hardening, explicit write confirmation UI, and runbook accuracy
…icate round inserts in migration write
…n-domain migration writes
…nonical clear script
…estionScores with migration and service updates
…ng fields and remove question score reason code
…pi ids in parser and migration
…es reorganization
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 51 out of 85 changed files in this pull request and generated 3 comments.
Files not reviewed (5)
- src/F1.Infrastructure/Migrations/20260707172350_AddCanonicalWriteFields.Designer.cs: Generated file
- src/F1.Infrastructure/Migrations/20260707172723_RepairCanonicalWriteFieldsAfterEmptyApply.Designer.cs: Generated file
- src/F1.Infrastructure/Migrations/20260707182836_AddQuestionBooleanNormalizationFields.Designer.cs: Generated file
- src/F1.Infrastructure/Migrations/20260707184503_RemoveImportRunIdFromQuestionTables.Designer.cs: Generated file
- src/F1.Infrastructure/Migrations/20260707185947_SimplifyQuestionAnswerActualAndScoreFields.Designer.cs: Generated file
…ng, scoring perf, runbook
PhilipWoulfe
enabled auto-merge
July 7, 2026 19:57
PhilipWoulfe
disabled auto-merge
July 7, 2026 19:57
PhilipWoulfe
enabled auto-merge (rebase)
July 7, 2026 19:58
auto-merge was automatically disabled
July 7, 2026 20:00
Head branch was pushed to by a user without write access
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.
No description provided.