Skip to content

Add scheduled investment liquidation - #150

Merged
sahilsk11 merged 4 commits into
masterfrom
codex/end-investment-liquidation
Jul 14, 2026
Merged

Add scheduled investment liquidation#150
sahilsk11 merged 4 commits into
masterfrom
codex/end-investment-liquidation

Conversation

@sahilsk11

@sahilsk11 sahilsk11 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Adds POST /investments/:investmentID/request-liquidation, an authenticated and idempotent request to liquidate an investment at the next rebalance.

The rebalancer targets cash-only holdings for requested liquidations, reuses the existing aggregated order flow, and marks the investment ended only after fills leave it with no stock positions. Paused investments with liquidation requests remain eligible so they cannot get stuck.

Includes migration 59, regenerated DB models and repository mocks, ownership checks, and lifecycle tests. Repository updates use Go Jet throughout.

Verification: ALPHA_ENV=test go test ./...; go build ./...; generated DB models regenerated from the migrated local Postgres schema.

@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: fa4812f8-7b34-4f77-944a-cc13e62d3123

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 e9af62f 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