Skip to content

Test investment liquidation lifecycle - #151

Merged
sahilsk11 merged 1 commit into
masterfrom
codex/liquidation-integration-test
Jul 14, 2026
Merged

Test investment liquidation lifecycle#151
sahilsk11 merged 1 commit into
masterfrom
codex/liquidation-integration-test

Conversation

@sahilsk11

Copy link
Copy Markdown
Owner

Adds an end-to-end HTTP integration test for the investment liquidation lifecycle against a migrated temporary Postgres database and a stateful fake Alpaca broker.

The test verifies ownership rejection, idempotent liquidation requests, exact full-position sell orders, pending state before fills, fill reconciliation into cash-only holdings, investment completion, active-list removal, and no duplicate orders on later rebalances.

The integration harness now accepts an injectable identity middleware and broker. Its price fake also returns only requested symbols, matching the production provider contract.

Verification:

  • go test ./integration-tests -run TestInvestmentLiquidationHTTPFlow -count=1
  • go test -race ./integration-tests -run TestInvestmentLiquidationHTTPFlow -count=1
  • ALPHA_ENV=test go test ./integration-tests -count=1
  • ALPHA_ENV=test go test ./...
  • go build ./...

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6728b726-4438-4f01-98d8-884f288559d9

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

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.

@sahilsk11
sahilsk11 merged commit 8cd46b9 into master Jul 14, 2026
2 checks passed
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.

1 participant