Implement Advisory Canonicalization and Backfill Migration
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Added AdvisoryCanonicalizer for canonicalizing advisory identifiers. - Created EnsureAdvisoryCanonicalKeyBackfillMigration to populate advisory_key and links in advisory_raw documents. - Introduced FileSurfaceManifestStore for managing surface manifests with file system backing. - Developed ISurfaceManifestReader and ISurfaceManifestWriter interfaces for reading and writing manifests. - Implemented SurfaceManifestPathBuilder for constructing paths and URIs for surface manifests. - Added tests for FileSurfaceManifestStore to ensure correct functionality and deterministic behavior. - Updated documentation for new features and migration steps.
This commit is contained in:
32
docs/dev/lnm-determinism-tests.md
Normal file
32
docs/dev/lnm-determinism-tests.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Link-Not-Merge Determinism Test Plan
|
||||
|
||||
**Task:** MERGE-LNM-21-003 — replace legacy merge determinism suites with observation/linkset regressions now that `NoMergeEnabled` is defaulted to `true`.
|
||||
|
||||
## Objectives
|
||||
- Validate raw advisory documents remain byte-stable through observation/linkset materialisation.
|
||||
- Ensure conflicts detected during linkset building surface in telemetry and persisted artifacts without merge-side mutation.
|
||||
- Keep canonical hash output stable for exports/evidence bundles after repeated runs.
|
||||
|
||||
## Test Coverage Outline
|
||||
1. **Raw → Observation determinism**
|
||||
- Feed canonical advisory raw fixtures containing mixed casing, duplicate aliases, and provenance metadata.
|
||||
- Assert repeated runs of `AdvisoryObservationFactory` emit identical observations (structural equality + canonical JSON hash).
|
||||
- Verify raw linkset payload retains original ordering/whitespace while canonical linkset stays normalised.
|
||||
- Initial coverage implemented via `AdvisoryObservationFactoryTests.Create_IsDeterministicAcrossRuns` (core tests).
|
||||
|
||||
2. **Linkset conflict surfacing**
|
||||
- Build linksets from conflicting advisory observations (e.g., differing severity or status flags).
|
||||
- Confirm conflict markers propagate to `AdvisoryLinkset` outputs and associated metrics/log records.
|
||||
- Capture deterministic ordering of conflict explanations for evidence exports.
|
||||
|
||||
3. **Evidence/export parity**
|
||||
- Re-run observation/linkset pipelines against identical fixtures and assert resulting evidence manifests hash-identically.
|
||||
- Track monotonic `supersedes` chains and ensure canonical link records include `PRIMARY` schemes.
|
||||
|
||||
## Migration Steps
|
||||
- [ ] Retire `StellaOps.Concelier.Merge.Tests` determinism suites once observation/linkset equivalents land.
|
||||
- [ ] Introduce new regression fixtures under `StellaOps.Concelier.Core.Tests` (shared via `StellaOps.Concelier.Testing`).
|
||||
- [ ] Wire test helpers to Mongo in-memory harness for end-to-end parity runs.
|
||||
- [ ] Update documentation (`docs/migration/no-merge.md`) with validation checklist once new tests are green.
|
||||
|
||||
_Pending_: execute suites on a workstation with the .NET 10 preview SDK; local environment lacks a functioning CLI, so validation runs must happen downstream.
|
||||
Reference in New Issue
Block a user