Files
Jyotisha/tests/test_upstream_git_import_b9a0ef8f.py
T
ClaudeandClaude Opus 5.5 80bcfe1ed4 sync(upstream): method layer and calculation fixes from yinduzhanxing ea2a9d65
Product 2026-11-07: stay in sync with the astrologer's latest (5fb8379c..ea2a9d65).

- Method layer: mirror SKILL.md re-imported with import_yinduzhanxing.py from a
  clean ea2a9d65 clone (import record, manifest, import plan); root SKILL.md
  body equals the mirror again (nine-lord editorial reference line). Router and
  sub-skills unchanged upstream except her rectification skill, which is the
  protected commercial skill here.
- 7b43eaf2: rectification question templates say they are templates (basis,
  timing status, answer impact), no regression_hint +5 bias, low confidence
  cap, blocked/external execution status in the audit table, invalid answers
  ignored by the selector, calculation_profile echoed; API rejects a partial
  lat/lon/tz and event rectification without a place.
- a4b4b267: BPHS 27.19 Drik weighting readings as diagnostic variants in
  scripts/shadbala_reference/drik_profiles.py (shadbala.py is frozen, ERR-110;
  default quarter and BPHS piecewise geometry unchanged, BUG-1586 / BUG-1623);
  oracle audit compares rupa with rupa; VP Jain benchmark prints by default.
- bb26dc2d: /api/jaimini special mode carries the Goel fields, no invented
  Aries ascendant.
- d66d13ce: annual report exposes tajika_named_yoga_structures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-07 18:12:32 +08:00

38 lines
1.8 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Git-mode import record for upstream b9a0ef8f, kept as history.
原值: 本文件要求 source-manifest.json 与 SKILL.md 快照仍停在 b9a0ef8f
新值: 只核对这份历史记录自身完整,且已不是当前镜像
原因: 2026-11-04 第十轮同步把镜像移到 5fb8379c;2026-11-07 再移到 ea2a9d65(tests/test_upstream_git_import_ea2a9d65.py)
"""
from __future__ import annotations
import json
import re
from pathlib import Path
from jsonschema import Draft202012Validator, FormatChecker
ROOT = Path(__file__).resolve().parents[1]
RECORD = ROOT / "references/cross_project_contract/imports/commit-b9a0ef8f0f0de8714982a5aa7100f5aea16c9d09.json"
SOURCE_MANIFEST = ROOT / "references/upstream/yinduzhanxing/source-manifest.json"
SCHEMA = ROOT / "references/cross_project_contract/import_manifest.schema.json"
COMMIT = "b9a0ef8f0f0de8714982a5aa7100f5aea16c9d09"
HISTORICAL_SKILL_SHA256 = "6bed459b8b971b189895e62aabfb90e41dbdf8f5b9e80a4b5330d40922fe21eb"
def test_historical_git_import_record_stays_valid_and_is_not_the_current_mirror() -> None:
record = json.loads(RECORD.read_text(encoding="utf-8"))
manifest = json.loads(SOURCE_MANIFEST.read_text(encoding="utf-8"))
schema = json.loads(SCHEMA.read_text(encoding="utf-8"))
Draft202012Validator(schema, format_checker=FormatChecker()).validate(record)
assert record["source_mode"] == "git"
assert record["source_commit"] == COMMIT
assert re.fullmatch(r"[0-9a-f]{64}", record["source_tree_hash"])
assert record["source_skill_sha256"] == HISTORICAL_SKILL_SHA256
assert record["mirror_files"][0]["target_sha256_after"] == HISTORICAL_SKILL_SHA256
assert record["mirror_files"][0]["status"] == "applied"
assert all(row["status"] == "review_required" for row in record["semantic_merge_files"])
assert manifest["source_commit"] != COMMIT