File size: 1,005 Bytes
1ae168a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Offline self-check — no API call. Run: python test_fr_start.py"""
from pathlib import Path

import fr_start

ROOT = Path(__file__).parent
REGIONS = ["us", "india", "uae", "singapore", "uk"]
EXTRAS = ["cross-border", "entity-types", "industries-grants", "playbooks"]


def main() -> None:
    for name in REGIONS + EXTRAS:
        f = ROOT / "corpus" / f"{name}.md"
        assert f.exists(), f"missing corpus file: {f.name}"
        assert "as_of" in f.read_text(), f"{f.name} missing as_of date"

    text = fr_start.build_system()
    assert "Reference corpus" in text
    for name in ["Singapore", "SEIS", "FEMA", "free zone", "Delaware"]:
        assert name in text, f"corpus content missing: {name}"
    assert "not a lawyer" in text, "disclaimer missing from system prompt"
    assert len(text) < 200_000, "corpus outgrew in-context serving — add retrieval"
    print(f"OK — {len(REGIONS + EXTRAS)} corpus files, system prompt {len(text):,} chars")


if __name__ == "__main__":
    main()