Skip to content

Expose investment liquidation lifecycle - #153

Merged
sahilsk11 merged 1 commit into
masterfrom
codex/investment-liquidation-status
Jul 15, 2026
Merged

Expose investment liquidation lifecycle#153
sahilsk11 merged 1 commit into
masterfrom
codex/investment-liquidation-status

Conversation

@sahilsk11

Copy link
Copy Markdown
Owner

Summary

  • add an authenticated GET /investments endpoint that includes active and ended investments
  • expose status and endDate while preserving /activeInvestments compatibility
  • derive ACTIVE, LIQUIDATION_REQUESTED, LIQUIDATING, and LIQUIDATED from existing investment and trade data
  • extend the HTTP/database liquidation test through request, pending broker orders, fills, and history retention

Design

Completed investments remain soft-ended through the existing investment.end_date; no archive table or migration is introduced. The frontend can treat ended records from /investments as its Past Investments section.

Verification

  • go test ./api ./internal/repository ./internal/service -count=1
  • go test ./integration-tests -run TestInvestmentLiquidationHTTPFlow -count=1
  • ALPHA_ENV=test go test ./... -count=1
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 15, 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: aecc1a0f-20d9-495b-9c98-843410f94572

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 c734d8e into master Jul 15, 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