fix(price): drop quote deviation cap so Montzar live price can apply

Stale prices rows were rejecting a valid ~220M partner quote against an old ~168M reference and locking the app on database_last.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-25 13:31:47 +03:30
co-authored by Cursor
parent b21b136711
commit dfa6d792ee
2 changed files with 7 additions and 41 deletions
+4 -21
View File
@@ -7,30 +7,13 @@ use PHPUnit\Framework\TestCase;
class QuotePricePlausibilityTest extends TestCase
{
public function test_rejects_stale_montzar_jump_against_reference(): void
public function test_accepts_any_positive_price(): void
{
$config = new class extends ConfigService {
public function referenceQuotePrice(): float
{
return 223_260_000.0;
}
};
$this->assertFalse($config->isPlausibleQuotePrice(168_336_410.0));
$this->assertTrue($config->isPlausibleQuotePrice(222_010_000.0));
$this->assertTrue($config->isPlausibleQuotePrice(223_260_000.0));
}
public function test_accepts_any_positive_when_no_reference(): void
{
$config = new class extends ConfigService {
public function referenceQuotePrice(): float
{
return 0.0;
}
};
$config = new ConfigService();
$this->assertTrue($config->isPlausibleQuotePrice(168_336_410.0));
$this->assertTrue($config->isPlausibleQuotePrice(222_010_000.0));
$this->assertFalse($config->isPlausibleQuotePrice(0.0));
$this->assertFalse($config->isPlausibleQuotePrice(-1.0));
}
}