Repository navigation
Conversation
The 2026-11-02 go-live mapped 216 templates before the release queue (#5166/#5167) existed, so none of them have a row in credlyTemplateReleases and their pre-go-live history is never recovered by the live poll. Adds --release-unreleased --integration-id <uuid> to the resolve script: lists every mapped template missing a release and queues them all, lightest by badgeCount first, so the long tail drains ahead of the dozen high-volume ones in the single-release-at-a-time FIFO walker. Refs linuxfoundation/lfx-cdp-insights-ops#975 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
PR SummaryMedium Risk Overview Data layer: New Resolve logic: CLI: Docs: Reviewed by Cursor Bugbot for commit a39f436. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues allow unroutable releases to be completed without fetching badges and concurrent catch-up runs to overwrite existing release bounds and saved progress.
1 open issue
What changed in this PR
Adds a catch-up path for Credly templates mapped before the release queue existed, reusing the existing release walker to recover historical badges.
Changes:
- Selects mapped templates without release records and queues them lightest-first.
- Adds
--release-unreleased --integration-id <uuid>, with creation-date floors and tests for selection, ordering, and fallback behavior. - Corrects documentation to reflect Credly’s production registration.
| File | Description |
|---|---|
| services/libs/data-access-layer/src/credly/releases.ts | Adds the unreleased mapped-template query. |
| services/libs/data-access-layer/src/credly/releases.test.ts | Tests ordering and exclusion after queuing. |
| services/apps/connectors_worker/src/credlyTemplateResolve.ts | Builds catch-up releases using existing floor rules. |
| services/apps/connectors_worker/src/credlyTemplateResolve.test.ts | Tests creation-date floors and missing-template fallback. |
| services/apps/connectors_worker/src/bin/resolve-credly-templates.ts | Adds bulk catch-up mode and shares HTTP client setup. |
| docs/knowledge/sys-cdp.md | Corrects the Credly connector’s registration status. |
Review effort: Balanced
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ab3b500. Configure here.
listMappedCredlyTemplatesWithoutRelease only checked status = 'mapped', unlike listActiveCredlyTemplateMappings. A deactivated mapping, or one whose integration was deleted, got queued anyway; the release walker finds it unmapped in routing and completes it with nothing fetched, burning the one release a future re-mapping would have queued. Applies the same live-and-routable predicate used elsewhere: not deactivated, integration not deleted, segment matches. Found independently by Copilot and Cursor Bugbot on PR review. Refs linuxfoundation/lfx-cdp-insights-ops#975 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
There was a problem hiding this comment.
🔵 Needs a closer look
The catch-up loop can race with another invocation and reset an existing release’s cursor and completion state, so it needs an insert-only operation that leaves existing releases untouched.
No open issues 🎉
1 resolved since last review
Review effort: Balanced


Why
The 2026-11-02 go-live mapped 216 Credly badge templates (anchor
c3fe78ce) before the per-template release queue (#5166/#5167) existed in deployed code.applyDecisionsonly queues a release on a new held/excluded/new→mapped transition — these 216 never went through that path, so none of them has a row incredlyTemplateReleases, and their pre-go-live badge history is never recovered by the live poll.Refs linuxfoundation/lfx-cdp-insights-ops#975
What
listMappedCredlyTemplatesWithoutRelease— mapped templates with no release row, ordered bybadgeCountascending.unreleasedTemplatesToQueue— same floor rule as a normal release (releaseFloor), applied to the catch-up batch.--release-unreleased --integration-id <uuid>mode onresolve-credly-templates. Loads the Credly listing (forcreated_at), reads the unreleased batch, queues them all lightest-first — so the ~200 light templates drain ahead of the dozen high-volume ones (CKA, CKAD, …) in the single-release-at-a-time FIFO walker.sys-cdp.mdstill saying Credly wasn't registered — it's been live in prod since today.Tests
unreleasedTemplatesToQueue: floors from the template's owncreatedAt, falls back to history start when missing from the listing.listMappedCredlyTemplatesWithoutRelease: lightest-first ordering, drops a template once its release is queued. DAL tests need the local Postgres on :5434 (Docker), not run locally here — same as the rest of this suite; verified by CI.pnpm lint:fix,pnpm format,pnpm lint --deny-warnings --format=agent,pnpm tsc-checkall clean.Manually verified today (before this PR)
Queued and ran the release walk for one already-mapped template (CKAD) live in staging: resumed correctly across the page cap, no errors, real badges/activities emitted. This PR reuses that same mechanism for the other 215.
Rollout
--release-unreleasedin staging against the full batch.🤖 Generated with Claude Code