Skip to content

fix: preserve unknown external cash flow in live returns - #640

Merged
Pigbibi merged 1 commit into
mainfrom
fix/unknown-cashflow-20260929
Sep 28, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/unknown-cashflow-20260929

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Live equity records without an external cash-flow field were treated as zero flow: a synthetic equity change from 100 to 200 produced a trusted 100% return. Missing flow now remains unknown, and only explicit finite flows qualify for adjusted returns.

Keep only the latest comparable segment after an unknown interval and propagate incompleteness through collector/monitor, including CSV+live merges and combined calendar/observation gaps. The strict Binance interval path and explicit research-helper zero-flow assumption remain unchanged. No production inputs are filled with invented zero flows.

Validation: baseline reproduction returned ok [1.0]; patched input returns insufficient_observations:invalid_cash_flow and no returns. Focused collector/monitor/store tests: 116 passed, 37 subtests passed. Ruff and diff check pass. Independent review identified the CSV merge issue, which was corrected and rechecked. This is synthetic engineering evidence, not an observed live incident or runtime deployment.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit d59fad3 into main Sep 28, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/unknown-cashflow-20260929 branch September 28, 2026 17:29
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