Repository navigation
Repair tooling for retired-tutorial completion-path slots (#2718, #2719, #2722) - #2737
Merged
Merged
Conversation
Mission 12479's first completion-path slot points at taskLegacyId 13474 (cp-aibus-dox-booster-key, INACTIVE/404). Repoints it to 11954 (cp-aibus-dox-service-instance) and backfills COMPLETED TaskRecords for the 761 users who finished the old tutorial but not the new one, then re-runs the completion rollup (send:false). Dry-run default; snapshot-first on --commit. Co-authored-by: Ordis <noreply@ordis.ai>
…kfill insert Backfill insert failed binding an ISO date into COMPLETIONTIME (BIGINT duration). Slot repoint (change A) already succeeded and is idempotent; re-run --commit to complete the 761-record backfill + rollup. Co-authored-by: Ordis <noreply@ordis.ai>
Phase B skips users already holding the migration-tagged 11954 record; phase C always replays rollup for the full credit set. Safe to re-run after an interrupted pass (the prior run was killed mid-rollup, leaving a 2-user gap). Co-authored-by: Ordis <noreply@ordis.ai>
Removes the dead cp-aibus-dox-booster-app slot (no in-mission successor; the issue's suggested cp-aibus-dox-ui-sub is in zero paths), leaving mission= cp-aibus-dox-ui. Grandfathers the 1380 mission-completed users who lack a ui record (CAP rollup downgrades on recompute, so they'd otherwise be demoted) and re-rolls the 91 stuck IN_PROGRESS-with-ui victims to COMPLETED. Dry-run default, snapshot-first, idempotent. Co-authored-by: Ordis <noreply@ordis.ai>
Scans ALL CompletionPathItems/GroupPathItems for INACTIVE/DELETED tutorials, strips the dead slots, and reconciles affected groups+missions via the real rollup — with a grandfather snapshot/restore so no previously-COMPLETED parent is demoted (CAP's upsert downgrades, unlike legacy). Single-process lock file prevents the concurrent-run race that double-inserted during #2719. Dry-run default; snapshot-first. Stopgap until the cascade/self-heal rework (#2732). Co-authored-by: Ordis <noreply@ordis.ai>
…ile, LIMIT chunking --mission=/--group= scope to a subset (prove before fleet sweep); reconcile only PUBLISHED parents (slots still stripped for retired parents, no wasted rollup); --limit=<n> makes the slow reconcile loop resumable. Scan now reports scoped vs fleet-wide counts. Co-authored-by: Ordis <noreply@ordis.ai>
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.
What
Adds data-repair tooling for the "retired tutorial left in a completion path blocks mission/group completion" bug class. Three user reports (#2718, #2719, #2722) turned out to be instances of a fleet-wide defect: a scan found ~50 dead-tutorial slots across ~31 missions/groups.
Scripts
scripts/repair-dead-tutorial-slots.cjs— the general tool. Scans allCompletionPathItems/GroupPathItemsfor INACTIVE/DELETED tutorials, strips the dead slots, and reconciles affected groups+missions through the real completion rollup. Grandfathers existing completers (snapshot-then-restore, because CAP'supsertRollupRecorddowngrades on recompute — legacy never did). Dry-run default;--commit;--verify-only;--mission=/--group=scope filters;--limit=resumable chunking; single-process lock file (prevents the concurrent-run race that double-inserted during the [Feedback]: [Mission 12052] Outdated tutorial mapping (cp-aibus-dox-booster-app vs cp-aibus-dox-ui-sub) blocks mission completion #2719 fix).scripts/repair-mission-12479-mapping.cjs— the original [Feedback]: [Mission 12479] Outdated tutorial mapping (cp-aibus-dox-booster-key vs cp-aibus-dox-service-instance) blocks mission completion #2718 one-off (slot repoint + backfill). Kept for audit.scripts/repair-mission-12052-mapping.cjs— the [Feedback]: [Mission 12052] Outdated tutorial mapping (cp-aibus-dox-booster-app vs cp-aibus-dox-ui-sub) blocks mission completion #2719 one-off (slot removal + grandfather). Kept for audit.All are
cds bind --execmigrations; none are wired into the app.Status (already applied to PROD)
booster-appslot, grandfathered 1380, flipped 92 stuck users, verified, closed.The remaining ~48 slots will be swept with the general tool after this lands.
Durable fix (follow-ups)
This tooling is a stopgap. Root cause and the real fix are tracked separately:
Testing
Dry-run +
--verify-onlyagainst PROD; each--commitsnapshotted to.migration-data/before writing. No app code changed, so no unit-suite impact.