fix: posting retry recovery, configurable extraction URL, and integration test fix - #3
Merged
Merged
Conversation
… integration test fix - Add retryPosting domain function for posting_failed -> posting transition with actor authority and version guards - Branch command service post() to reuse existing posting attempt and idempotency key when state is posting_failed instead of creating a new one - Add findLatestPostingAttempt repository method ordered by createdAt desc - Make extraction adapter API URL configurable via EXTRACTION_API_URL env, defaulting to OpenRouter; enables Google AI Studio OpenAI-compatible endpoint - Fix integration test isolation: clean stale INV-2026-0001 cases before and after each run to prevent business-duplicate false positives from other fixtures; server suite is now fully green at 236/236
…ssertion The temporary posting failure scenario now completes posting through the worker and asserts a stable ACC- reference, proving the retry path produces one accounting outcome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups to the production-hardening PR (#2). Three independent fixes addressing a posting retry gap, configurable extraction provider support, and a pre-existing integration test failure.
Changes
P1 — Posting retry recovery
retryPostingdomain function forposting_failed → postingtransition with actor authority and version guardspost()to branch onposting_failed: finds the latest posting attempt, verifies it isfailedand notpermanent_rejection, reuses its idempotency key, resets topending, and re-enqueuesfindLatestPostingAttemptrepository methodACC-referenceP1 — Configurable extraction provider
EXTRACTION_API_URLfrom env, defaults to OpenRouterhttps://generativelanguage.googleapis.com/v1beta/openai/chat/completions.env.exampleP2 — Integration test fix
findBusinessDuplicatefound stale cases with the same deterministic invoice number (INV-2026-0001) from other test fixturesbeforeEach/afterEachcleanup targeting staleINV-2026-0001cases and@t8.testusersVerification
Follow-ups (outside scope)