compass-kb-validation 4.4.0__tar.gz → 4.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {compass_kb_validation-4.4.0/compass_kb_validation.egg-info → compass_kb_validation-4.5.0}/PKG-INFO +35 -3
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/README.md +34 -2
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/__init__.py +1 -1
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/cli.py +62 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/config/__init__.py +29 -1
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/__init__.py +157 -3
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/_report_css.py +20 -0
- compass_kb_validation-4.5.0/compass/trend_analysis.py +469 -0
- compass_kb_validation-4.5.0/compass/trend_tracker.py +570 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0/compass_kb_validation.egg-info}/PKG-INFO +35 -3
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass_kb_validation.egg-info/SOURCES.txt +2 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/discover_and_validate.py +26 -8
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/run_validation.py +14 -3
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_trends.py +4 -1
- compass_kb_validation-4.5.0/tests/test_v450_trends.py +255 -0
- compass_kb_validation-4.4.0/compass/trend_tracker.py +0 -272
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/LICENSE +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/__main__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/acceptance.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/alias.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/ask.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/baseline.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/benchmark.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/check_catalog.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/check_outcome.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/chunk_coherence.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/chunk_eval.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/chunk_integrity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/chunk_ref.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/citation.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/config_lint.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/content_fidelity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/content_inspect.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/corpus.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/corpus_health.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/cross_index.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/diagnostics.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/diff.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/drift.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/embedding_drift.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/eval_enrich.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/eval_interop.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/evidence.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/findings.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/grounding.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/grounding_diff.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/grounding_rollup.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/gt_lint.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/health.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/incremental.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/init_wizard.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/lineage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/live_dashboard.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/manifest.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/mcp_server.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/metadata_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/models/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/notifications.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/passage_probe.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/pdf_support.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/pipeline/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/presence.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/profiler.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/provenance.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/embedding.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/extractor.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/graph.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/markers.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/snapshot.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/source.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/storage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/providers/vectorstore.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/quality_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/readiness.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/remediation.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/_report_js.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/analysis.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/audit.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/export.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/fidelity_view.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/grounding_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/report/shell.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/retrieval_analysis.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/simulate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/snapshot_doctor.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/structure_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/text_match.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/text_probes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/triage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/utils/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/api_upload.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/base.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/base_sparql.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/cross_stage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/graphdb_metadata.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/metadata_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/neptune_metadata.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/redis_chunks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/registry.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/retrieval_quality.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass/validators/s3_storage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass_kb_validation.egg-info/dependency_links.txt +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass_kb_validation.egg-info/entry_points.txt +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass_kb_validation.egg-info/requires.txt +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/compass_kb_validation.egg-info/top_level.txt +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/ingestion_validation/__init__.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/profile_kb.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/pyproject.toml +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/setup.cfg +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_alias.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_alias_disambiguation.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_alias_temporal.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_alt_adapters.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_analysis_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_api_upload.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_ask.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_baseline.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_benchmark.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_calibrate_truth.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_check_catalog.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_chunk_eval.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_chunk_integrity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_chunk_structure_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_citation.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_citation_levels.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_cli.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_cli_commands.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_compat_shim.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_config.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_config_lint.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_content_fidelity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_content_inspect.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_corpus.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_corpus_health.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_coverage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_coverage_and_drift_config.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_cross_stage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_diagnostics.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_diff.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_discover_cli.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_discovery_parallel.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_drift.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_embedding_contract.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_embedding_drift.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_eval_enrich.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_eval_interop.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_evidence.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_fidelity_precision.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_graph_transport.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_graph_validators.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_grounding.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_grounding_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_grounding_rollup.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_health.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_incremental.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_init_wizard.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_lineage.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_manifest.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_mcp.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_measurement_fixes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_metadata_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_migration.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_models.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_multi_index.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_neptune_bugfixes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_neptune_bugfixes2.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_notifications.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_pipeline.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_profiler.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_providers.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_quality_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_readiness.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_redis_chunks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_registry.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_remediation.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_report_store_section.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_reporting.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_requirements_config.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_retrieval_assertions.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_retrieval_fields.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_retrieval_quality.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_review_hardening.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_run_cli.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_simulate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_source_exclusions.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_source_verification.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_sources.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_storage_validator.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_structure_checks.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_tooling_420.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_universal_concerns.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_utils.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v402_fixes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v410_any_pipeline.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v410_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v410_portability.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v420_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v420_report_truth.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v421_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v430_fidelity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v430_gate.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v430_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v430_tooling.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v431_report.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_fidelity.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_outcomes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_report_drift.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_structure.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_styles.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v440_trends.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_v4_defect_fixes.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_vector_fastpath.py +0 -0
- {compass_kb_validation-4.4.0 → compass_kb_validation-4.5.0}/tests/test_vectorstore_filters.py +0 -0
{compass_kb_validation-4.4.0/compass_kb_validation.egg-info → compass_kb_validation-4.5.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: compass-kb-validation
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.5.0
|
|
4
4
|
Summary: Knowledge-base readiness validation for RAG & AI agents — config-driven, deterministic pipeline integrity checks.
|
|
5
5
|
Author: COMPASS
|
|
6
6
|
License: MIT
|
|
@@ -519,6 +519,37 @@ judged is NOT RUN, never a pass, and the exit code is 0 only on PASS. `--write-e
|
|
|
519
519
|
starter file from a run, to check row by row in the store. The repository's own CI runs a synthetic
|
|
520
520
|
reference KB this way (`tests/acceptance_kb.py`).
|
|
521
521
|
|
|
522
|
+
**Run history and what it says.** Every `discover` and `validate` run is recorded in a SQLite file
|
|
523
|
+
(`trends.db_path`, default `validation_trends.db`; one file holds many projects): the run's document
|
|
524
|
+
outcomes (passed, failed, not checked), step and check totals, wall clock and summed time,
|
|
525
|
+
concurrency, config hash and coverage, COMPASS version, fidelity and tracked-finding counts; each
|
|
526
|
+
document's outcome, step statuses and times, failed and unrun checks, first failure message and
|
|
527
|
+
fidelity verdict; and per check how many documents passed, failed or could not run it. Older
|
|
528
|
+
databases are migrated in place. The report's Historical Trends section, the console and the JSON
|
|
529
|
+
output then say what the history shows: documents newly failing, fixed, still failing, added or
|
|
530
|
+
removed since the previous run; **flaky** documents (outcome flipped between passed and failed at
|
|
531
|
+
least `flaky_min_flips` times across comparable runs; a flip across a config or coverage change is
|
|
532
|
+
never counted); **chronic** documents (failed in every one of at least `chronic_min_runs` runs);
|
|
533
|
+
checks that are new, worse, better or cleared; steps whose time per document is `slower_ratio` times
|
|
534
|
+
their median and `slower_min_seconds` more; and a falling pass rate. Each document to watch has a
|
|
535
|
+
history strip, one cell per run. `compass trends [--project P] [--last N] [--json] [--export
|
|
536
|
+
[FILE]]` prints the same analysis and writes the runs and analysis as JSON (`compass-trends/1`,
|
|
537
|
+
default `.trends/trends.json`, e.g. for a CI cache); `trends.export_path` writes it after every run
|
|
538
|
+
and `trends.keep_runs` prunes old runs. Every threshold is `trends:` YAML; nothing is inferred by a
|
|
539
|
+
model.
|
|
540
|
+
|
|
541
|
+
```yaml
|
|
542
|
+
trends:
|
|
543
|
+
db_path: validation_trends.db
|
|
544
|
+
window: 20 # runs the analysis reads
|
|
545
|
+
flaky_min_flips: 2
|
|
546
|
+
chronic_min_runs: 3
|
|
547
|
+
slower_ratio: 1.5
|
|
548
|
+
slower_min_seconds: 1.0
|
|
549
|
+
keep_runs: 0 # 0 keeps every run
|
|
550
|
+
export_path: "" # e.g. .trends/{project}.json
|
|
551
|
+
```
|
|
552
|
+
|
|
522
553
|
**Several indexes.** `discover` lists other indexes in the same store holding the same sources, and
|
|
523
554
|
`compass drift --project P --index-a A --index-b B` reports, per source document, content present
|
|
524
555
|
in one index and missing from the other, judged line by line with the same presence test
|
|
@@ -677,7 +708,7 @@ check; `--list-checks` shows the defaults.
|
|
|
677
708
|
> Releases are published via [PUBLISHING.md](PUBLISHING.md).
|
|
678
709
|
|
|
679
710
|
Reports are written to `reports/` (HTML dashboard + JSON + JUnit XML). Add
|
|
680
|
-
`--live` to open a real-time progress dashboard, `--trends` to
|
|
711
|
+
`--live` to open a real-time progress dashboard, `--no-trends` to skip recording run history,
|
|
681
712
|
`--parallel` for concurrency.
|
|
682
713
|
|
|
683
714
|
### Try it locally (no cloud needed)
|
|
@@ -713,7 +744,8 @@ compass/
|
|
|
713
744
|
│ ├── corpus.py # Corpus-level KB readiness analysis
|
|
714
745
|
│ ├── live_dashboard.py # FastAPI + SSE real-time dashboard
|
|
715
746
|
│ ├── notifications.py # Slack / Teams webhooks
|
|
716
|
-
│
|
|
747
|
+
│ ├── trend_tracker.py # SQLite historical trends
|
|
748
|
+
│ └── trend_analysis.py # what the run history says (compass trends)
|
|
717
749
|
├── config/{base.yaml, projects/_template.yaml}
|
|
718
750
|
├── test_data/_template.yaml # Documents to validate (live mode)
|
|
719
751
|
├── integration/ # Local Docker integration stack
|
|
@@ -446,6 +446,37 @@ judged is NOT RUN, never a pass, and the exit code is 0 only on PASS. `--write-e
|
|
|
446
446
|
starter file from a run, to check row by row in the store. The repository's own CI runs a synthetic
|
|
447
447
|
reference KB this way (`tests/acceptance_kb.py`).
|
|
448
448
|
|
|
449
|
+
**Run history and what it says.** Every `discover` and `validate` run is recorded in a SQLite file
|
|
450
|
+
(`trends.db_path`, default `validation_trends.db`; one file holds many projects): the run's document
|
|
451
|
+
outcomes (passed, failed, not checked), step and check totals, wall clock and summed time,
|
|
452
|
+
concurrency, config hash and coverage, COMPASS version, fidelity and tracked-finding counts; each
|
|
453
|
+
document's outcome, step statuses and times, failed and unrun checks, first failure message and
|
|
454
|
+
fidelity verdict; and per check how many documents passed, failed or could not run it. Older
|
|
455
|
+
databases are migrated in place. The report's Historical Trends section, the console and the JSON
|
|
456
|
+
output then say what the history shows: documents newly failing, fixed, still failing, added or
|
|
457
|
+
removed since the previous run; **flaky** documents (outcome flipped between passed and failed at
|
|
458
|
+
least `flaky_min_flips` times across comparable runs; a flip across a config or coverage change is
|
|
459
|
+
never counted); **chronic** documents (failed in every one of at least `chronic_min_runs` runs);
|
|
460
|
+
checks that are new, worse, better or cleared; steps whose time per document is `slower_ratio` times
|
|
461
|
+
their median and `slower_min_seconds` more; and a falling pass rate. Each document to watch has a
|
|
462
|
+
history strip, one cell per run. `compass trends [--project P] [--last N] [--json] [--export
|
|
463
|
+
[FILE]]` prints the same analysis and writes the runs and analysis as JSON (`compass-trends/1`,
|
|
464
|
+
default `.trends/trends.json`, e.g. for a CI cache); `trends.export_path` writes it after every run
|
|
465
|
+
and `trends.keep_runs` prunes old runs. Every threshold is `trends:` YAML; nothing is inferred by a
|
|
466
|
+
model.
|
|
467
|
+
|
|
468
|
+
```yaml
|
|
469
|
+
trends:
|
|
470
|
+
db_path: validation_trends.db
|
|
471
|
+
window: 20 # runs the analysis reads
|
|
472
|
+
flaky_min_flips: 2
|
|
473
|
+
chronic_min_runs: 3
|
|
474
|
+
slower_ratio: 1.5
|
|
475
|
+
slower_min_seconds: 1.0
|
|
476
|
+
keep_runs: 0 # 0 keeps every run
|
|
477
|
+
export_path: "" # e.g. .trends/{project}.json
|
|
478
|
+
```
|
|
479
|
+
|
|
449
480
|
**Several indexes.** `discover` lists other indexes in the same store holding the same sources, and
|
|
450
481
|
`compass drift --project P --index-a A --index-b B` reports, per source document, content present
|
|
451
482
|
in one index and missing from the other, judged line by line with the same presence test
|
|
@@ -604,7 +635,7 @@ check; `--list-checks` shows the defaults.
|
|
|
604
635
|
> Releases are published via [PUBLISHING.md](PUBLISHING.md).
|
|
605
636
|
|
|
606
637
|
Reports are written to `reports/` (HTML dashboard + JSON + JUnit XML). Add
|
|
607
|
-
`--live` to open a real-time progress dashboard, `--trends` to
|
|
638
|
+
`--live` to open a real-time progress dashboard, `--no-trends` to skip recording run history,
|
|
608
639
|
`--parallel` for concurrency.
|
|
609
640
|
|
|
610
641
|
### Try it locally (no cloud needed)
|
|
@@ -640,7 +671,8 @@ compass/
|
|
|
640
671
|
│ ├── corpus.py # Corpus-level KB readiness analysis
|
|
641
672
|
│ ├── live_dashboard.py # FastAPI + SSE real-time dashboard
|
|
642
673
|
│ ├── notifications.py # Slack / Teams webhooks
|
|
643
|
-
│
|
|
674
|
+
│ ├── trend_tracker.py # SQLite historical trends
|
|
675
|
+
│ └── trend_analysis.py # what the run history says (compass trends)
|
|
644
676
|
├── config/{base.yaml, projects/_template.yaml}
|
|
645
677
|
├── test_data/_template.yaml # Documents to validate (live mode)
|
|
646
678
|
├── integration/ # Local Docker integration stack
|
|
@@ -2698,6 +2698,65 @@ def _track(findings: list, settings, command: str, args, *, project: str = "",
|
|
|
2698
2698
|
return block
|
|
2699
2699
|
|
|
2700
2700
|
|
|
2701
|
+
def cmd_trends(argv: list[str]) -> int:
|
|
2702
|
+
p = argparse.ArgumentParser(
|
|
2703
|
+
prog="compass trends",
|
|
2704
|
+
description="What a project's run history says: documents newly failing, fixed, flaky "
|
|
2705
|
+
"(outcome flipped across comparable runs) and chronic (failed in every run), "
|
|
2706
|
+
"the checks that fail most, and steps slower than their median. Read from "
|
|
2707
|
+
"the trend database every discover / validate run records (trends.db_path); "
|
|
2708
|
+
"thresholds are trends: YAML. --export writes the runs and the analysis as "
|
|
2709
|
+
"JSON, e.g. for a CI cache.")
|
|
2710
|
+
p.add_argument("--project", default="", help="Project whose runs to read (and whose config)")
|
|
2711
|
+
p.add_argument("--env", default="")
|
|
2712
|
+
p.add_argument("--db", default="", metavar="FILE", help="Trend database (default: trends.db_path)")
|
|
2713
|
+
p.add_argument("--last", type=int, default=0, metavar="N",
|
|
2714
|
+
help="Runs to analyse (default: trends.window)")
|
|
2715
|
+
p.add_argument("--export", nargs="?", const=".trends/trends.json", default="", metavar="FILE",
|
|
2716
|
+
help="Also write the runs and analysis as JSON (default file: .trends/trends.json)")
|
|
2717
|
+
p.add_argument("--json", action="store_true", help="Print the analysis as JSON")
|
|
2718
|
+
args = p.parse_args(argv)
|
|
2719
|
+
|
|
2720
|
+
import json as _json
|
|
2721
|
+
|
|
2722
|
+
from compass.trend_analysis import analyze, export, format_text, policy_from
|
|
2723
|
+
from compass.trend_tracker import load_history
|
|
2724
|
+
|
|
2725
|
+
settings = None
|
|
2726
|
+
if args.project:
|
|
2727
|
+
from compass.config import load_settings
|
|
2728
|
+
|
|
2729
|
+
try:
|
|
2730
|
+
settings = load_settings(project=args.project, env=args.env or None)
|
|
2731
|
+
except Exception as exc: # noqa: BLE001 - clean message, not a traceback
|
|
2732
|
+
print(f" Config error: {exc}", file=sys.stderr)
|
|
2733
|
+
return 2
|
|
2734
|
+
cfg = getattr(settings, "trends", None)
|
|
2735
|
+
db = args.db or getattr(cfg, "db_path", "") or "validation_trends.db"
|
|
2736
|
+
if not Path(db).exists():
|
|
2737
|
+
print(f" No trend database at {db}: run `compass discover` or `compass validate` first, "
|
|
2738
|
+
"or pass --db.", file=sys.stderr)
|
|
2739
|
+
return 2
|
|
2740
|
+
policy = policy_from(settings)
|
|
2741
|
+
if args.last > 0:
|
|
2742
|
+
policy.window = args.last
|
|
2743
|
+
history = load_history(args.project, db_path=db, last_n=policy.window)
|
|
2744
|
+
if history is None:
|
|
2745
|
+
print(f" Cannot read the trend database {db}.", file=sys.stderr)
|
|
2746
|
+
return 2
|
|
2747
|
+
analysis = analyze(history, policy)
|
|
2748
|
+
if args.export:
|
|
2749
|
+
try:
|
|
2750
|
+
path = export(history, analysis, args.export.replace("{project}", args.project or "default"),
|
|
2751
|
+
project=args.project)
|
|
2752
|
+
except OSError as exc:
|
|
2753
|
+
print(f" Cannot write {args.export}: {exc}", file=sys.stderr)
|
|
2754
|
+
return 2
|
|
2755
|
+
print(f" Exported {len(history)} run{'' if len(history) == 1 else 's'} to {path}", file=sys.stderr)
|
|
2756
|
+
print(_json.dumps(analysis, indent=2, default=str) if args.json else format_text(analysis))
|
|
2757
|
+
return 0
|
|
2758
|
+
|
|
2759
|
+
|
|
2701
2760
|
def cmd_acceptance(argv: list[str]) -> int:
|
|
2702
2761
|
p = argparse.ArgumentParser(
|
|
2703
2762
|
prog="compass acceptance",
|
|
@@ -3609,6 +3668,7 @@ Commands:
|
|
|
3609
3668
|
triage stats precision per check over the triage file's labelled findings
|
|
3610
3669
|
triage migrate re-key triage entries written against an earlier release's finding ids
|
|
3611
3670
|
acceptance score a fidelity run against a file of expected results (exact match)
|
|
3671
|
+
trends what the run history says: newly failing, fixed, flaky, chronic, slower steps
|
|
3612
3672
|
lineage trace sampled documents to their source: orphan, stale, broken-ref, no-version
|
|
3613
3673
|
fidelity compare source documents with their stored chunks (text + numbers)
|
|
3614
3674
|
demo generate a sample report from synthetic data (no backend needed)
|
|
@@ -3705,6 +3765,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
3705
3765
|
return cmd_triage(rest)
|
|
3706
3766
|
if cmd == "acceptance":
|
|
3707
3767
|
return cmd_acceptance(rest)
|
|
3768
|
+
if cmd == "trends":
|
|
3769
|
+
return cmd_trends(rest)
|
|
3708
3770
|
if cmd == "freshness":
|
|
3709
3771
|
return cmd_freshness(rest)
|
|
3710
3772
|
if cmd == "selftest":
|
|
@@ -922,6 +922,31 @@ class AcceptanceConfig:
|
|
|
922
922
|
expected_file: str = ""
|
|
923
923
|
|
|
924
924
|
|
|
925
|
+
@dataclass
|
|
926
|
+
class TrendsConfig:
|
|
927
|
+
"""Run history: where it is kept and how ``compass.trend_analysis`` reads it.
|
|
928
|
+
|
|
929
|
+
Every run is recorded in the SQLite file ``db_path`` (one file can hold many projects).
|
|
930
|
+
``window`` is how many recent runs the analysis reads. A document is flaky when its outcome
|
|
931
|
+
flipped between passed and failed at least ``flaky_min_flips`` times across comparable runs
|
|
932
|
+
(same config and coverage), and chronic when it failed in every one of at least
|
|
933
|
+
``chronic_min_runs`` runs. A step is slower when its time per document is at least
|
|
934
|
+
``slower_ratio`` times its median over the window AND at least ``slower_min_seconds`` more.
|
|
935
|
+
``keep_runs`` (0 = keep all) prunes the oldest runs of the project after each run.
|
|
936
|
+
``export_path`` ("" = off) also writes the history and its analysis as JSON after each run,
|
|
937
|
+
e.g. ``.trends/trends.json`` for a CI cache.
|
|
938
|
+
"""
|
|
939
|
+
|
|
940
|
+
db_path: str = "validation_trends.db"
|
|
941
|
+
window: int = 20
|
|
942
|
+
flaky_min_flips: int = 2
|
|
943
|
+
chronic_min_runs: int = 3
|
|
944
|
+
slower_ratio: float = 1.5
|
|
945
|
+
slower_min_seconds: float = 1.0
|
|
946
|
+
keep_runs: int = 0
|
|
947
|
+
export_path: str = ""
|
|
948
|
+
|
|
949
|
+
|
|
925
950
|
@dataclass
|
|
926
951
|
class DriftConfig:
|
|
927
952
|
"""`compass drift`: what makes two environments of one project "the same".
|
|
@@ -1106,6 +1131,7 @@ class Settings:
|
|
|
1106
1131
|
benchmark: BenchmarkConfig = field(default_factory=BenchmarkConfig)
|
|
1107
1132
|
readiness: ReadinessConfig = field(default_factory=ReadinessConfig)
|
|
1108
1133
|
acceptance: AcceptanceConfig = field(default_factory=AcceptanceConfig)
|
|
1134
|
+
trends: TrendsConfig = field(default_factory=TrendsConfig)
|
|
1109
1135
|
corpus: CorpusConfig = field(default_factory=CorpusConfig)
|
|
1110
1136
|
evidence: EvidenceConfig = field(default_factory=EvidenceConfig)
|
|
1111
1137
|
drift: DriftConfig = field(default_factory=DriftConfig)
|
|
@@ -1182,7 +1208,7 @@ _META_KEYS = frozenset({"default_env", "display_name", "environments", "skip_ste
|
|
|
1182
1208
|
_SERVICE_BLOCKS = ("api", "s3", "graphdb", "redis", "neptune", "pipeline",
|
|
1183
1209
|
"retrieval", "discovery", "embedding", "eval", "consistency", "corpus",
|
|
1184
1210
|
"evidence", "benchmark", "readiness", "drift", "lineage", "metadata_checks",
|
|
1185
|
-
"acceptance")
|
|
1211
|
+
"acceptance", "trends")
|
|
1186
1212
|
|
|
1187
1213
|
|
|
1188
1214
|
def _deep_merge(base: dict, overlay: dict) -> dict:
|
|
@@ -1418,6 +1444,7 @@ def load_settings(
|
|
|
1418
1444
|
benchmark=_hydrate(BenchmarkConfig, flat.get("benchmark")),
|
|
1419
1445
|
readiness=_hydrate(ReadinessConfig, flat.get("readiness")),
|
|
1420
1446
|
acceptance=_hydrate(AcceptanceConfig, flat.get("acceptance")),
|
|
1447
|
+
trends=_hydrate(TrendsConfig, flat.get("trends")),
|
|
1421
1448
|
drift=_hydrate(DriftConfig, flat.get("drift")),
|
|
1422
1449
|
lineage=_hydrate(LineageConfig, flat.get("lineage")),
|
|
1423
1450
|
metadata_checks=_hydrate(MetadataChecksConfig, flat.get("metadata_checks")),
|
|
@@ -1534,6 +1561,7 @@ __all__ = [
|
|
|
1534
1561
|
"DriftConfig",
|
|
1535
1562
|
"LineageConfig",
|
|
1536
1563
|
"MetadataChecksConfig",
|
|
1564
|
+
"TrendsConfig",
|
|
1537
1565
|
"Settings",
|
|
1538
1566
|
"ALL_ITEMS",
|
|
1539
1567
|
"SAMPLED_SETTINGS",
|
|
@@ -2588,7 +2588,152 @@ def _trend_time(t: dict) -> str:
|
|
|
2588
2588
|
return f"{ts} UTC" if ts else ""
|
|
2589
2589
|
|
|
2590
2590
|
|
|
2591
|
-
|
|
2591
|
+
_STRIP_CLASS = {"passed": "p", "failed": "f", "not_checked": "n", None: "a"}
|
|
2592
|
+
_STRIP_WORD = {"passed": "passed", "failed": "failed", "not_checked": "not checked",
|
|
2593
|
+
None: "not in this run"}
|
|
2594
|
+
_CHANGE_BAND = {"new": ("NEW", "bad"), "worse": ("WORSE", "bad"), "same": ("STILL FAILING", "warn"),
|
|
2595
|
+
"better": ("BETTER", "ok"), "cleared": ("CLEARED", "ok"),
|
|
2596
|
+
"latest": ("FAILING", "warn"), "earlier": ("EARLIER", "na")}
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
def _strip(outcomes: list, labels: list[str]) -> str:
|
|
2600
|
+
"""One cell per run, oldest to newest: passed, failed, not checked or absent."""
|
|
2601
|
+
cells = []
|
|
2602
|
+
for i, o in enumerate(outcomes):
|
|
2603
|
+
when = labels[i] if i < len(labels) else f"run {i + 1}"
|
|
2604
|
+
cells.append(f'<i class="{_STRIP_CLASS.get(o, "a")}" '
|
|
2605
|
+
f'title="{_esc(when)}: {_STRIP_WORD.get(o, str(o))}"></i>')
|
|
2606
|
+
return f'<span class="ta-strip">{"".join(cells)}</span>'
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
def _spark(values: list, *, w: int = 96, h: int = 20) -> str:
|
|
2610
|
+
"""A tiny line of ``values`` (oldest to newest); None leaves a gap."""
|
|
2611
|
+
known = [v for v in values if v is not None]
|
|
2612
|
+
if len(known) < 2:
|
|
2613
|
+
return ""
|
|
2614
|
+
lo, hi = min(known), max(known)
|
|
2615
|
+
span = (hi - lo) or 1.0
|
|
2616
|
+
step = w / max(len(values) - 1, 1)
|
|
2617
|
+
pts: list[str] = []
|
|
2618
|
+
segs: list[list[str]] = []
|
|
2619
|
+
for i, v in enumerate(values):
|
|
2620
|
+
if v is None:
|
|
2621
|
+
if pts:
|
|
2622
|
+
segs.append(pts)
|
|
2623
|
+
pts = []
|
|
2624
|
+
continue
|
|
2625
|
+
pts.append(f"{i * step:.1f},{h - 2 - (v - lo) / span * (h - 4):.1f}")
|
|
2626
|
+
if pts:
|
|
2627
|
+
segs.append(pts)
|
|
2628
|
+
lines = "".join(f'<polyline points="{" ".join(p)}"/>' for p in segs if len(p) > 1)
|
|
2629
|
+
last = known[-1]
|
|
2630
|
+
lx, ly = (len(values) - 1) * step, h - 2 - (last - lo) / span * (h - 4)
|
|
2631
|
+
return (f'<svg class="ta-spark" width="{w}" height="{h}" viewBox="0 0 {w} {h}" aria-hidden="true">'
|
|
2632
|
+
f'{lines}<circle cx="{lx:.1f}" cy="{ly:.1f}" r="2"/></svg>')
|
|
2633
|
+
|
|
2634
|
+
|
|
2635
|
+
def _trend_analysis_block(a: dict | None) -> str:
|
|
2636
|
+
"""What the history says (compass.trend_analysis): changes, documents, checks, step times."""
|
|
2637
|
+
if not a:
|
|
2638
|
+
return ""
|
|
2639
|
+
ch = a.get("changes") or {}
|
|
2640
|
+
labels = a.get("run_labels") or []
|
|
2641
|
+
pol = a.get("policy") or {}
|
|
2642
|
+
flaky = {r["document"] for r in a.get("flaky", [])}
|
|
2643
|
+
chronic = {r["document"] for r in a.get("chronic", [])}
|
|
2644
|
+
newly = {r["document"] for r in ch.get("newly_failing", [])}
|
|
2645
|
+
fixed = {r["document"] for r in ch.get("fixed", [])}
|
|
2646
|
+
slower = [s for s in a.get("steps", []) if s.get("slower")]
|
|
2647
|
+
since = "since the previous run" if a.get("previous") else "first recorded run"
|
|
2648
|
+
tiles = "".join([
|
|
2649
|
+
_tile("Newly failing", len(ch.get("newly_failing", [])),
|
|
2650
|
+
"bad" if ch.get("newly_failing") else "ok", since),
|
|
2651
|
+
_tile("Fixed", len(ch.get("fixed", [])), "ok" if ch.get("fixed") else "", since),
|
|
2652
|
+
_tile("Flaky", len(a.get("flaky", [])), "warn" if a.get("flaky") else "ok",
|
|
2653
|
+
f"flipped {pol.get('flaky_min_flips', 2)}+ times in comparable runs"),
|
|
2654
|
+
_tile("Chronic", len(a.get("chronic", [])), "bad" if a.get("chronic") else "ok",
|
|
2655
|
+
f"failed in every run ({pol.get('chronic_min_runs', 3)}+)"),
|
|
2656
|
+
_tile("Slower steps", len(slower), "warn" if slower else "ok",
|
|
2657
|
+
f"{pol.get('slower_ratio', 1.5):g}x the step's median"),
|
|
2658
|
+
])
|
|
2659
|
+
insights = "".join(f"<li>{_esc(t)}</li>" for t in a.get("insights", []))
|
|
2660
|
+
parts = [f'<div class="ta-h">What the last {_n(a.get("runs", 0), "run")} say</div>',
|
|
2661
|
+
f'<div class="kpi-grid ta-tiles">{tiles}</div>']
|
|
2662
|
+
if insights:
|
|
2663
|
+
parts.append(f'<ul class="ta-insights">{insights}</ul>')
|
|
2664
|
+
if a.get("legacy_runs"):
|
|
2665
|
+
parts.append(f'<p class="muted">{_n(a["legacy_runs"], "run")} in this window were recorded '
|
|
2666
|
+
'before checks were kept per run: they count for document outcomes and step '
|
|
2667
|
+
'times, not for the check history.</p>')
|
|
2668
|
+
|
|
2669
|
+
if a.get("strips"):
|
|
2670
|
+
band = {"CHRONIC": "bad", "FLAKY": "warn", "NEW FAILURE": "bad", "FIXED": "ok",
|
|
2671
|
+
"NOT CHECKED": "na"}
|
|
2672
|
+
rows = []
|
|
2673
|
+
for s in a["strips"]:
|
|
2674
|
+
d = s["document"]
|
|
2675
|
+
tags = [w for w, on in (("CHRONIC", d in chronic), ("FLAKY", d in flaky),
|
|
2676
|
+
("NEW FAILURE", d in newly and d not in flaky),
|
|
2677
|
+
("FIXED", d in fixed)) if on]
|
|
2678
|
+
if not tags and s["outcomes"] and s["outcomes"][-1] == "not_checked":
|
|
2679
|
+
tags = ["NOT CHECKED"]
|
|
2680
|
+
chips = "".join(f'<span class="status-pill {band[t]}">{t}</span> ' for t in tags)
|
|
2681
|
+
share = s.get("pass_share")
|
|
2682
|
+
share_txt = "" if share is None else f"{round(100 * share)}%"
|
|
2683
|
+
rows.append(
|
|
2684
|
+
f'<tr><td>{_esc(s["file_name"])}</td><td>{_strip(s["outcomes"], labels)}</td>'
|
|
2685
|
+
f'<td>{chips or "—"}</td><td class="score">{share_txt}</td>'
|
|
2686
|
+
f'<td class="score">{s["failed_runs"]}/{s["runs"]}</td>'
|
|
2687
|
+
f'<td class="ta-msg">{_esc(s.get("message") or "")}</td></tr>')
|
|
2688
|
+
parts.append(
|
|
2689
|
+
'<div class="ta-h">Documents to watch <span class="ta-note">oldest to newest: '
|
|
2690
|
+
'green passed, red failed, purple not checked, outline not in that run</span></div>'
|
|
2691
|
+
'<div class="table-wrap"><table class="ta-table"><thead><tr><th>Document</th>'
|
|
2692
|
+
'<th>History</th><th>Pattern</th><th class="num">Passed</th>'
|
|
2693
|
+
'<th class="num">Failed runs</th><th>Latest message</th></tr></thead>'
|
|
2694
|
+
f'<tbody>{"".join(rows)}</tbody></table></div>')
|
|
2695
|
+
|
|
2696
|
+
if a.get("checks"):
|
|
2697
|
+
rows = []
|
|
2698
|
+
for c in a["checks"][:10]:
|
|
2699
|
+
word, cband = _CHANGE_BAND.get(c["change"], ("", "na"))
|
|
2700
|
+
prev = "—" if c.get("previous_failed") is None else c["previous_failed"]
|
|
2701
|
+
docs = ", ".join(c.get("documents") or [])
|
|
2702
|
+
rows.append(
|
|
2703
|
+
f'<tr><td>{_esc(c["label"])}</td><td>{_esc(c["step"])}</td>'
|
|
2704
|
+
f'<td><span class="status-pill {cband}">{word}</span></td>'
|
|
2705
|
+
f'<td class="score {"bad" if c["latest_failed"] else ""}">{c["latest_failed"]}</td>'
|
|
2706
|
+
f'<td class="score">{prev}</td><td class="score">{c["failed_runs"]}/{c["runs"]}</td>'
|
|
2707
|
+
f'<td class="score">{c["streak"]}</td><td class="ta-msg">{_esc(docs)}</td></tr>')
|
|
2708
|
+
parts.append(
|
|
2709
|
+
'<div class="ta-h">Checks that failed <span class="ta-note">documents failing each '
|
|
2710
|
+
'check, this run against the previous one</span></div>'
|
|
2711
|
+
'<div class="table-wrap"><table class="ta-table"><thead><tr><th>Check</th><th>Step</th>'
|
|
2712
|
+
'<th>Change</th><th class="num">Now</th><th class="num">Previous</th>'
|
|
2713
|
+
'<th class="num">Failed runs</th><th class="num">Streak</th><th>Failing now</th>'
|
|
2714
|
+
f'</tr></thead><tbody>{"".join(rows)}</tbody></table></div>')
|
|
2715
|
+
|
|
2716
|
+
if a.get("steps"):
|
|
2717
|
+
def _secs(v):
|
|
2718
|
+
return "—" if v is None else f"{v:.2f}s"
|
|
2719
|
+
rows = []
|
|
2720
|
+
for st in a["steps"]:
|
|
2721
|
+
flag = ' <span class="status-pill warn">SLOWER</span>' if st["slower"] else ""
|
|
2722
|
+
ratio = "—" if st.get("ratio") is None else f'{st["ratio"]:.2f}x'
|
|
2723
|
+
rows.append(
|
|
2724
|
+
f'<tr><td>{_esc(st["step"])}{flag}</td><td>{_spark(st.get("series") or [])}</td>'
|
|
2725
|
+
f'<td class="cost-cell {"warn" if st["slower"] else ""}">{_secs(st["latest"])}</td>'
|
|
2726
|
+
f'<td class="cost-cell">{_secs(st["median"])}</td><td class="score">{ratio}</td></tr>')
|
|
2727
|
+
parts.append(
|
|
2728
|
+
'<div class="ta-h">Step time per document <span class="ta-note">latest run against '
|
|
2729
|
+
'the median of the earlier runs</span></div>'
|
|
2730
|
+
'<div class="table-wrap"><table class="ta-table"><thead><tr><th>Step</th><th>Trend</th>'
|
|
2731
|
+
'<th class="num">Latest</th><th class="num">Median</th><th class="num">Ratio</th>'
|
|
2732
|
+
f'</tr></thead><tbody>{"".join(rows)}</tbody></table></div>')
|
|
2733
|
+
return f'<div class="ta-block">{"".join(parts)}</div>'
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
def _trends_section(trends: list[dict], analysis: dict | None = None) -> str:
|
|
2592
2737
|
if not trends:
|
|
2593
2738
|
return ""
|
|
2594
2739
|
runs = len(trends)
|
|
@@ -2614,7 +2759,9 @@ def _trends_section(trends: list[dict]) -> str:
|
|
|
2614
2759
|
st_pass = t.get("steps_passed", 0)
|
|
2615
2760
|
errs = t.get("errors", 0) # step-level errors
|
|
2616
2761
|
res = "PASSED" if t.get("failed", 0) == 0 and errs == 0 else "FAILED"
|
|
2617
|
-
|
|
2762
|
+
if res == "PASSED" and (t.get("not_checked_documents") or 0) and dpass < tc:
|
|
2763
|
+
res = "NOT CHECKED" # nothing failed, yet not every document was examined
|
|
2764
|
+
rb = {"PASSED": "ok", "NOT CHECKED": "na"}.get(res, "bad")
|
|
2618
2765
|
ts = _trend_time(t)
|
|
2619
2766
|
rid = str(t.get("run_id", "") or "—")
|
|
2620
2767
|
rate = round(100 * dpass / tc) if tc else 0
|
|
@@ -2727,6 +2874,7 @@ def _trends_section(trends: list[dict]) -> str:
|
|
|
2727
2874
|
|
|
2728
2875
|
body = f"""
|
|
2729
2876
|
<div class="kpi-grid" style="grid-template-columns:repeat(4,1fr);margin-bottom:16px">{tiles}</div>
|
|
2877
|
+
{_trend_analysis_block(analysis)}
|
|
2730
2878
|
{charts_block}
|
|
2731
2879
|
<div class="table-card" style="box-shadow:none;border:none"><div class="table-wrap"><table>
|
|
2732
2880
|
<thead><tr><th>Run ID</th><th>Date (UTC)</th><th>Environment</th><th class="num">Documents</th><th class="num">Steps</th><th class="num">Errors</th><th class="num">Pass Rate</th><th class="num">Content loss</th><th class="num">Gating findings</th><th class="num">Not checked</th><th class="num">Duration</th><th>Mode</th><th>Result</th></tr></thead>
|
|
@@ -2738,6 +2886,11 @@ def _trends_section(trends: list[dict]) -> str:
|
|
|
2738
2886
|
line += f" · content loss in the latest run: {_n(int(loss_latest), 'document')}"
|
|
2739
2887
|
else:
|
|
2740
2888
|
line += " · content loss not measured in the latest run"
|
|
2889
|
+
changes = (analysis or {}).get("changes") or {}
|
|
2890
|
+
if changes.get("newly_failing"):
|
|
2891
|
+
line += f" · {_n(len(changes['newly_failing']), 'document')} newly failing"
|
|
2892
|
+
if (analysis or {}).get("flaky"):
|
|
2893
|
+
line += f" · {len((analysis or {})['flaky'])} flaky"
|
|
2741
2894
|
if n_cfg:
|
|
2742
2895
|
line += f" · config changed in {n_cfg} of {runs}"
|
|
2743
2896
|
if n_cov:
|
|
@@ -3229,6 +3382,7 @@ def generate_batch_dashboard(
|
|
|
3229
3382
|
run_id: str = "",
|
|
3230
3383
|
hide_skipped: bool = True,
|
|
3231
3384
|
trends: list[dict] | None = None,
|
|
3385
|
+
trend_analysis: dict | None = None,
|
|
3232
3386
|
corpus: dict | None = None,
|
|
3233
3387
|
mode: str = "",
|
|
3234
3388
|
profile: dict | None = None,
|
|
@@ -3348,7 +3502,7 @@ def generate_batch_dashboard(
|
|
|
3348
3502
|
report_json = json.dumps({"agg": agg, "cases": cases, "evidence": evidence or {},
|
|
3349
3503
|
"catalog": _catalog_used(cases)},
|
|
3350
3504
|
default=str).replace("</", "<\\/")
|
|
3351
|
-
trends_html = _trends_section(trends or [])
|
|
3505
|
+
trends_html = _trends_section(trends or [], trend_analysis)
|
|
3352
3506
|
trends_pill = '<button class="nav-pill" data-section="section-trends" onclick="navScrollTo(\'section-trends\')">Trends</button>' if trends else ""
|
|
3353
3507
|
action_plan_html = _action_plan_section(agg, store)
|
|
3354
3508
|
fidelity_html = _fidelity_section(fidelity, str(store.get("fidelity_html") or ""))
|
|
@@ -634,6 +634,26 @@ body.dark-mode .rca-llm-fix { background:rgba(255,255,255,.03); }
|
|
|
634
634
|
.trend-tab:hover { color:var(--ink); border-color:var(--muted); }
|
|
635
635
|
.trend-tab.active { color:#fff; background:var(--accent); border-color:var(--accent); }
|
|
636
636
|
.trend-chart-wrap { position:relative; height:280px; margin-bottom:18px; }
|
|
637
|
+
/* Trend analysis (compass.trend_analysis): what the history says */
|
|
638
|
+
.ta-block { margin:0 0 18px; }
|
|
639
|
+
.ta-h { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase;
|
|
640
|
+
letter-spacing:.06em; margin:18px 0 8px; }
|
|
641
|
+
.ta-note { text-transform:none; letter-spacing:0; font-weight:400; margin-left:6px; }
|
|
642
|
+
.ta-tiles { grid-template-columns:repeat(5,1fr); margin-bottom:10px; }
|
|
643
|
+
.ta-insights { margin:4px 0 6px; padding:0 0 0 18px; }
|
|
644
|
+
.ta-insights li { font-size:12.5px; line-height:1.55; color:var(--ink); margin:2px 0; }
|
|
645
|
+
.ta-table td { font-size:12.5px; }
|
|
646
|
+
.ta-msg { font-size:12px; color:var(--muted); max-width:420px; }
|
|
647
|
+
.ta-strip { display:inline-flex; gap:2px; vertical-align:middle; }
|
|
648
|
+
.ta-strip i { width:9px; height:16px; border-radius:2px; display:inline-block; }
|
|
649
|
+
.ta-strip i.p { background:var(--ok); }
|
|
650
|
+
.ta-strip i.f { background:var(--bad); }
|
|
651
|
+
.ta-strip i.n { background:#7c3aed; }
|
|
652
|
+
.ta-strip i.a { border:1px dashed var(--line); }
|
|
653
|
+
.ta-spark { vertical-align:middle; }
|
|
654
|
+
.ta-spark polyline { fill:none; stroke:var(--accent); stroke-width:1.5; }
|
|
655
|
+
.ta-spark circle { fill:var(--accent); }
|
|
656
|
+
@media (max-width:900px) { .ta-tiles { grid-template-columns:repeat(2,1fr); } }
|
|
637
657
|
.trends-charts-grid {
|
|
638
658
|
display:grid; grid-template-columns:1fr; gap:16px;
|
|
639
659
|
}
|