Repository navigation
Conversation
Part of #702. A subselect's WHERE inside an UPDATE or upsert SET ended the scanned text early, so an idempotency_key assignment after it was missed. Cut only at a WHERE, RETURNING or ';' outside parentheses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. The Redshift dispatch gate needs the persistent-failure hints, and the purchase package cannot import api. Move them with their test; behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ineages Part of #702. A failed Redshift row that may have bought, and can still be retried, now blocks a second lineage of the same tuple, so the retry cannot adopt the other lineage's node. Rows Retry refuses for good are excluded: linked, settled (when the settlement schema exists), stamp- less, past 24h, never submitted at attempt 0, or with a persistent failure hint. When only failed rows conflict, the refusal says to retry or settle that purchase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. Redshift retries and re-drives now run through the PR3a retry gate and the lineage gate instead of being refused outright; the AWS no-token refusal keeps EC2 and Compute only. The old reason text stays allowlisted for rows stored before the lift. A failed row whose retry the remaining guard still refuses no longer blocks a new lineage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. A reaped Redshift row now waits out the retry settle, so the reaper no longer says a retry is safe straight away. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. A Redshift retry reuses the first attempt's request time, and only the attempt journal lets cloud-commitments-go tell its own node from another's. A manager built without one refuses the retry before stamping or calling the provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. History marks a Redshift row redrive-unsafe when Retry would refuse it for good (a presentation hint on the app clock; the gate decides on the database clock). The 409 for a retry inside the settle wait documents retry_after_seconds and Retry-After, and the History page tells the user how long to wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. Drive Redshift retries and stranded re-drives through the manager with an injected attempt journal and a fake client that applies go's RequestedAt-5m adoption window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #702. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
CHANGES REQUESTED 7e89c48 by claude-qa-ui-4 Blocking:
Checked and holding:
Runs (GOMAXPROCS=4, -p 2):
Non-blocking:
|
|
APPROVED 7e89c48 by claude-darling Cold review; I did not write this change. This is a money path: it lifts the Redshift redrive guard. I found no double-buy path once the journal is in place. One low finding needs a deploy-order note before this reaches an environment where the journal has been live for less than 24h (see the end). Owner decisions (2026-11-06b)
Double-buy paths
History, openapi, wording. Both new stored notes and the legacy EC2+Redshift text are allowlisted with QuoteMeta ( Non-Redshift unchanged. EC2 is still refused ( Finding: deploy order (LOW, but a real double-buy window).
Probes (scoped, each reverted, no survivors). Each of these fails at least one named test:
Scoped CI at this head: success, including Unit Tests and Integration Tests for api, auth, config, migrations, purchase and server. Run https://github.com/LeanerCloud/cloud-commitments-platform/actions/runs/42314561416. |
Closes #702 (Redshift re-drive idempotency). This is PR3b, the last of the series. Earlier pieces, already merged:
RequestedAt.This PR lifts the guard that refused every Redshift re-drive and Retry.
Why
Redshift reserved nodes have no AWS idempotency token, so re-driving a Redshift purchase could buy a second node. The earlier PRs built the safety net:
RequestedAtper lineage, so go's dedupe can find the original node;With all of that in place, Redshift retries can be allowed.
What (9 commits, each under 400 lines)
WHERE, so an assignment after a subselect is still seen.ResolveOpsHintexport (refactor). It moves intointernal/purchaseso the dispatch gate can use the persistent-failure hints.retry_after_secondsandRetry-After.RequestedAt - 5madoption window.known_issues/39is updated for the lifted state.Evidence
WHEREdepth;Deploy
Deploy PR3b to each environment no earlier than 24h after migration 000161 and #1824 are live there. A Redshift row dispatched before the attempt journal went live in an environment carries no journal record. If AWS changes that tuple's offering within the 24h re-drive horizon, a retry of such a row could buy twice. Waiting 24h after the journal goes live means every retryable Redshift row was dispatched with the journal (reviewer finding from the #1832 review). Dev: #1824 went live at 2026-11-06T23:38:42Z, so this PR merges no earlier than 2026-11-07T23:39Z. Prod ordering is tracked in a follow-up issue.
Merge only after #1824 is deployed with its migration (000161), so the production Manager has the journal. Otherwise C10b refuses every Redshift retry, which fails closed. There are no new migrations.
🤖 Generated with Claude Code