Carousel Partial-Retry URL Mapping Automation: The Slide That Remembered the Wrong Picture

Two different lists, two different lengths, and one position number used against both
A partial retry of a multi-step batch operation — publish everything that has not already been published — is a reasonable, common design: it lets a failed or interrupted batch pick up cleanly without redoing completed work. It also, almost unavoidably, produces two lists of different lengths describing the same underlying batch: the full, original list of everything the batch was ever meant to do, and the shorter list of what is actually happening in THIS specific call, with already-done items filtered out. Using a position number that is only meaningful within one of those two lists to index into the OTHER one is a natural, easy mistake — both lists hold the same kind of item, in a related order, and the code compiles and runs without any visible error either way. The mismatch only produces a wrong result, silently, specifically when the two lists' lengths actually differ — which is precisely the case a partial retry exists to handle.
How the underlying problem shows up before you fix it
A batch or multi-item operation maintains both a full, original list of every item it was ever meant to process, and a shorter, filtered list of only the items still remaining in the CURRENT call — and some code uses a position within the shorter list to index directly into the longer one.
The specific defect is invisible on a first, complete attempt (both lists have the identical length and order, so the wrong-list indexing happens to produce the right answer by coincidence) and only manifests on a PARTIAL retry, when the two lists genuinely diverge in length.
A recorded mapping between one identifier and another (here: a published post's ID and the image URL it actually corresponds to) is silently shifted by exactly the number of earlier items that were skipped in the current call — the more items already completed before a retry, the further the mapping drifts.
A field recorded specifically to support a FUTURE idempotency check (recognizing 'this exact item was already handled') is corrupted by the very mechanism (retrying only the remaining items) that idempotency exists to make safe — meaning the defect can compound across multiple retries rather than simply affecting one.
A bug scoped specifically to a partial-completion, multi-call scenario is inherently harder to catch in ordinary testing, because a test exercising the "everything succeeds in one call" happy path will never actually exercise the two-lists-of-different-lengths condition that triggers it.
How a slide-to-URL mapping that drifted with every skipped slide was corrected
Centriu Atlas can publish a multi-image carousel post to a connected social network, and records, for each slide of that carousel, which specific external post ID corresponds to which specific image URL — a mapping later used both for basic bookkeeping (what was actually published) and, critically, as the input to an idempotency check on any FUTURE retry of the same content item: the system recognizes a slide as already-published specifically by matching its recorded URL.
A retry of a carousel that had already partially succeeded is a genuinely common path: some slides published cleanly in an earlier call are correctly identified and skipped (tracked via `skipUrls`/`alreadyPubUrls`), and only the remaining, still-needed slides are actually published in the retry. The code recording the URL for each newly published slide, before this fix, worked out that URL as follows: find the position of the current post's external ID WITHIN `postIdsToRecord` — the short list of post IDs created in THIS specific call — and use that position as an index into `effectiveCarousel`, the FULL, original list of every slide's URL for the entire carousel, in its original order.
On a complete, first-attempt publish — no earlier slides skipped, every slide published in one call — `postIdsToRecord` and `effectiveCarousel` happen to have the same length and the same order, so this indexing produces the correct answer by coincidence, and the defect is completely invisible. On a genuine partial retry, the two lists diverge: if the first slide of a three-slide carousel was already published in an earlier call and only slides two and three are being published now, `postIdsToRecord` contains exactly two entries, at positions 0 and 1 — but `effectiveCarousel[0]` is actually slide ONE's url (the global, original list), and `effectiveCarousel[1]` is slide TWO's url. The post actually corresponding to slide two would be recorded with slide one's URL, and the post for slide three would be recorded with slide two's URL — every slide in the retry mapped to the URL belonging exactly one position earlier than its own real image, with the drift growing by one for every earlier slide that had been skipped.
Because the recorded URL is the exact field a later retry's own idempotency logic reads to recognize "this slide is already done," a wrong mapping does not stay a harmless bookkeeping inaccuracy — it can propagate: a future retry checking whether a specific slide's URL already has a recorded post could match against the WRONG post, incorrectly treating an unpublished slide as done (skipping it) or an already-published slide as not done (re-publishing it), compounding across however many retries a given carousel needed.
The fix separates the two lists cleanly. A new `urlsForRecord` array is built specifically from `stillNeededUrls` — the URLs for only the slides actually being published in this specific call, already known to be in the same order the publisher iterated them — rather than the full, original carousel list. The insertion loop is rewritten to iterate `postIdsToRecord` by explicit numeric position (`for (let i = 0; i < postIdsToRecord.length; i++)`), and looks up each post's URL as `urlsForRecord[i]` — the i-th URL still needed in THIS call, matched against the i-th post ID created in THIS call, with no dependency on the full original list's own length or ordering at all.
What is actually built today
Centriu Atlas records each newly published carousel slide's post against the URL for the slides still needing publication in that SPECIFIC call — never against a position looked up inside the full, original carousel list.
A partial retry of a carousel (some slides already published and correctly skipped) now records an accurate post-to-URL mapping for every remaining slide, regardless of how many earlier slides had already been completed.
The idempotency check a future retry relies on (recognizing an already-published slide by its recorded URL) now reads accurate data, closing a path where a mapping drift from an earlier retry could cause a slide to be incorrectly skipped or incorrectly re-published.
The fix requires no change to how carousels are published or how retries are triggered — it corrects only the internal bookkeeping step recording which URL belongs to which already-published post.
Single-image (non-carousel) posts, which always used a single fixed URL rather than this indexed lookup, were confirmed unaffected by this specific defect.
Slide three's post, recorded with slide two's picture (illustrative framing of the actual measured finding)
Before the fix, a three-image carousel where the first slide published successfully in an earlier call, with slides two and three published in a retry, would record slide two's actual post against slide one's URL, and slide three's actual post against slide two's URL — a complete carousel, correctly published end to end, but with its own internal bookkeeping now describing the wrong picture for two of its three slides. After the fix, the retry correctly matches each newly published post to its own actual URL, regardless of how many earlier slides the retry itself had to skip.
What changes operationally
Centriu Atlas now records an accurate post-to-URL mapping for every slide of a carousel published across a partial retry, closing a gap where the mapping could silently drift by one position for every earlier slide the retry skipped — a drift that could otherwise compound into an incorrect skip or an incorrect re-publish on a SUBSEQUENT retry of the same content item, since the idempotency check that later retry relies on reads exactly this recorded field.
When this is not the right fit
This automation governs Centriu Atlas's own internal bookkeeping for which URL corresponds to which published carousel slide, specifically during a partial retry — it does not change how or when a carousel is retried, and single-image posts (which never used this specific indexed lookup) were unaffected by the defect this fix corrects.
Indexing by a retry's own position vs. indexing by the item's real position in what's left to do
Reusing a loop position from a shorter, filtered list to index into a longer, unfiltered one is the more compact way to write the lookup, and it is entirely correct as long as the two lists always happen to be the same length — true for a complete, first-attempt publish, but not true for a genuine partial retry. Building a dedicated list scoped to exactly what the current call is actually doing, and indexing only within that list, costs one extra array but removes the dependency on the two lists ever needing to match in length at all — closing the gap for every retry scenario, not only the ones a specific test happened to exercise.
Related systems
Main system: Centriu Atlas.
What it does NOT do
- Does not change how or when Centriu Atlas retries a partially-published carousel — this fix corrects only the internal mapping recorded between a published post and its actual image URL during that retry.
- Does not retroactively correct any post-to-URL mapping recorded before this fix shipped — a carousel published via a partial retry during the affected period may still carry an inaccurate recorded URL for some of its slides; a team with that specific concern would need its own manual review.
- Does not affect single-image (non-carousel) posts, which use a fixed URL rather than the indexed lookup this fix corrects, and were confirmed unaffected by this specific defect.
- Does not overlap with this pillar's separate finding about Atlas's own alert-delivery status field — that is covered on its own companion page and is an unrelated mechanism in a different route.
- Does not claim every multi-item batch operation in Centriu Atlas shares this exact indexing pattern — this fix is scoped specifically to the carousel-publishing route's post-to-URL recording step described above.
Security and governance
Centriu Atlas now records an accurate post-to-URL mapping for every carousel slide published across a partial retry, closing a gap that could cause a later retry's own idempotency check to skip or re-publish the wrong slide. Full detail on access control and audit trails lives at /governanca and /iso.
Pricing and contracting
Available by monthly subscription, with tiered plans. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).
Frequently asked questions
Did this cause the wrong image to actually be published?
No — the images themselves were published correctly to the social network. The defect was in Centriu Atlas's own internal record of which URL corresponds to which already-published post, used for bookkeeping and for a future retry's idempotency check.
Under what specific condition did this bug actually trigger?
Only during a genuine PARTIAL retry of a multi-slide carousel — some slides already published in an earlier call and correctly skipped, with the remaining slides published now. A complete, first-attempt publish was never affected, because the two lists involved happen to be the same length and order in that case.
Could this have caused a slide to be re-published or skipped incorrectly?
Yes, on a SUBSEQUENT retry — because the recorded (and, before the fix, potentially mismapped) URL is exactly what a later retry's own idempotency check reads to decide whether a given slide is already done.
Were single-image posts affected?
No — single-image posts always used one fixed URL rather than the indexed lookup into a carousel's URL list, and were confirmed unaffected by this specific defect.
What was actually changed in the fix?
The URL lookup now uses a list built from only the slides still needing publication in the current call, in the order actually iterated, indexed by the current call's own loop position — rather than looking up a position-within-the-retry inside the full, original carousel URL list.
What does Centriu Atlas cost?
It is sold by subscription with a published starting price — exact current values are on the central pricing page.
See how Centriu Atlas keeps carousel publishing accurate across retries
Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.
