From ff73f8ad392ceb66a3cf8765080f851203477997 Mon Sep 17 00:00:00 2001 From: bQUARKz Date: Wed, 14 Oct 2026 10:35:41 +0100 Subject: [PATCH] fix(coverage): restore specialized domain ownership and floors --- .../tests/coverage_domains.rs | 105 +++ ...n-gates-must-be-owned-by-the-repository.md | 42 +- docs/vm-arch/COVERAGE_DOMAINS.md | 62 +- docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json | 638 ++++++++++++++++++ .../config/runtime-edge-coverage-domains.json | 12 +- 5 files changed, 846 insertions(+), 13 deletions(-) create mode 100644 docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json diff --git a/crates/dev/prometeu-quality-checks/tests/coverage_domains.rs b/crates/dev/prometeu-quality-checks/tests/coverage_domains.rs index cf308df..882dd4d 100644 --- a/crates/dev/prometeu-quality-checks/tests/coverage_domains.rs +++ b/crates/dev/prometeu-quality-checks/tests/coverage_domains.rs @@ -114,6 +114,111 @@ fn repository_sources_have_exactly_one_coverage_owner() { ); } +fn repository_policy(script: &str) -> Output { + Command::new("python3") + .arg("-B") + .arg("-c") + .arg(format!( + r#" +import importlib.util +import json +import sys +from pathlib import Path +root = Path(sys.argv[1]) +spec = importlib.util.spec_from_file_location("coverage_auditor", root / "scripts/audit-coverage-domains.py") +auditor = importlib.util.module_from_spec(spec) +spec.loader.exec_module(auditor) +config = json.loads((root / "files/config/runtime-edge-coverage-domains.json").read_text()) +domains = config["domains"] +trees = [ + ("crates/console/prometeu-system/src/services/memcard", "system/fs", "system/core"), + ("crates/console/prometeu-drivers/src/asset", "asset/bank", "drivers/core"), +] +{script} +"# + )) + .arg(repository()) + .output() + .unwrap() +} + +#[test] +fn specialized_entry_files_and_all_descendants_have_the_expected_owner() { + success(repository_policy( + r#" +for stem, expected, residual in trees: + names = [stem + ".rs"] + descendants = sorted((root / stem).rglob("*.rs")) + assert descendants, stem + names += [path.relative_to(root).as_posix() for path in descendants] + names += [stem + "/future.rs", stem + "/future/nested.rs"] + for name in names: + actual = auditor.owners(name, domains) + assert actual == [expected], (name, expected, actual) + # Exclusive residual fallback would pass the generic audit but is wrong. + import copy + fallback = copy.deepcopy(domains) + fallback[expected]["paths"].remove(stem + "/") + fallback[residual]["exclude_paths"].remove(stem + "/") + name = names[-1] + assert auditor.owners(name, fallback) == [residual] + assert auditor.owners(name, fallback) != [expected] + overlap = copy.deepcopy(domains) + overlap[residual]["exclude_paths"].remove(stem + "/") + assert set(auditor.owners(name, overlap)) == {expected, residual} +"#, + )); +} + +#[test] +fn specialized_ownership_survives_absent_and_zero_instrumentation() { + success(repository_policy( + r#" +import tempfile +with tempfile.TemporaryDirectory(prefix="prometeu-domain-trees-") as directory: + fixture = Path(directory) + records = [] + # Use the real map and source layout, with independent synthetic evidence. + for source in (root / "crates").glob("**/src/**/*.rs"): + name = source.relative_to(root).as_posix() + path = fixture / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("// ownership fixture\n") + records.append({"filename": name, "summary": {"lines": {"count": 1, "covered": 1}}}) + for stem, expected, residual in trees: + for suffix in ["future/absent.rs", "future/zero.rs"]: + path = fixture / stem / suffix + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("// no executable lines\n") + records.append({"filename": stem + "/future/zero.rs", "summary": {"lines": {"count": 0, "covered": 0}}}) + config_path = fixture / "config.json" + config_path.write_text(json.dumps(config)) + report_path = fixture / "report.json" + report_path.write_text(json.dumps({"data": [{"files": records}]})) + before = auditor.audit(root, root / "files/config/runtime-edge-coverage-domains.json") + result = auditor.audit(fixture, config_path, report_path) + assert len(result["domains"]) == 15 + assert all(domain["gate_passed"] for domain in result["domains"].values()) + for stem, expected, residual in trees: + domain = result["domains"][expected] + assert domain["source_files"] == before["domains"][expected]["source_files"] + 2 + assert stem + "/future/zero.rs" in domain["files"] + assert stem + "/future/absent.rs" not in domain["files"] + assert result["domains"][residual]["source_files"] == before["domains"][residual]["source_files"] + # Missing residual exclusions must fail even for sources absent from reports. + for stem, expected, residual in trees: + domains[residual]["exclude_paths"].remove(stem + "/") + config_path.write_text(json.dumps(config)) + try: + auditor.audit(fixture, config_path, report_path) + except auditor.AuditError as error: + assert "expected exactly one domain" in str(error), error + else: + raise AssertionError("overlapping module trees passed ownership audit") +"#, + )); +} + #[test] fn exclusions_and_absolute_relative_report_names_have_exclusive_ownership() { let fixture = Fixture::new(); diff --git a/discussion/lessons/DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md b/discussion/lessons/DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md index e710345..6635d9a 100644 --- a/discussion/lessons/DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md +++ b/discussion/lessons/DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md @@ -58,8 +58,33 @@ or symlink aliases while producing plausible percentages. **Trade-offs:** New crates require explicit ownership. Reports with missing domains, duplicate sources or zero instrumented lines are rejected before threshold comparison. -The current source map assigns 232 files to 15 exclusive owners without -changing the original eight domain baselines. +The initial ownership extension assigned 232 files to 15 exclusive owners +without changing the original eight domain baselines. Source counts grow with +the repository; the current evidence records the measured layout. + +### Exclusive ownership must also be the intended ownership + +**What:** +Module entry files and their sibling directories belong to the same specialized +domain. Memcard descendants belong to system/fs; asset-driver descendants +belong to asset/bank. Both residual owners exclude the entry file and the whole +module tree. Regression tests call the production auditor's ownership function +for current and future paths, and audit independent reports containing absent +and zero-line descendants. + +**Why:** +A prefix ending in `.rs` covers the entry file but not the directory created +when a module is split. A residual owner can absorb every new descendant and +still pass a generic exactly-one-owner audit. The resulting percentages look +valid but measure the wrong responsibility. Expected-owner assertions detect +this failure before instrumentation or percentage comparison. + +**Trade-offs:** +Correcting ownership moves the denominator and may reduce a specialized +domain's margin. Preserve reviewed floors and investigate fresh failures with +behavioral evidence. Historical measurements remain useful only when their +original source map and fingerprints remain intact; they should not be +silently rewritten to match the repaired map. ## Patterns and Algorithms @@ -80,6 +105,8 @@ changing the original eight domain baselines. - Allowing an absent or zero-line report to pass a zero baseline. - Assigning the whole VM to the system integration domain, or counting one source in both a specialized owner and its enclosing residual crate owner. +- Treating exactly one owner as proof that a module retained its intended + owner after its implementation moved into sibling source files. - Treating local host measurements as evidence for unexecuted platforms. ## Published Extension and Evidence @@ -97,6 +124,17 @@ Mathematics and its portable MPFR-generated fixture now exercise vm/core; bytecode has its own gate. The standalone MPFR qualification remains separate. This evidence does not claim Linux or Intel Mac coverage execution. +The module-tree ownership correction derives from accepted DEC-0059. Its +[current measured evidence](../../../docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json) +preserves the earlier evidence records and restores system/core to 87.71% +without changing the other 14 floors. The fresh local map has 257 source files +and 15 exclusive domains. All domain gates pass: system/fs measures 78.73%, +system/core 93.69%, asset/bank 90.52% and drivers/core 89.17%. +Ten policy tests cover both generic validity and intended specialized owners. +The existing repository target passes 1,021 tests with 11 ignored; strict +workspace Clippy still reports existing VM diagnostics. Coverage qualification +must not be presented as completed strict workspace qualification. + ## Takeaways - Runtime-edge coverage is safer when CI enforces domain ownership instead of trusting a workspace aggregate. diff --git a/docs/vm-arch/COVERAGE_DOMAINS.md b/docs/vm-arch/COVERAGE_DOMAINS.md index 6a079e6..de37d8d 100644 --- a/docs/vm-arch/COVERAGE_DOMAINS.md +++ b/docs/vm-arch/COVERAGE_DOMAINS.md @@ -28,10 +28,10 @@ LLVM lines still need an owner. | --- | --- | | system/os | OS facades, process and task services | | system/runtime | System-side VM lifecycle, scheduling and render integration | -| system/fs | Runtime filesystem and memcard service | +| system/fs | Runtime filesystem, memcard.rs and the complete memcard/ module tree | | system/programs | Resident system programs | | system/core | Remaining system sources, excluding the four specialized owners | -| asset/bank | Existing asset, cartridge and asset-driver prefixes | +| asset/bank | HAL asset/cartridge prefixes, driver asset.rs and the complete driver asset/ module tree | | firmware | Firmware state and transitions | | host-dependent | Desktop host | | host/headless | Headless host and automation implementation | @@ -43,6 +43,10 @@ LLVM lines still need an owner. | dev/test-support | Shared test-program construction and development infrastructure source stubs | Existing specialized paths retain their original ownership. +Both module entry files and sibling module directories need explicit prefixes. +Memcard and asset-driver descendants, including future nested modules, retain +their specialized owner even when absent from the coverage report or reporting +zero executable lines. The corresponding residual exclusions cover both forms. Residual domains use broad crate source prefixes with explicit exclusions, so a new module inherits the appropriate owner. A new crate or conflicting prefix must be assigned before the ownership audit can pass. @@ -60,6 +64,10 @@ Quality tests remain in prometeu-quality-checks/tests. They enforce the map and drive the auditor/helper with independent source/report fixtures, including omitted/overlapping owners, exclusions, absolute/relative filenames, absent/empty evidence, invalid statistics and percentage regression. +Expected-owner tests use the auditor's ownership function for entry files, +every existing descendant and future nested paths. Synthetic reports also +check absent and zero-line descendants. Exclusive residual fallback is not +sufficient: it can silently transfer specialized code into the wrong gate. The empty quality/layer library stubs inherit infrastructure ownership; they do not create separate gates with zero executable lines. @@ -93,13 +101,16 @@ this percentage is at least baseline_percent. Counts for functions and regions remain supporting evidence. Scenario/contract assertions continue to govern behavior; a percentage does not replace them. -Measured coverage and the acceptance floor are separate values. This explicitly -reviewed revision gives every domain at least 5.00 percentage points of headroom -from the recorded local measurement. Its rule is +Measured coverage and the acceptance floor are separate values. The historical +margin revision gave every domain at least 5.00 percentage points of headroom +from that recorded local measurement. Its rule was `new_floor = min(original_floor, measured_percent - 5.00)`, using the same downward truncation. Floors already providing that margin remain unchanged. Five percentage points means an 88.56% measurement permits an 83.56% floor; it is not a relative five-percent reduction. +That historical margin is not a guarantee about later measurements or corrected +ownership. The current map restores the reviewed system/core floor of 87.71% +and preserves every other floor. Floors remain fixed during CI. A failing run does not automatically lower them. An intentional scope or floor revision requires explicit review with fresh @@ -153,14 +164,14 @@ on macOS/aarch64: These are historical starting floors; current acceptance floors appear below. -## Current local margins +## Historical margin revision The [margin evidence](COVERAGE_DOMAINS_MARGIN.json) records fresh measurements, original and revised floors, toolchain, fingerprints and executed validation. Only domains with less than 5.00 percentage points of headroom were adjusted. The historical evidence above remains unchanged. -| Domain | Measured lines | Original floor | Current floor | Margin (points) | +| Domain | Measured lines | Original floor | Revised floor | Margin (points) | | --- | ---: | ---: | ---: | ---: | | system/os | 82.24% | 77.24% | 77.24% | 5.00 | | system/runtime | 81.19% | 76.50% | 76.19% | 5.00 | @@ -183,6 +194,43 @@ The full local `make ci-domains` validation passed with 939 tests passed and in verification; its final floor uses the lower measurement. All gates were rechecked against the verification report after that final adjustment. +## Current local measurement + +The [current evidence](COVERAGE_DOMAINS_CURRENT.json) records the repaired +module-tree ownership, fixed floors, normalized source paths, actual line +counts and source/config/report fingerprints. Both historical JSON records +above remain unchanged. The measurement uses the implementation working tree +identified by its base HEAD and content fingerprints. + +| Domain | Covered / total lines | Measured lines | Fixed floor | Margin (points) | +| --- | ---: | ---: | ---: | ---: | +| system/os | 1410 / 1711 | 82.40% | 77.24% | 5.16 | +| system/runtime | 2762 / 3309 | 83.46% | 76.19% | 7.27 | +| system/fs | 1944 / 2469 | 78.73% | 76.08% | 2.65 | +| system/programs | 556 / 567 | 98.05% | 93.05% | 5.00 | +| asset/bank | 3096 / 3420 | 90.52% | 86.76% | 3.76 | +| firmware | 1990 / 2314 | 85.99% | 83.20% | 2.79 | +| host-dependent | 1196 / 2059 | 58.08% | 40.05% | 18.03 | +| host/headless | 739 / 855 | 86.43% | 83.39% | 3.04 | +| vm/core | 8308 / 9294 | 89.39% | 84.29% | 5.10 | +| bytecode | 3085 / 3303 | 93.39% | 88.26% | 5.13 | +| hal/core | 2093 / 2369 | 88.34% | 83.56% | 4.78 | +| drivers/core | 2728 / 3059 | 89.17% | 79.51% | 9.66 | +| system/core | 1353 / 1444 | 93.69% | 87.71% | 5.98 | +| tooling | 396 / 612 | 64.70% | 59.75% | 4.95 | +| dev/test-support | 99 / 115 | 86.08% | 80.96% | 5.12 | + +The fresh macOS/aarch64 `make ci-domains` run passed all 15 coverage gates +with 1,021 tests passed and 11 ignored. The 10 focused ownership/evidence +tests and strict package Clippy also passed. No floor reduction or additional +runtime behavior test was needed to pass the repaired map. + +The current Makefile target still uses non-strict workspace Clippy. A separate +`cargo clippy --workspace --all-targets --all-features -- -D warnings` run failed +on existing VM `useless_vec`, `cloned_ref_to_slice_refs` and +`items_after_test_module` diagnostics. This evidence certifies the corrected +coverage map and its gates; full strict workspace qualification remains pending. + Platform-specific compilation and host scenarios can change report totals. Local evidence does not certify an unexecuted Linux or Intel Mac run; evaluate those runs against the configured floors and investigate differences. diff --git a/docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json b/docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json new file mode 100644 index 0000000..21ce064 --- /dev/null +++ b/docs/vm-arch/COVERAGE_DOMAINS_CURRENT.json @@ -0,0 +1,638 @@ +{ + "date": "2026-10-14", + "scope": "Fresh local workspace all-feature default-profile coverage with corrected module-tree ownership; no Linux, Intel Mac or manual device qualification claimed.", + "git_head": "bad942fb25ac622fbb9b1817c37396d87689ddcd", + "workspace_state": "Base HEAD plus the source/config changes identified below; documentation and evidence are published with the implementation commit. This record does not claim its own commit hash.", + "host": "macOS-27.0.1-arm64-arm-64bit-Mach-O", + "rustc": [ + "rustc 1.98.1 (48a229cea 2026-09-01)", + "binary: rustc", + "commit-hash: 48a229ceaefd4985c50990b14116b6d856af0985", + "commit-date: 2026-09-01", + "host: aarch64-apple-darwin", + "release: 1.98.1", + "LLVM version: 22.1.8" + ], + "cargo_llvm_cov": "cargo-llvm-cov 0.8.5", + "source_fingerprint": { + "scope": "All Rust files under crates, including tests/examples/benches", + "files": 298, + "algorithm": "SHA-256 of sorted records: relative path + NUL + file SHA-256 hex + newline", + "sha256": "9fec9c9e76ff53f8b0c581d2069960437ebeecc266b6e1154cd2dbf5752165d3" + }, + "implementation_inputs": { + "crates/dev/prometeu-quality-checks/tests/coverage_domains.rs": "f9a24ca543be1bde9c65694cc82c6b54789ddc3a741a0c8a0c7d69b580565bd3", + "scripts/audit-coverage-domains.py": "187ce1210a553eb042da8c0cdfbb65a4e9dee9a594e0ef35de1e086168349cda", + "scripts/coverage-domain-evidence.sh": "d32b4c033e6191658e3929ef6c6523fc8d176ab2b3f79db083181b6e43faa944", + "Makefile": "fa654f86f1d78f5c6e7916a50c1c82e15a76b28eee0c6ed41da8fa03fbd3db6b", + "Cargo.lock": "cffad9ed62f38a591538abd81dd39270d6022397342c8189f4ac6c7baaa8e795" + }, + "previous_config_sha256": "56e54dfc11d46d93079bb41ca91236534122130dae2c822f136af4450d091bd8", + "config_sha256": "d423d6102d97f232c7fd5076e54e0a9fdb31606eaeff728522df177c10cf3dc3", + "llvm_report_sha256": "d17acafecfd3ee01d73d2f7a8cd2ba0fd703d12854ed1c76fd5e4adf537976fc", + "historical_evidence_sha256": { + "COVERAGE_DOMAINS_EVIDENCE.json": "b56b328f7c01f7325aea88881ccc6e4d343405bfaee1aba02518092fc39ec088", + "COVERAGE_DOMAINS_MARGIN.json": "c10d828e40e1252452028f45ae89a12c3b32a6536a4c3434ce02c3c4711ceb3c" + }, + "automatic_floor_updates": false, + "validation": [ + { + "command": "cargo test -p prometeu-quality-checks --test coverage_domains", + "exit_code": 0, + "tests": { + "passed": 10, + "failed": 0, + "ignored": 0 + }, + "log_sha256": "f005958f336ef7ee6e0befc2fe74660c8cda2378638bcf9a69e299ca920a2b64" + }, + { + "command": "cargo clippy -p prometeu-quality-checks --all-targets --all-features -- -D warnings", + "exit_code": 0, + "log_sha256": "91d6adeffaa9caa861f69631153b3de91efb09d1e186abab0549b4ad327ceea1" + }, + { + "command": "make ci-domains", + "exit_code": 0, + "tests": { + "passed": 1021, + "failed": 0, + "ignored": 11 + }, + "log_sha256": "ec9c1faf5d73ee0d791ed99999fbc9bdc3370f27b99e1edeb8b58258ef4408a4", + "qualification": "Existing repository target: formatting, non-strict workspace Clippy, fresh all-feature coverage and all 15 domain gates. Does not enforce all-target strict lint or ignored manual tests." + }, + { + "command": "python3 scripts/audit-coverage-domains.py", + "exit_code": 0, + "source_files": 257 + }, + { + "command": "python3 scripts/audit-coverage-domains.py --report target/llvm-cov/report.json --json", + "exit_code": 0 + }, + { + "command": "cargo clippy --workspace --all-targets --all-features -- -D warnings", + "exit_code": 101, + "log_sha256": "b52d3c545412b5f850c88874c04c8cbe4c03c6551196db2c17c05628ede70f43", + "diagnostics": [ + { + "path": "crates/console/prometeu-vm/tests/random_contract.rs", + "lint": "useless_vec" + }, + { + "path": "crates/console/prometeu-vm/tests/numeric_contract.rs", + "lint": "cloned_ref_to_slice_refs" + }, + { + "path": "crates/console/prometeu-vm/src/builtins.rs", + "lint": "items_after_test_module" + } + ], + "qualification": "Existing unrelated VM diagnostics; strict workspace acceptance remains pending." + } + ], + "ownership_audit": { + "source_files": 257, + "domains": { + "system/os": { + "source_files": 19, + "report_files": 10, + "files": [ + "crates/console/prometeu-system/src/os/facades/fs.rs", + "crates/console/prometeu-system/src/os/facades/lifecycle.rs", + "crates/console/prometeu-system/src/os/facades/sessions.rs", + "crates/console/prometeu-system/src/os/facades/vm.rs", + "crates/console/prometeu-system/src/os/facades/window.rs", + "crates/console/prometeu-system/src/os/system_os.rs", + "crates/console/prometeu-system/src/services/process/model.rs", + "crates/console/prometeu-system/src/services/process/process_manager.rs", + "crates/console/prometeu-system/src/services/task/model.rs", + "crates/console/prometeu-system/src/services/task/task_manager.rs" + ], + "lines_count": 1711, + "lines_covered": 1410, + "functions": { + "count": 239, + "covered": 184 + }, + "regions": { + "count": 2976, + "covered": 2514 + }, + "baseline_percent": 77.24, + "line_percent": 82.4, + "gate_passed": true + }, + "system/runtime": { + "source_files": 14, + "report_files": 12, + "files": [ + "crates/console/prometeu-system/src/services/vm_runtime/dispatch.rs", + "crates/console/prometeu-system/src/services/vm_runtime/frame_scheduler.rs", + "crates/console/prometeu-system/src/services/vm_runtime/lifecycle.rs", + "crates/console/prometeu-system/src/services/vm_runtime/mod.rs", + "crates/console/prometeu-system/src/services/vm_runtime/render_manager.rs", + "crates/console/prometeu-system/src/services/vm_runtime/render_worker.rs", + "crates/console/prometeu-system/src/services/vm_runtime/render_worker_handoff.rs", + "crates/console/prometeu-system/src/services/vm_runtime/render_worker_test_harness.rs", + "crates/console/prometeu-system/src/services/vm_runtime/tests_asset_bank.rs", + "crates/console/prometeu-system/src/services/vm_runtime/tests_audio.rs", + "crates/console/prometeu-system/src/services/vm_runtime/tests_fs_memcard.rs", + "crates/console/prometeu-system/src/services/vm_runtime/tick.rs" + ], + "lines_count": 3309, + "lines_covered": 2762, + "functions": { + "count": 250, + "covered": 224 + }, + "regions": { + "count": 5722, + "covered": 4655 + }, + "baseline_percent": 76.19, + "line_percent": 83.46, + "gate_passed": true + }, + "system/fs": { + "source_files": 13, + "report_files": 9, + "files": [ + "crates/console/prometeu-system/src/services/fs/fs_backend.rs", + "crates/console/prometeu-system/src/services/fs/fs_error.rs", + "crates/console/prometeu-system/src/services/fs/virtual_fs.rs", + "crates/console/prometeu-system/src/services/memcard.rs", + "crates/console/prometeu-system/src/services/memcard/admission.rs", + "crates/console/prometeu-system/src/services/memcard/guest.rs", + "crates/console/prometeu-system/src/services/memcard/image.rs", + "crates/console/prometeu-system/src/services/memcard/session.rs", + "crates/console/prometeu-system/src/services/memcard/transaction.rs" + ], + "lines_count": 2469, + "lines_covered": 1944, + "functions": { + "count": 249, + "covered": 204 + }, + "regions": { + "count": 4450, + "covered": 3401 + }, + "baseline_percent": 76.08, + "line_percent": 78.73, + "gate_passed": true + }, + "system/programs": { + "source_files": 3, + "report_files": 1, + "files": [ + "crates/console/prometeu-system/src/programs/prometeu_hub/prometeu_hub.rs" + ], + "lines_count": 567, + "lines_covered": 556, + "functions": { + "count": 54, + "covered": 52 + }, + "regions": { + "count": 854, + "covered": 834 + }, + "baseline_percent": 93.05, + "line_percent": 98.05, + "gate_passed": true + }, + "asset/bank": { + "source_files": 6, + "report_files": 6, + "files": [ + "crates/console/prometeu-drivers/src/asset.rs", + "crates/console/prometeu-drivers/src/asset/resumable.rs", + "crates/console/prometeu-hal/src/asset.rs", + "crates/console/prometeu-hal/src/asset_bridge.rs", + "crates/console/prometeu-hal/src/cartridge.rs", + "crates/console/prometeu-hal/src/cartridge_loader.rs" + ], + "lines_count": 3420, + "lines_covered": 3096, + "functions": { + "count": 290, + "covered": 242 + }, + "regions": { + "count": 5621, + "covered": 5104 + }, + "baseline_percent": 86.76, + "line_percent": 90.52, + "gate_passed": true + }, + "firmware": { + "source_files": 16, + "report_files": 11, + "files": [ + "crates/console/prometeu-firmware/src/firmware/firmware.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_confirm_discard.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_crash_screen.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_game_running.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_hub_home.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_launch_hub.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_load_cartridge.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_reset.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_shell_running.rs", + "crates/console/prometeu-firmware/src/firmware/firmware_step_splash_screen.rs", + "crates/console/prometeu-firmware/src/firmware/resident_game_termination.rs" + ], + "lines_count": 2314, + "lines_covered": 1990, + "functions": { + "count": 139, + "covered": 127 + }, + "regions": { + "count": 4255, + "covered": 3791 + }, + "baseline_percent": 83.2, + "line_percent": 85.99, + "gate_passed": true + }, + "host-dependent": { + "source_files": 12, + "report_files": 12, + "files": [ + "crates/host/prometeu-host-desktop-winit/src/audio.rs", + "crates/host/prometeu-host-desktop-winit/src/cap.rs", + "crates/host/prometeu-host-desktop-winit/src/debugger.rs", + "crates/host/prometeu-host-desktop-winit/src/fs_backend.rs", + "crates/host/prometeu-host-desktop-winit/src/input.rs", + "crates/host/prometeu-host-desktop-winit/src/lib.rs", + "crates/host/prometeu-host-desktop-winit/src/log_sink.rs", + "crates/host/prometeu-host-desktop-winit/src/main.rs", + "crates/host/prometeu-host-desktop-winit/src/runner.rs", + "crates/host/prometeu-host-desktop-winit/src/stats.rs", + "crates/host/prometeu-host-desktop-winit/src/utilities.rs", + "crates/host/prometeu-host-desktop-winit/src/wall_clock.rs" + ], + "lines_count": 2059, + "lines_covered": 1196, + "functions": { + "count": 168, + "covered": 101 + }, + "regions": { + "count": 3348, + "covered": 1927 + }, + "baseline_percent": 40.05, + "line_percent": 58.08, + "gate_passed": true + }, + "host/headless": { + "source_files": 6, + "report_files": 3, + "files": [ + "crates/host/prometeu-host-headless/src/automation/mod.rs", + "crates/host/prometeu-host-headless/src/automation/wire.rs", + "crates/host/prometeu-host-headless/src/host.rs" + ], + "lines_count": 855, + "lines_covered": 739, + "functions": { + "count": 93, + "covered": 69 + }, + "regions": { + "count": 1451, + "covered": 1246 + }, + "baseline_percent": 83.39, + "line_percent": 86.43, + "gate_passed": true + }, + "vm/core": { + "source_files": 53, + "report_files": 39, + "files": [ + "crates/console/prometeu-vm/src/builtins.rs", + "crates/console/prometeu-vm/src/catalog.rs", + "crates/console/prometeu-vm/src/heap.rs", + "crates/console/prometeu-vm/src/heap/dynamic_box.rs", + "crates/console/prometeu-vm/src/heap/random.rs", + "crates/console/prometeu-vm/src/input_intrinsics.rs", + "crates/console/prometeu-vm/src/local_addressing.rs", + "crates/console/prometeu-vm/src/math_intrinsics.rs", + "crates/console/prometeu-vm/src/numeric.rs", + "crates/console/prometeu-vm/src/object.rs", + "crates/console/prometeu-vm/src/program_image.rs", + "crates/console/prometeu-vm/src/random.rs", + "crates/console/prometeu-vm/src/random_intrinsics.rs", + "crates/console/prometeu-vm/src/registry_verifier.rs", + "crates/console/prometeu-vm/src/registry_verifier/heights.rs", + "crates/console/prometeu-vm/src/registry_verifier/types.rs", + "crates/console/prometeu-vm/src/resource_budget.rs", + "crates/console/prometeu-vm/src/resource_diagnostics.rs", + "crates/console/prometeu-vm/src/roots.rs", + "crates/console/prometeu-vm/src/string_ledger.rs", + "crates/console/prometeu-vm/src/typed_storage.rs", + "crates/console/prometeu-vm/src/typed_storage/allocation.rs", + "crates/console/prometeu-vm/src/value_contract.rs", + "crates/console/prometeu-vm/src/virtual_machine.rs", + "crates/console/prometeu-vm/src/virtual_machine/callable.rs", + "crates/console/prometeu-vm/src/virtual_machine/collections.rs", + "crates/console/prometeu-vm/src/virtual_machine/control.rs", + "crates/console/prometeu-vm/src/virtual_machine/dynamic.rs", + "crates/console/prometeu-vm/src/virtual_machine/gc.rs", + "crates/console/prometeu-vm/src/virtual_machine/lifecycle.rs", + "crates/console/prometeu-vm/src/virtual_machine/loader.rs", + "crates/console/prometeu-vm/src/virtual_machine/native_arrays.rs", + "crates/console/prometeu-vm/src/virtual_machine/random.rs", + "crates/console/prometeu-vm/src/virtual_machine/reference.rs", + "crates/console/prometeu-vm/src/virtual_machine/runtime.rs", + "crates/console/prometeu-vm/src/virtual_machine/stack.rs", + "crates/console/prometeu-vm/src/virtual_machine/strings.rs", + "crates/console/prometeu-vm/src/virtual_machine/typed.rs", + "crates/console/prometeu-vm/src/vm_init_error.rs" + ], + "lines_count": 9294, + "lines_covered": 8308, + "functions": { + "count": 859, + "covered": 703 + }, + "regions": { + "count": 17715, + "covered": 15732 + }, + "baseline_percent": 84.29, + "line_percent": 89.39, + "gate_passed": true + }, + "bytecode": { + "source_files": 19, + "report_files": 14, + "files": [ + "crates/console/prometeu-bytecode/src/assembler.rs", + "crates/console/prometeu-bytecode/src/decoder.rs", + "crates/console/prometeu-bytecode/src/disassembler.rs", + "crates/console/prometeu-bytecode/src/load_limits.rs", + "crates/console/prometeu-bytecode/src/opcode.rs", + "crates/console/prometeu-bytecode/src/opcode_spec.rs", + "crates/console/prometeu-bytecode/src/program_image.rs", + "crates/console/prometeu-bytecode/src/registry.rs", + "crates/console/prometeu-bytecode/src/registry_codec.rs", + "crates/console/prometeu-bytecode/src/registry_codec/payloads.rs", + "crates/console/prometeu-bytecode/src/registry_codec/writer.rs", + "crates/console/prometeu-bytecode/src/registry_instruction.rs", + "crates/console/prometeu-bytecode/src/resource_failure.rs", + "crates/console/prometeu-bytecode/src/value.rs" + ], + "lines_count": 3303, + "lines_covered": 3085, + "functions": { + "count": 294, + "covered": 241 + }, + "regions": { + "count": 5808, + "covered": 4965 + }, + "baseline_percent": 88.26, + "line_percent": 93.39, + "gate_passed": true + }, + "hal/core": { + "source_files": 59, + "report_files": 27, + "files": [ + "crates/console/prometeu-hal/src/button.rs", + "crates/console/prometeu-hal/src/color.rs", + "crates/console/prometeu-hal/src/debugger_protocol.rs", + "crates/console/prometeu-hal/src/glyph_bank.rs", + "crates/console/prometeu-hal/src/host_context.rs", + "crates/console/prometeu-hal/src/host_return.rs", + "crates/console/prometeu-hal/src/log/log_service.rs", + "crates/console/prometeu-hal/src/memcard.rs", + "crates/console/prometeu-hal/src/native_helpers.rs", + "crates/console/prometeu-hal/src/owned_frame.rs", + "crates/console/prometeu-hal/src/platform.rs", + "crates/console/prometeu-hal/src/render_resources.rs", + "crates/console/prometeu-hal/src/render_submission.rs", + "crates/console/prometeu-hal/src/render_worker.rs", + "crates/console/prometeu-hal/src/sample.rs", + "crates/console/prometeu-hal/src/scene_bank.rs", + "crates/console/prometeu-hal/src/scene_layer.rs", + "crates/console/prometeu-hal/src/scene_viewport_cache.rs", + "crates/console/prometeu-hal/src/scene_viewport_resolver.rs", + "crates/console/prometeu-hal/src/sound_bank.rs", + "crates/console/prometeu-hal/src/syscalls.rs", + "crates/console/prometeu-hal/src/syscalls/domains/mod.rs", + "crates/console/prometeu-hal/src/syscalls/registry.rs", + "crates/console/prometeu-hal/src/syscalls/resolver.rs", + "crates/console/prometeu-hal/src/telemetry.rs", + "crates/console/prometeu-hal/src/tilemap.rs", + "crates/console/prometeu-hal/src/value_snapshot.rs" + ], + "lines_count": 2369, + "lines_covered": 2093, + "functions": { + "count": 264, + "covered": 227 + }, + "regions": { + "count": 3341, + "covered": 3035 + }, + "baseline_percent": 83.56, + "line_percent": 88.34, + "gate_passed": true + }, + "drivers/core": { + "source_files": 13, + "report_files": 12, + "files": [ + "crates/console/prometeu-drivers/src/audio.rs", + "crates/console/prometeu-drivers/src/audio/transport.rs", + "crates/console/prometeu-drivers/src/frame_composer.rs", + "crates/console/prometeu-drivers/src/gfx.rs", + "crates/console/prometeu-drivers/src/hardware.rs", + "crates/console/prometeu-drivers/src/local_render_backend.rs", + "crates/console/prometeu-drivers/src/memcard.rs", + "crates/console/prometeu-drivers/src/memory_banks.rs", + "crates/console/prometeu-drivers/src/pad.rs", + "crates/console/prometeu-drivers/src/test_platform.rs", + "crates/console/prometeu-drivers/src/touch.rs", + "crates/console/prometeu-drivers/src/wall_clock.rs" + ], + "lines_count": 3059, + "lines_covered": 2728, + "functions": { + "count": 343, + "covered": 303 + }, + "regions": { + "count": 4676, + "covered": 4044 + }, + "baseline_percent": 79.51, + "line_percent": 89.17, + "gate_passed": true + }, + "system/core": { + "source_files": 12, + "report_files": 7, + "files": [ + "crates/console/prometeu-system/src/crash_report.rs", + "crates/console/prometeu-system/src/crash_report/init_diagnostic.rs", + "crates/console/prometeu-system/src/services/async_work.rs", + "crates/console/prometeu-system/src/services/foreground.rs", + "crates/console/prometeu-system/src/services/game_library.rs", + "crates/console/prometeu-system/src/services/vm_session.rs", + "crates/console/prometeu-system/src/services/windows/window_manager.rs" + ], + "lines_count": 1444, + "lines_covered": 1353, + "functions": { + "count": 171, + "covered": 163 + }, + "regions": { + "count": 2318, + "covered": 2184 + }, + "baseline_percent": 87.71, + "line_percent": 93.69, + "gate_passed": true + }, + "tooling": { + "source_files": 8, + "report_files": 8, + "files": [ + "crates/tools/pbxgen-dummy-boy/src/lib.rs", + "crates/tools/pbxgen-dummy-boy/src/main.rs", + "crates/tools/pbxgen-stress/src/lib.rs", + "crates/tools/pbxgen-stress/src/main.rs", + "crates/tools/prometeu-cli/src/bin/prometeu-headless.rs", + "crates/tools/prometeu-cli/src/bin/prometeu-runtime.rs", + "crates/tools/prometeu-cli/src/lib.rs", + "crates/tools/prometeu-cli/src/main.rs" + ], + "lines_count": 612, + "lines_covered": 396, + "functions": { + "count": 41, + "covered": 31 + }, + "regions": { + "count": 947, + "covered": 621 + }, + "baseline_percent": 59.75, + "line_percent": 64.7, + "gate_passed": true + }, + "dev/test-support": { + "source_files": 4, + "report_files": 2, + "files": [ + "crates/dev/prometeu-test-support/src/lib.rs", + "crates/dev/prometeu-test-support/src/program.rs" + ], + "lines_count": 115, + "lines_covered": 99, + "functions": { + "count": 17, + "covered": 13 + }, + "regions": { + "count": 131, + "covered": 112 + }, + "baseline_percent": 80.96, + "line_percent": 86.08, + "gate_passed": true + } + } + }, + "same_report_before_ownership_repair": { + "system/fs": { + "source_files": 7, + "report_files": 4, + "lines_count": 192, + "lines_covered": 156, + "functions": { + "count": 36, + "covered": 28 + }, + "regions": { + "count": 401, + "covered": 331 + }, + "baseline_percent": 76.08, + "line_percent": 81.25, + "gate_passed": true + }, + "asset/bank": { + "source_files": 5, + "report_files": 5, + "lines_count": 2971, + "lines_covered": 2706, + "functions": { + "count": 262, + "covered": 222 + }, + "regions": { + "count": 4867, + "covered": 4450 + }, + "baseline_percent": 86.76, + "line_percent": 91.08, + "gate_passed": true + }, + "drivers/core": { + "source_files": 14, + "report_files": 13, + "lines_count": 3508, + "lines_covered": 3118, + "functions": { + "count": 371, + "covered": 323 + }, + "regions": { + "count": 5430, + "covered": 4698 + }, + "baseline_percent": 79.51, + "line_percent": 88.88, + "gate_passed": true + }, + "system/core": { + "source_files": 18, + "report_files": 12, + "lines_count": 3721, + "lines_covered": 3141, + "functions": { + "count": 384, + "covered": 339 + }, + "regions": { + "count": 6367, + "covered": 5254 + }, + "baseline_percent": 80.0, + "line_percent": 84.41, + "gate_passed": true + } + }, + "historical_projection": { + "source_head": "e0e01ed1de6c0b62ddeb3233a67c689d6d1a0efc", + "qualification": "Projection recorded by the earlier review, not the fresh completion measurement.", + "line_percent": { + "system/fs": 77.24, + "system/core": 93.69, + "asset/bank": 90.52, + "drivers/core": 89.17 + } + } +} diff --git a/files/config/runtime-edge-coverage-domains.json b/files/config/runtime-edge-coverage-domains.json index 97afb51..b1a3b9d 100644 --- a/files/config/runtime-edge-coverage-domains.json +++ b/files/config/runtime-edge-coverage-domains.json @@ -19,7 +19,8 @@ "baseline_percent": 76.08, "paths": [ "crates/console/prometeu-system/src/services/fs/", - "crates/console/prometeu-system/src/services/memcard.rs" + "crates/console/prometeu-system/src/services/memcard.rs", + "crates/console/prometeu-system/src/services/memcard/" ] }, "system/programs": { @@ -36,7 +37,8 @@ "crates/console/prometeu-hal/src/asset_bridge.rs", "crates/console/prometeu-hal/src/cartridge.rs", "crates/console/prometeu-hal/src/cartridge_loader.rs", - "crates/console/prometeu-drivers/src/asset.rs" + "crates/console/prometeu-drivers/src/asset.rs", + "crates/console/prometeu-drivers/src/asset/" ] }, "firmware": { @@ -88,11 +90,12 @@ "crates/console/prometeu-drivers/src/" ], "exclude_paths": [ - "crates/console/prometeu-drivers/src/asset.rs" + "crates/console/prometeu-drivers/src/asset.rs", + "crates/console/prometeu-drivers/src/asset/" ] }, "system/core": { - "baseline_percent": 80.0, + "baseline_percent": 87.71, "paths": [ "crates/console/prometeu-system/src/" ], @@ -103,6 +106,7 @@ "crates/console/prometeu-system/src/services/vm_runtime", "crates/console/prometeu-system/src/services/fs/", "crates/console/prometeu-system/src/services/memcard.rs", + "crates/console/prometeu-system/src/services/memcard/", "crates/console/prometeu-system/src/programs/" ] },