Add source preview to AI structure package
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-22 15:43:24 +03:00
parent 7501111d29
commit 0a9ab94679
4 changed files with 46 additions and 0 deletions
+3
View File
@@ -1731,6 +1731,7 @@ def test_ai_structure_prepare_writes_ai_ready_package(tmp_path: Path):
assert (output / "normalized_project.json").exists()
assert (output / "sir_snapshot.json").exists()
assert (output / "project_layout.json").exists()
assert (output / "source_preview.json").exists()
assert (output / "compact_objects.json").exists()
assert (output / "compact_modules.json").exists()
assert (codex_package / "AGENTS.md").exists()
@@ -1740,6 +1741,7 @@ def test_ai_structure_prepare_writes_ai_ready_package(tmp_path: Path):
assert (codex_package / "context" / "project-overview.md").exists()
assert (codex_package / "indexes" / "codex-navigation.json").exists()
assert (codex_package / "indexes" / "project-layout.json").exists()
assert (codex_package / "indexes" / "source-preview.json").exists()
assert (codex_package / "indexes" / "objects-compact.json").exists()
assert (codex_package / "indexes" / "modules-compact.json").exists()
assert (codex_package / "indexes" / "objects.json").exists()
@@ -1842,6 +1844,7 @@ def test_ai_structure_prepare_understands_configuration_and_extension_folders(tm
assert payload["status"] == "ready"
assert payload["source_layout"]["main_configuration_root"] == "Конфигурация"
assert payload["source_layout"]["extension_roots"] == ["CRM"]
assert any(item["label"] == "Папки расширений" for item in payload["source_preview"])
assert payload["normalized"]["extensions"] == 1
codex_package = output / payload["codex_package_folder"]
layout = json.loads((codex_package / "indexes" / "project-layout.json").read_text(encoding="utf-8"))