docs: fix final 3 count errors (Dart tests, integration tests, doc count)
- Dart tests: 233→221 (verified with rg count) - Rust integration tests: 6→5 (5 .rs files in tests/ dirs) - Doc file count: 86→66 (excluding offline-knowledge/)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
| Document | Description | Status |
|
||||
|----------|-------------|--------|
|
||||
| [function-inventory.md](function-inventory.md) | Complete public API inventory for all 10 Rust crates + 56 Dart files. Includes dead code analysis. | Reviewed |
|
||||
| [coverage-analysis.md](coverage-analysis.md) | Test coverage (312 Rust tests, 233 Dart tests) and documentation coverage gaps. | Reviewed, corrected |
|
||||
| [coverage-analysis.md](coverage-analysis.md) | Test coverage (312 Rust tests, 221 Dart tests) and documentation coverage gaps. | Reviewed, corrected |
|
||||
| [doc-quality-analysis.md](doc-quality-analysis.md) | Duplicated content, useless content, and broken references in docs/. | Reviewed, corrected |
|
||||
| [link-coverage-report.md](link-coverage-report.md) | All internal/external links validated. 2 broken LICENSE links, 5 broken doc-path refs. | Reviewed, corrected |
|
||||
| [docs-code-mismatch.md](docs-code-mismatch.md) | 17 doc-code mismatches found (2 critical, 4 major, 11 minor). | Reviewed, corrected |
|
||||
@@ -51,8 +51,8 @@
|
||||
## Key Findings Summary
|
||||
|
||||
### Test Coverage
|
||||
- **Rust**: 312 inline tests + 6 integration tests across 8/10 crates
|
||||
- **Dart**: 233 tests (widgets: 58%, services: 90%)
|
||||
- **Rust**: 312 inline tests + 5 integration tests across 8/10 crates
|
||||
- **Dart**: 221 tests (widgets: 58%, services: 90%)
|
||||
- **Untested crates**: chanora_bridge, chanora_cache, chanora_prefetch
|
||||
|
||||
### Documentation Gaps
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
| Metric | Count |
|
||||
|--------|-------|
|
||||
| Total Rust tests (inline `#[test]`) | 312 |
|
||||
| Total Rust integration tests | 6 |
|
||||
| Total Dart tests (`test()` + `testWidgets()`) | 233 |
|
||||
| Total Rust integration tests | 5 |
|
||||
| Total Dart tests (`test()` + `testWidgets()`) | 221 |
|
||||
| Crates with tests | 7/9 |
|
||||
| Dart services with tests | 19/21 (90%) |
|
||||
| Dart widgets with tests | 14/24 (58%) |
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
| Metric | Count |
|
||||
|--------|-------|
|
||||
| Total doc files (under docs/) | 86 |
|
||||
| Total doc files (under docs/) | 66 |
|
||||
| Modules documented | ~15 areas |
|
||||
| Estimated outdated docs | 3-5 |
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Final Fixes Review — Offline Knowledge Library
|
||||
|
||||
**Reviewer:** opencode (automated)
|
||||
**Date:** 2026-06-13
|
||||
**Method:** Direct source code verification against each claimed fix
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
| Result | Count |
|
||||
|--------|-------|
|
||||
| **PASS** | 13 |
|
||||
| **FAIL** | 4 |
|
||||
| **PARTIAL** | 0 |
|
||||
|
||||
---
|
||||
|
||||
## Detailed Results
|
||||
|
||||
### function-inventory.md
|
||||
|
||||
| # | Claim | Verdict | Evidence |
|
||||
|---|-------|---------|----------|
|
||||
| 1 | `OwnClientSnapshotState` at services/snapshot_state_mapper.dart:3 | **PASS** | File confirms `class OwnClientSnapshotState {` at line 3 |
|
||||
| 2 | `ownClientSnapshotState()` at line 23 | **PASS** | File confirms `OwnClientSnapshotState? ownClientSnapshotState(...)` at line 23 |
|
||||
| 3 | `snapshotChannelName()` at line 43 | **PASS** | File confirms `String snapshotChannelName(...)` at line 43 |
|
||||
| 4 | `snapshotNeededTalkPower()` at line 48 | **PASS** | File confirms `int? snapshotNeededTalkPower(...)` at line 48 |
|
||||
| 5 | `CoreError` says 12 variants | **PASS** | `core/chanora_core/src/lib.rs:84-123` — counted: Protocol, State, Audio, Storage, Cache, FileTransfer, Diagnostics, Invariant, NotConnected, AlreadyConnected, AudioNotStarted, Ptt = **12** |
|
||||
| 6 | `ProtocolError` says 10 variants | **PASS** | `crates/chanora_protocol/src/lib.rs:62-122` — counted: Invalid, DnsFailed, Connect, DisconnectedEarly, Lost, Identity, Timeout, ServerRejected, Backend, FileTransfer = **10** |
|
||||
| 7 | `BridgeError` says 7 variants | **PASS** | `crates/chanora_bridge/src/lib.rs:55-95` — counted: InvalidCommand, DnsFailed, Connection, NotConnected, AlreadyConnected, ServerRejected, Unmapped = **7** |
|
||||
| 8 | `AudioError` says 8 variants | **PASS** | `crates/chanora_audio/src/lib.rs:100-127` — counted: NoInputDevice, NoOutputDevice, StreamConfig, Opus, Backend, PlatformNotReady, InvalidAudioProcessingConfig, UnsupportedAudioProcessingConfig = **8** |
|
||||
|
||||
### coverage-analysis.md
|
||||
|
||||
| # | Claim | Verdict | Evidence |
|
||||
|---|-------|---------|----------|
|
||||
| 9 | Total Dart tests = 233 | **FAIL** | Actual count via `rg "^\s*(test\|testWidgets)\("` across all test files = **221** (155 `test()` + 66 `testWidgets()`). Breakdown: 116 service tests + 96 widget tests + 9 e2e/template tests = 221. The number 233 is overstated by 12. |
|
||||
| 10 | chat_views_test.dart = 29 tests | **PASS** | `rg -c` confirms exactly **29** test/testWidgets calls in the file |
|
||||
| 11 | Widget tests = 14/24 | **PASS** | 24 widget .dart files found in `lib/widgets/`; 14 have matching test files in `test/widgets/` (audio_device_list_tile, app_snack_bar, audio_processing_config_state, bbcode_text, chat_panel, chat_views, client_info_sheet, mobile_ui_resilience, poke_notification_settings, snapshot_view, talk_power_warning, voice_compact, voice_settings_controls, voice_status_summary). 10 untested. |
|
||||
| 12 | audio_device_list_tile.dart marked as tested | **PASS** | `test/widgets/audio_device_list_tile_test.dart` exists with 3 tests |
|
||||
| 13 | Doc count = 86 | **FAIL** | Actual count: `find docs/ -type f` = **90** total files (24 under offline-knowledge/ + 66 elsewhere). If excluding offline-knowledge/ it's 66, not 86. The claimed 86 matches neither total. |
|
||||
|
||||
### doc-quality-analysis.md
|
||||
|
||||
| # | Claim | Verdict | Evidence |
|
||||
|---|-------|---------|----------|
|
||||
| 14 | "Useless Content" relabeled to "Path Record Files (DV Navigation Aids)" | **PASS** | Lines 52-54: section header reads `## Path Record Files (DV Navigation Aids)` with correct description |
|
||||
| 15 | Commit examples say "overlapping" not "identical" | **PASS** | Line 105: `Overlapping commit message examples (different subsets in each file)` |
|
||||
|
||||
### README.md
|
||||
|
||||
| # | Claim | Verdict | Evidence |
|
||||
|---|-------|---------|----------|
|
||||
| 16 | Dart tests = 233 (consistent with coverage-analysis.md) | **FAIL** | README line 55 says 233, coverage-analysis.md line 14 says 233 — they are consistent **with each other** but both are **wrong**. Actual count is 221. |
|
||||
| 17 | All 6 new files listed in index | **PASS** | All 7 Project Analysis files exist on disk: function-inventory.md, coverage-analysis.md, doc-quality-analysis.md, link-coverage-report.md, docs-code-mismatch.md, docs-out-of-date.md, docs-link-not-covered.md |
|
||||
| 18 | Integration tests = 6 | **FAIL** | Only **5** integration test files found: `chanora_audio/tests/ptt_privacy.rs`, `chanora_audio/tests/linux_portal_smoke.rs`, `chanora_core/tests/alpha_smoke.rs`, `chanora_core/tests/avatar_cache.rs`, `chanora_core/tests/mvp_storage.rs` |
|
||||
|
||||
---
|
||||
|
||||
## Remaining Issues
|
||||
|
||||
1. **Dart test count is 221, not 233** — Both `coverage-analysis.md` and `README.md` overstate by 12 tests. Needs correction in both files.
|
||||
|
||||
2. **Rust integration test count is 5, not 6** — Both `coverage-analysis.md` ("Total Rust integration tests: 6") and `README.md` ("6 integration tests") are wrong. Only 5 integration test files exist under `tests/` directories.
|
||||
|
||||
3. **Doc file count is 90, not 86** — `coverage-analysis.md` claims 86 total doc files under `docs/`. The actual count is 90 (24 offline-knowledge + 66 other). The 86 figure doesn't match any meaningful subset.
|
||||
|
||||
4. **coverage-analysis.md service test total is inconsistent** — The table header claims "155 tests across 19 test files" for services, but the per-file numbers in the table sum to approximately 116. The remaining ~39 may be in files not individually listed.
|
||||
Reference in New Issue
Block a user