Add support for preserving test history and testplan#46
Merged
Conversation
…ation Phase 1 — Binary test history store (NcdbUCIS v2): - history_buckets.py: per-test run records with seed, status, CPU time - test_stats.py: aggregate flake_score, fail_rate, mean_cpu_time - bucket_index.py: O(log n) bucket lookup for history queries - contrib_index.py: unique-bin contribution tracking - squash_log.py: compaction log for history buckets - test_registry.py: test-name to integer-ID registry - ncdb_ucis.py: NcdbUCIS.write_history(), query_test_history(), get_test_stats() - ncdb_reader/writer/merger: v2 schema read/write/merge support - constants.py: HIST_STATUS_OK/FAIL and v2 schema constants Phase 2 — Testplan embedding and closure analysis: - testplan.py: Testplan/Testpoint dataclasses with HJSon support - testplan_hjson.py: parse_testplan_hjson() parser - testplan_closure.py: compute_closure(), stage gate logic, TPStatus enum - waivers.py: WaiverSet for scoped testpoint waivers - ncdb_ucis.py: embed_testplan(), get_testplan(), get_testplan_closure() Phase 3 — Reports, CI/CD exports, CLI subcommands, TUI: - reports.py: 11 typed report functions (P0/P1/P2) with to_json() + format_*() A: report_testpoint_closure E: report_stage_progression B: report_stage_gate F: report_testpoint_reliability C: report_coverage_per_testpoint G: report_unexercised_covergroups D: report_regression_delta I: report_coverage_contribution H: report_test_budget L: report_safety_matrix M: report_seed_reliability - testplan_export.py: export_junit_xml(), export_github_annotations(), export_summary_markdown() for CI/CD pipeline integration - cmd/cmd_history.py: 'pyucis history query/stats' CLI subcommands - cmd/cmd_testplan.py: 'pyucis testplan import/closure/export-junit' subcommands - tui/views/testplan_view.py: view '8' — scrollable testplan closure table - tui/views/test_history_view.py: v2 stats (flake_score, runs, CPU) in detail panel - tui/models/coverage_model.py: get_testplan_closure(), get_v2_test_stats() - help_overlay.py, keybindings.py, controller.py: register testplan view '8' - report/coverage_metrics.py: CoverageMetrics dataclass for TUI model parity Tests (1605 passing): - tests/unit/ncdb/test_reports.py: 61 unit tests (P0/P1/P2 reports) - tests/unit/ncdb/test_testplan_export.py: 27 unit tests (JUnit/GH/markdown) - tests/unit/ncdb/test_testplan.py, test_testplan_closure.py, test_waivers.py, test_testplan_hjson.py, test_history_buckets.py, test_test_stats.py, test_bucket_index.py, test_contrib_index.py, test_squash_log.py, test_test_registry.py: full unit coverage of new modules - tests/integration/test_ci_export.py: 15 integration tests - tests/integration/test_history_workflow.py, test_testplan_workflow.py - tests/test_tui_model_fidelity.py, test_tui_report_parity.py, tests/test_tui_view_data.py: TUI model and view data parity tests Documentation: - doc/source/working-with-coverage/test-history.rst - doc/source/working-with-coverage/testplan.rst - doc/source/working-with-coverage/reports.rst - doc/source/reference/formats/ncdb-format.rst - doc/source/reference/cli.rst, working-with-coverage/index.rst: updated - README.md: v2 feature table, CLI examples, testplan workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- reports.rst: add usage examples and autofunction/autoclass entries for report_test_budget (H), report_safety_matrix (L), report_seed_reliability (M) - exploring-tui.rst: document views 6 (Code Coverage), 7 (Test History with v2 flake stats), and 8 (Testplan closure); update global key table 1-8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.