test(integration): Verify history persistence and AI context inclusion

This commit is contained in:
2026-02-24 22:06:33 -05:00
parent 7bed5efe61
commit 754fbe5c30
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import pytest
import tomli_w
from pathlib import Path
import aggregate
import project_manager
def test_aggregate_includes_segregated_history(tmp_path):
proj_path = tmp_path / "manual_slop.toml"
hist_path = tmp_path / "manual_slop_history.toml"
# Setup segregated project
proj_data = project_manager.default_project("test-aggregate")
proj_data["discussion"]["discussions"]["main"]["history"] = ["@2026-02-24T14:00:00\nUser:\nShow me history"]
# Save (will segregate)
project_manager.save_project(proj_data, proj_path)
# Run aggregate
loaded_proj = project_manager.load_project(proj_path)
config = project_manager.flat_config(loaded_proj)
markdown, output_file, file_items = aggregate.run(config)
assert "## Discussion History" in markdown
assert "Show me history" in markdown