Skip to content

test: caller-driven replica-lag + idempotency guards (stacked on #4284)#4285

Open
d-cs wants to merge 1 commit into
fix/wait-until-idempotency-retry-rewaitfrom
fix/wait-until-idempotency-retry-rewait-tests
Open

test: caller-driven replica-lag + idempotency guards (stacked on #4284)#4285
d-cs wants to merge 1 commit into
fix/wait-until-idempotency-retry-rewaitfrom
fix/wait-until-idempotency-retry-rewait-tests

Conversation

@d-cs

@d-cs d-cs commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #4284 — tests only

This PR contains only the tests that guard the production fixes in #4284 (its base). Review #4284 first; this branch adds no production code.

What

Caller-driven replica-lag and idempotency guards for every fixed site:

  • Each guard drives the real exported caller (route loader/action, presenter .call(), service, or engine method) against a real Postgres with the owning replica frozen via the shared laggingReplica testcontainer primitive — never a store-seam reimplementation.
  • For a fixed site the guard goes RED when the production change is reverted; for a tolerated read-view site it's a caller-driven GREEN proof the miss self-heals (returns null/empty, no mutation, row live on primary).
  • The global-scope idempotency guard drives the real dedup + claim path through a real MollifierBuffer over a Redis testcontainer (real SETNX/poll/publish), and covers the cross-DB andWait waitpoint wiring and the expired/failed clear-and-recreate reacquire cases.

Run with vitest --no-file-parallelism (testcontainers). Verified GREEN, and revert→RED verified per fixed site.

@changeset-bot

changeset-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 551354a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 48289465-065c-4044-b99c-970a760da342

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds extensive Vitest integration coverage for replica-lag behavior across webapp routes, presenters, realtime services, run-engine operations, and run-store views. Tests simulate missing or stale replica rows, verify primary read fallbacks and primary-only mutation reads, validate tolerated null/empty responses, and cover cross-database global idempotency and waitpoint ownership behavior.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description does not follow the required template and omits Closes #, checklist, Testing, Changelog, and Screenshots sections. Rewrite it to match the template exactly, including Closes #, checklist items, Testing steps, Changelog, and Screenshots sections.
Docstring Coverage ⚠️ Warning Docstring coverage is 37.04% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the test-only replica-lag and idempotency guard changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wait-until-idempotency-retry-rewait-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@d-cs d-cs self-assigned this Jul 18, 2026
@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch from b9faca3 to 69fe2db Compare July 18, 2026 16:35
@d-cs
d-cs marked this pull request as ready for review July 18, 2026 16:39
@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch 2 times, most recently from e7b4143 to 1abf430 Compare July 18, 2026 17:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (3)
apps/webapp/test/metadataRouteReplicaLag.guard.test.ts (1)

95-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared laggingReplica primitive.

This local proxy duplicates the canonical test harness and can drift from its Prisma routing semantics. Import laggingReplica from @internal/testcontainers, configure taskRun with mode: "missing", and update the hit assertion to wasHit("taskRun").

internal-packages/run-store/src/runOpsStore.bulkActionReadView.replicaLag.test.ts (1)

24-55: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared laggingReplica helper instead of maintaining five proxy copies.

The exported helper already supports the same taskRun missing mode used here. Reusing it keeps lag simulation consistent across the suite and matches the PR objective.

  • internal-packages/run-store/src/runOpsStore.bulkActionReadView.replicaLag.test.ts#L24-L55: import laggingReplica and configure taskRun with mode: "missing".
  • internal-packages/run-store/src/runOpsStore.cancelRunReadAfterWrite.replicaLag.test.ts#L30-L64: replace the local proxy with the shared helper.
  • internal-packages/run-store/src/runOpsStore.dashboardAgentReadView.replicaLag.test.ts#L34-L66: replace the local proxy with the shared helper.
  • internal-packages/run-store/src/runOpsStore.idempotencyResetReadView.replicaLag.test.ts#L24-L58: replace the local proxy with the shared helper.
  • internal-packages/run-store/src/runOpsStore.modelRuntimeEnvReadView.replicaLag.test.ts#L43-L79: replace the copied proxy with the shared helper.
internal-packages/run-store/src/runOpsStore.sessionMetadataRouteReadView.replicaLag.test.ts (1)

39-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared laggingReplica testcontainer primitive.

Both local Prisma proxies duplicate and can drift from the shared replica simulation required by this PR.

  • internal-packages/run-store/src/runOpsStore.sessionMetadataRouteReadView.replicaLag.test.ts#L39-L67: import laggingReplica from @internal/testcontainers, remove the local proxy, and use model-keyed wasHit.
  • internal-packages/run-store/src/runOpsStore.sessionRunProbeReadAfterWrite.test.ts#L26-L54: make the same replacement for both legacy and dedicated replica cases.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 17b844da-e700-4b47-8cde-0f1d2b331439

📥 Commits

Reviewing files that changed from the base of the PR and between fb8fcfe and 1abf430.

📒 Files selected for processing (55)
  • apps/webapp/test/batchServices.replicaLag.test.ts
  • apps/webapp/test/bulkActionV2.replicaLag.test.ts
  • apps/webapp/test/cancelRouteReplicaLag.guard.test.ts
  • apps/webapp/test/engineReplicaReads.replicaLag.guard.test.ts
  • apps/webapp/test/findEnvironmentFromRunReplicaLag.guard.test.ts
  • apps/webapp/test/idempotencyGlobalScopeCrossDbConcurrent.test.ts
  • apps/webapp/test/idempotencyResetRouteReplicaLag.guard.test.ts
  • apps/webapp/test/metadataRouteReplicaLag.guard.test.ts
  • apps/webapp/test/presentersSessionBatchReplicaLag.guard.test.ts
  • apps/webapp/test/readRunForEvent.replicaLag.test.ts
  • apps/webapp/test/realtimeServices.replicaLag.test.ts
  • apps/webapp/test/realtimeSessionsIoRoute.replicaLag.guard.test.ts
  • apps/webapp/test/realtimeStreamRoutes.replicaLag.test.ts
  • apps/webapp/test/replayRouteReplicaLag.guard.test.ts
  • apps/webapp/test/routesBatchGetReplicaLag.guard.test.ts
  • apps/webapp/test/runGetRoutes.replicaLag.guard.test.ts
  • apps/webapp/test/runPresenters.replicaLag.test.ts
  • apps/webapp/test/runsRepositoryConvert.replicaLag.test.ts
  • apps/webapp/test/sessionWaitpointRoutes.replicaLag.guard.test.ts
  • apps/webapp/test/spanTraceRoutes.replicaLag.test.ts
  • apps/webapp/test/waitpointCallbackRouteReplicaLag.guard.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/test/waitpointPresenters.replicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/retryDecisionReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-engine/src/engine/systems/ttlSystemExpireReplicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/tests/concurrencySweeperCallbackReplicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/tests/runAttemptSystemReplicaLag.guard.test.ts
  • internal-packages/run-store/src/runOpsStore.batchDependentAttemptReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.batchIdempotencyDedupReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.bulkActionReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.cancelRunReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.dashboardAgentReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.engineReadViews.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.idempotencyGlobalScopeCrossDb.test.ts
  • internal-packages/run-store/src/runOpsStore.idempotencyResetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.modelRuntimeEnvReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersRunReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersSessionBatchReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersWaitpointReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.realtimeServicesReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.replayReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.resolveRunForMutationReplicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesBatchGetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesRealtimeStreamReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesRunGetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesSpanTraceReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.serviceBatchFamilyReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.sessionMetadataRouteReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.sessionRunProbeReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.storeReceiverReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.ttlExpireOrphanReplicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.usageCostUndercountReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointCompleteRouteAndReplayLoaderReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointCompleteTokenReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointDedupReadAfterWrite.test.ts

Comment thread apps/webapp/test/idempotencyResetRouteReplicaLag.guard.test.ts
Comment thread apps/webapp/test/realtimeServices.replicaLag.test.ts Outdated
Comment thread internal-packages/run-store/src/runOpsStore.sessionRunProbeReadAfterWrite.test.ts Outdated
@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch 3 times, most recently from c0b053f to eac4192 Compare July 18, 2026 18:32
@d-cs

d-cs commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up on the shared-laggingReplica consolidation:

Rather than leave it for a later PR, I'm sweeping the remaining replica-lag test files in this PR that still carry a local lag-proxy onto the shared @internal/testcontainers laggingReplica primitive — the same change already applied to realtimeServicesReadView, replayReadAfterWrite, resolveRunForMutation, and routesSpanTraceReadView.

Scope: ~18 remaining files across run-store, run-engine, and webapp/test.

Exceptions that will stay on a local proxy (with an inline note), because the shared primitive intercepts only configured Prisma model reads and can't express them:

  • raw-query staling ($queryRaw/$executeRaw) — e.g. presentersWaitpointReadView, and any waitpoint-connection JOIN reads;
  • select-shape-scoped frozen scalar snapshots — e.g. runAttemptSystem;
  • any other proxy that returns fabricated non-null stale rows keyed on non-scalar where.

Each migrated file is verified green individually; pushing as an amend to the tests commit shortly.

@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch from eac4192 to 47a6984 Compare July 18, 2026 18:46
@d-cs

d-cs commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Shared-laggingReplica sweep complete (pushed in 47a6984c3).

Migrated onto the shared @internal/testcontainers laggingReplica primitive (20 files):

  • run-store (15): bulkActionReadView, cancelRunReadAfterWrite, dashboardAgentReadView, idempotencyResetReadView, modelRuntimeEnvReadView, realtimeServicesReadView, replayReadAfterWrite, resolveRunForMutationReplicaLag, routesSpanTraceReadView, sessionMetadataRouteReadView, sessionRunProbeReadAfterWrite, waitpointCompleteRouteAndReplayLoaderReadView, waitpointCompleteTokenReadAfterWrite, waitpointDedupReadAfterWrite, batchDependentAttemptReadView
  • webapp (5): idempotencyResetRouteReplicaLag.guard, metadataRouteReplicaLag.guard, replayRouteReplicaLag.guard, waitpointCallbackRouteReplicaLag.guard, waitpointCompleteRouteReplicaLag.guard

Each now calls laggingReplica(client, [{ model, mode: "missing" }]) (two configs where a site stales two models). All 20 verified green individually (run-store 22 tests, webapp 8 tests, plus the 14 from the first four).

Kept on a local proxy — the shared primitive can't express these (with reason):

  • presentersWaitpointReadView / waitpointPresenters.replicaLag.guard — stale $queryRaw/$queryRawUnsafe (the connected-runs JOIN); the shared primitive intercepts only Prisma models, never raw queries.
  • runAttemptSystemReplicaLag.guard — stales taskRun.findFirst for two exact select shapes with different frozen scalar snapshots; the shared primitive can't discriminate by select. (Already uses the shared primitive for its whole-row-missing cases.)

No change needed: concurrencySweeperCallbackReplicaLag.guard already used the shared primitive.

@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch 2 times, most recently from 1a6af28 to 7102b75 Compare July 18, 2026 19:16
@d-cs

d-cs commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
apps/webapp/test/findEnvironmentFromRunReplicaLag.guard.test.ts (1)

29-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use static Prisma imports in both database mock factories.

Neither import performs conditional loading or resolves a circular dependency.

  • apps/webapp/test/findEnvironmentFromRunReplicaLag.guard.test.ts#L29-L30: statically import Prisma and make the mock factory synchronous.
  • apps/webapp/test/routesBatchGetReplicaLag.guard.test.ts#L51-L53: apply the same change to this mock factory.

As per coding guidelines, prefer static imports unless dynamic loading is required for a documented exception.

Source: Coding guidelines

apps/webapp/test/waitpointPresenters.replicaLag.guard.test.ts (1)

91-135: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use the shared laggingReplica for supported model freezes.

This local proxy changes all Prisma read semantics and can let these guard tests diverge from the rest of the replica-lag suite. Use the shared primitive for waitpoint, taskRun, and waitpointTag; retain a narrow local wrapper only for the unsupported raw-query case.

The PR objective reserves local proxies for unsupported behaviors such as raw queries or select-specific snapshots.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e0204b38-b5dd-4392-903a-21214f9bbd70

📥 Commits

Reviewing files that changed from the base of the PR and between fb8fcfe and 7102b75.

📒 Files selected for processing (56)
  • apps/webapp/test/batchServices.replicaLag.test.ts
  • apps/webapp/test/bulkActionV2.replicaLag.test.ts
  • apps/webapp/test/cancelRouteReplicaLag.guard.test.ts
  • apps/webapp/test/engineReplicaReads.replicaLag.guard.test.ts
  • apps/webapp/test/findEnvironmentFromRunReplicaLag.guard.test.ts
  • apps/webapp/test/idempotencyGlobalScopeCrossDbConcurrent.test.ts
  • apps/webapp/test/idempotencyResetRouteReplicaLag.guard.test.ts
  • apps/webapp/test/metadataRouteReplicaLag.guard.test.ts
  • apps/webapp/test/presentersSessionBatchReplicaLag.guard.test.ts
  • apps/webapp/test/readRunForEvent.replicaLag.test.ts
  • apps/webapp/test/realtimeServices.replicaLag.test.ts
  • apps/webapp/test/realtimeSessionsIoRoute.replicaLag.guard.test.ts
  • apps/webapp/test/realtimeStreamRoutes.replicaLag.test.ts
  • apps/webapp/test/replayRouteReplicaLag.guard.test.ts
  • apps/webapp/test/routesBatchGetReplicaLag.guard.test.ts
  • apps/webapp/test/runGetRoutes.replicaLag.guard.test.ts
  • apps/webapp/test/runPresenters.replicaLag.test.ts
  • apps/webapp/test/runsRepositoryConvert.replicaLag.test.ts
  • apps/webapp/test/sessionWaitpointRoutes.replicaLag.guard.test.ts
  • apps/webapp/test/spanTraceRoutes.replicaLag.test.ts
  • apps/webapp/test/waitpointCallbackRouteReplicaLag.guard.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/test/waitpointPresenters.replicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/retryDecisionReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-engine/src/engine/systems/ttlSystemExpireReplicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/tests/concurrencySweeperCallbackReplicaLag.guard.test.ts
  • internal-packages/run-engine/src/engine/tests/runAttemptSystemReplicaLag.guard.test.ts
  • internal-packages/run-store/src/runOpsStore.batchDependentAttemptReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.batchIdempotencyDedupReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.bulkActionReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.cancelRunReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.dashboardAgentReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.engineReadViews.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.idempotencyGlobalScopeCrossDb.test.ts
  • internal-packages/run-store/src/runOpsStore.idempotencyResetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.modelRuntimeEnvReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersRunReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersSessionBatchReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.presentersWaitpointReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.realtimeServicesReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.replayReadAfterWrite.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.resolveRunForMutationReplicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesBatchGetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesRealtimeStreamReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesRunGetReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.routesSpanTraceReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.serviceBatchFamilyReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.sessionMetadataRouteReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.sessionRunProbeReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.storeReceiverReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.test.ts
  • internal-packages/run-store/src/runOpsStore.ttlExpireOrphanReplicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.usageCostUndercountReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointCompleteRouteAndReplayLoaderReadView.replicaLag.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointCompleteTokenReadAfterWrite.test.ts
  • internal-packages/run-store/src/runOpsStore.waitpointDedupReadAfterWrite.test.ts

Comment thread apps/webapp/test/runGetRoutes.replicaLag.guard.test.ts
Comment thread apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
Comment thread internal-packages/run-store/src/runOpsStore.waitpointDedupReadAfterWrite.test.ts Outdated
…tency guards

Guards for the production fixes in the base PR. Each fixed site has a
caller-driven test that drives the real exported route/presenter/service/engine
caller against a real Postgres with the owning replica frozen (shared
laggingReplica primitive), and goes RED when the fix is reverted; tolerated
read-view sites carry a caller-driven GREEN proof of self-healing. The
global-scope idempotency guard drives the real dedup + claim path through a real
MollifierBuffer over a Redis testcontainer, incl. the cross-DB andWait and the
expired/failed clear-and-recreate reacquire cases.
@d-cs
d-cs force-pushed the fix/wait-until-idempotency-retry-rewait-tests branch from 7102b75 to 551354a Compare July 18, 2026 19:52
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The suite genuinely guards the regression — caller-driven RED-on-revert across every fix category, and the global-idempotency race is exercised for real over Redis + a two-DB store with a live SET NX barrier. A few non-blocking coverage notes:

  • The batch-404 test asserts the server stamps x-should-retry on the GET routes (correct), but nothing drives the subscribeToBatch shape path that ignores it — that's the gap behind the batches note on fix: read-your-writes + global-scope idempotency correctness under the run-ops split #4284.
  • The origin wait.until dedup is guarded at the store seam, not end-to-end through WaitpointSystem.
  • retryDecisionReadAfterWrite and the store-level *ReadView/*ReadAfterWrite files are characterizations that stay green on a caller-fix revert — the real revert guards for those sites are the caller-driven *.guard.test.ts files.

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.

2 participants