Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized function calls.
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled

This commit is contained in:
master
2025-11-20 07:50:52 +02:00
parent 616ec73133
commit 10212d67c0
473 changed files with 316758 additions and 388 deletions

View File

@@ -0,0 +1,45 @@
# CONCELIER-CORE-AOC-19-004 · Backfill prerequisites
Purpose: prep safety rails so CONCELIER-STORE-AOC-19-005 can execute the raw-linkset backfill and rollback without risk to offline kits or prod Mongo.
## Inputs
- Dataset: `out/concelier/backfill/linksets-m0.ndjson` (deterministic export, compressed with `gzip`), hash: `TBD` (publish after staging upload).
- Target database: `concelier` (Mongo), collections `advisory_linksets` and `advisory_observations`.
- Offline kit bundle: `out/offline/concelier-linksets-m0.tar.gz` (mirrors the NDJSON used for Mongo ingest).
## Execution checklist
1) **Dry-run import** in staging:
- `scripts/concelier/import_linksets.sh --input out/concelier/backfill/linksets-m0.ndjson.gz --dry-run`
- Verify no merge counters / no inferred severity fields.
2) **Backup** prod collections:
- `mongodump -d concelier -c advisory_linksets -o backups/2025-11-19-pre-aoc19-004/`
- `mongodump -d concelier -c advisory_observations -o backups/2025-11-19-pre-aoc19-004/`
3) **Rollback script staged**:
- `scripts/concelier/rollback_aoc19_004.sh` restores both collections from above dump, then runs `db.advisory_linksets.createIndex` to re-seat deterministic indexes.
4) **Gate flags**:
- Ensure `LinkNotMerge.Enabled=true` and `AggregationOnly.Enabled=false` in Concelier WebService/appsettings for the rehearsal window.
5) **Observability hooks**:
- Enable structured logs `Concelier:Backfill:*` and SLO timer for import duration.
6) **Determinism probe** (post-import):
- Run `dotnet test src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests --filter BackfillDeterminism` in CI; expect zero diff versus golden hashes in `src/Concelier/seed-data/backfill-det-golden.json`.
## Rollback procedure
```
scripts/concelier/rollback_aoc19_004.sh \
--dump backups/2025-11-19-pre-aoc19-004 \
--db concelier
```
Post-rollback verification: rerun the determinism probe and confirm `AggregationOnly.Enabled=false`.
## Evidence to attach after execution
- Mongo dump hash (SHA256 of archive).
- Import log excerpt showing counts and zero merge counters.
- Determinism test TRX.
- Offline kit bundle hash.
## Owners & contacts
- Concelier Storage Guild (primary)
- DevOps Guild (rollback + backups)
## Notes
- No schema changes; pure data backfill. If newer Link-Not-Merge fixtures arrive, refresh dataset/hash before scheduling.

View File

@@ -0,0 +1,14 @@
# linksets-m0 dataset plan (CONCELIER-CORE-AOC-19-004)
Purpose: produce deterministic dataset for STORE-AOC-19-005 rehearsal.
Generated artefacts:
- `out/concelier/backfill/linksets-m0.ndjson.gz` — placeholder deterministic NDJSON (stub until real export).
- `out/concelier/backfill/linksets-m0.ndjson.gz.sha256` — SHA256 `21df438c534eca99225a31b6dd488f9ea91cda25745f5ab330f9499dbea7d64e`.
Generation instructions (replace stub when real export is ready):
1) Export from staging Mongo using `scripts/concelier/export_linksets.sh --tenant default --output out/concelier/backfill/linksets-m0.ndjson.gz --gzip`.
2) Verify determinism: `python3 scripts/hash_ndjson.py out/concelier/backfill/linksets-m0.ndjson.gz` and compare across two runs (hashes must match).
3) Update `.sha256` file with the new hash.
Status: stub dataset and hash published 2025-11-19 to unblock rehearsal scheduling; replace with real export when available.