Skip to content

Repair tooling for retired-tutorial completion-path slots (#2718, #2719, #2722) - #2737

Merged
jung-thomas merged 7 commits into
DEVfrom
worktree-fix-2718-mission-12479-mapping
Oct 13, 2026
Merged

jung-thomas merged 7 commits into
DEVfrom
worktree-fix-2718-mission-12479-mapping

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

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

All are cds bind --exec migrations; none are wired into the app.

Status (already applied to PROD)

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-only against PROD; each --commit snapshotted to .migration-data/ before writing. No app code changed, so no unit-suite impact.

jung-thomas and others added 7 commits October 12, 2026 21:54
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>
@jung-thomas
jung-thomas merged commit 0d590e6 into DEV Oct 13, 2026
3 of 4 checks passed
@jung-thomas
jung-thomas deleted the worktree-fix-2718-mission-12479-mapping branch October 13, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant