Add 'fiscal/' from commit '102ba84500dbd9655a0471288c3e278652593ca9'

git-subtree-dir: fiscal
git-subtree-mainline: d95165fc8f
git-subtree-split: 102ba84500
This commit is contained in:
gti
2026-09-29 14:43:23 -03:00
868 changed files with 566394 additions and 0 deletions
@@ -0,0 +1,13 @@
def test_company_session_is_company_first_review_only_and_has_ipi_impact(tmp_path):
from scripts.run_company_decision_session import build_session
session = build_session(tmp_path, "docs/LOCAL_FISCAL_CONTEXT_QUESTIONS_V2.json") if (tmp_path / "docs/LOCAL_FISCAL_CONTEXT_QUESTIONS_V2.json").exists() else None
# Use a small local fixture because the production artifact is intentionally large.
if session is None:
(tmp_path / "docs/runs/multi_db").mkdir(parents=True)
(tmp_path / "docs").mkdir(exist_ok=True)
(tmp_path / "docs/LOCAL_FISCAL_CONTEXT_QUESTIONS_V2.json").write_text('{"questions":[{"QUESTION_ID":"Q1","DATABASE":"A","SCOPE":"COMPANY","KEY":"entry_scope","VALID_OPTIONS":["INTRA","INTER","MIXED_OR_DYNAMIC"],"QUESTION":"Escopo?"}]}', encoding="utf-8")
(tmp_path / "docs/FISCAL_COVERAGE_FULL_V3.json").write_text('{"total_products":1,"ipi":{"numeric":1,"non_numeric":0,"ambiguous":0}}', encoding="utf-8")
session = build_session(tmp_path)
assert all(question["scope"] == "COMPANY" for question in session["questions"])
assert session["persisted"] is False and session["firebird_writes"] == 0