RepoPulse: update backend/app and dependencies (+3 areas)
Public changes compared with the previous published export: 26 files changed. Affected areas: - backend/app: 11 files - dependencies: 5 files - deployment and CI: 3 files - documentation: 2 files - tests: 5 files Changed files: - Updated: "Dockerfile.unraid" - Updated: "README.md" - Updated: "backend/Dockerfile" - Updated: "backend/app/acquisition.py" - Updated: "backend/app/architecture.py" - Updated: "backend/app/git_analysis.py" - Updated: "backend/app/gitea.py" - Updated: "backend/app/jobs.py" - Updated: "backend/app/main.py" - Added: "backend/app/processes.py" - Updated: "backend/app/rules.py" - Updated: "backend/app/scanner.py" - Updated: "backend/app/signals.py" - Updated: "backend/app/store.py" - Updated: "backend/pyproject.toml" - Added: "backend/tests/test_api_responsiveness.py" - Added: "backend/tests/test_processes.py" - Updated: "backend/tests/test_scanner.py" - Updated: "backend/tests/test_signals_v11.py" - Updated: "backend/tests/test_store.py" - Updated: "docker-compose.yml" - Updated: "docs/ARCHITECTURE.md" - Updated: "frontend/package-lock.json" - Updated: "frontend/package.json" - Updated: "package-lock.json" - Updated: "package.json" Export provenance/manifests refreshed; excluded from the change summary. Publish curated RepoPulse source from a251f826238908b156485299061da76482780ed2
This commit is contained in:
1 parent
23a4a721f1
commit
61ae49f9d0
28 files changed
+1083
-408
No files matched your search
@@ -159,3 +159,38 @@ def test_catalog_summary_uses_denormalized_fields_without_report_json_parsing(tm
|
||||
assert storage["scan_count"] == 1
|
||||
assert storage["mirror_count"] >= 0
|
||||
assert storage["worktree_count"] >= 0
|
||||
|
||||
|
||||
def test_history_listings_keep_counts_for_compacted_reports_without_report_parsing(
|
||||
tmp_path: Path, monkeypatch
|
||||
) -> None:
|
||||
repository = tmp_path / "repo"
|
||||
repository.mkdir()
|
||||
(repository / "app.py").write_text("print('hello')\n", encoding="utf-8")
|
||||
monkeypatch.setenv("REPOPULSE_FULL_REPORTS_PER_REPOSITORY", "1")
|
||||
store = ScanStore(str(tmp_path / "repopulse.db"))
|
||||
first = store.save(scan_repository(str(repository)))
|
||||
second = store.save(scan_repository(str(repository)))
|
||||
assert store.get(first.id).compacted is True
|
||||
assert first.findings
|
||||
|
||||
def fail_if_called(*_args, **_kwargs):
|
||||
raise AssertionError("history listings must not deserialize full reports")
|
||||
|
||||
monkeypatch.setattr(store, "_report_from_row", fail_if_called)
|
||||
repository_id = second.source.repository_id
|
||||
active = [item for item in first.findings if not item.suppressed]
|
||||
|
||||
scans = store.repository_scans(repository_id)
|
||||
assert [item.id for item in scans] == [second.id, first.id]
|
||||
assert scans[0].findings == len(second.findings)
|
||||
assert scans[0].duration_ms == second.duration_ms
|
||||
assert scans[0].release_readiness == second.release_readiness
|
||||
# A compacted report keeps its retained summary count instead of reporting zero.
|
||||
assert scans[1].findings == len(active)
|
||||
|
||||
trend = store.trend(repository_id)
|
||||
assert [item.scan_id for item in trend] == [first.id, second.id]
|
||||
assert trend[0].findings == len(active)
|
||||
assert trend[0].warnings == sum(1 for item in active if item.severity == "warning")
|
||||
assert trend[1].findings == len(second.findings)
|
||||
Reference in new issue
Block a user