Fix Codex package local source references
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-21 21:12:52 +03:00
parent fea29e665c
commit dafb552ad3
2 changed files with 43 additions and 4 deletions
+5
View File
@@ -1,4 +1,5 @@
from pathlib import Path
import json
import re
import time
from types import SimpleNamespace
@@ -1716,6 +1717,10 @@ def test_ai_structure_prepare_writes_ai_ready_package(tmp_path: Path):
assert (codex_package / "raw" / "normalized_project.json").exists()
assert (codex_package / "source" / "metadata.xml").exists()
assert (codex_package / "source" / "Интеграция.bsl").read_text(encoding="utf-8").startswith("Процедура")
modules_index = json.loads((codex_package / "indexes" / "modules.json").read_text(encoding="utf-8"))
assert any(item.get("local_source_path") == "source/Интеграция.bsl" for item in modules_index)
module_docs = "\n".join(path.read_text(encoding="utf-8") for path in (codex_package / "modules").glob("*.md"))
assert "Local source: `source/Интеграция.bsl`" in module_docs
assert "generated by SFERA for Codex" in (codex_package / "AGENTS.md").read_text(encoding="utf-8")
assert "Use `source/`" in (codex_package / "AGENTS.md").read_text(encoding="utf-8")
assert "Copy this whole folder into the Codex project" in (codex_package / "README.md").read_text(encoding="utf-8")