fix(rectification): anchor candidate windows to civil dates across midnight
Carry explicit local date intervals instead of inferring the day from clock order. Cluster width, delivery, adoption, and reports keep the actual civil date; adopted date is stored separately from the reported birth_date. Algorithm identity is scoring-9 / spec-v5. Scoring weights, confirmation thresholds, and Skill version are unchanged. Isolated Linux final-3 gates passed; four pre-existing Python failures remain. This is not a production release.
This commit is contained in:
@@ -117,12 +117,15 @@ def test_requires_exactly_two_distinct_candidate_times_before_running_vedastro()
|
||||
handler._compute_rectification_v5_vedastro_validate(request(candidate_times))
|
||||
|
||||
|
||||
def test_passes_only_when_official_layers_discriminate_and_primary_is_strictly_better(monkeypatch):
|
||||
@pytest.mark.parametrize("dated", [False, True])
|
||||
def test_passes_only_when_official_layers_discriminate_and_primary_is_strictly_better(monkeypatch, dated):
|
||||
range_calls = []
|
||||
minute_dates = []
|
||||
|
||||
class Adapter:
|
||||
@staticmethod
|
||||
def run_rectification_minute_snapshot_for_case(case, case_id="user_chart"):
|
||||
minute_dates.append((case["year"], case["month"], case["day"]))
|
||||
return minute_snapshot(case)
|
||||
|
||||
@staticmethod
|
||||
@@ -141,7 +144,13 @@ def test_passes_only_when_official_layers_discriminate_and_primary_is_strictly_b
|
||||
monkeypatch.setattr("scripts.jyotish_api_server._load_local_module", lambda name: Adapter)
|
||||
monkeypatch.setenv("VEDASTRO_API_KEY", "must-not-leak")
|
||||
|
||||
result = object.__new__(JyotishAPIHandler)._compute_rectification_v5_vedastro_validate(request())
|
||||
body = request()
|
||||
if dated:
|
||||
body["birth_date"] = "2000-03-01"
|
||||
body["candidate_intervals"] = [{"start_at": "2000-02-29T05:13", "end_at": "2000-02-29T05:14"}]
|
||||
result = object.__new__(JyotishAPIHandler)._compute_rectification_v5_vedastro_validate(body)
|
||||
if dated:
|
||||
assert minute_dates == [(2000, 2, 29), (2000, 2, 29)]
|
||||
|
||||
assert result["status"] == "pass"
|
||||
assert result["passed"] is True
|
||||
|
||||
Reference in New Issue
Block a user