Coverage report: 90%

Files Functions Classes

coverage.py v7.13.2, created at 2026-02-18 11:12 -0600

File function   statements missing excluded   coverage
src / harnessutils / __init__.py (no function)   10 0 0   100%
src / harnessutils / compaction / __init__.py (no function)   2 0 0   100%
src / harnessutils / compaction / pruning.py PruningDecision.to_dict   1 0 0   100%
src / harnessutils / compaction / pruning.py PruningDecision.from_dict   1 0 0   100%
src / harnessutils / compaction / pruning.py PruningDecision.was_pruned   1 0 0   100%
src / harnessutils / compaction / pruning.py PruningDecision.was_protected   1 0 0   100%
src / harnessutils / compaction / pruning.py PruningResult.to_dict   1 0 0   100%
src / harnessutils / compaction / pruning.py PruningResult.__str__   8 0 0   100%
src / harnessutils / compaction / pruning.py PruningResult.get_pruned_decisions   1 1 0   0%
src / harnessutils / compaction / pruning.py PruningResult.get_protected_decisions   1 1 0   0%
src / harnessutils / compaction / pruning.py PruningResult.get_kept_decisions   1 1 0   0%
src / harnessutils / compaction / pruning.py PruningResult.get_decision_by_part   4 1 0   75%
src / harnessutils / compaction / pruning.py OutputImportance.total_score   1 0 0   100%
src / harnessutils / compaction / pruning.py generate_shingles   8 0 0   100%
src / harnessutils / compaction / pruning.py jaccard_similarity   7 1 0   86%
src / harnessutils / compaction / pruning.py compute_content_hash   1 0 0   100%
src / harnessutils / compaction / pruning.py find_duplicate_output   13 0 0   100%
src / harnessutils / compaction / pruning.py calculate_context_tokens   7 0 0   100%
src / harnessutils / compaction / pruning.py calculate_turn_age   7 1 0   86%
src / harnessutils / compaction / pruning.py score_tool_output   15 1 0   93%
src / harnessutils / compaction / pruning.py prune_tool_outputs   10 0 0   100%
src / harnessutils / compaction / pruning.py _prune_simple   43 11 0   74%
src / harnessutils / compaction / pruning.py _prune_with_importance_scoring_only   52 10 0   81%
src / harnessutils / compaction / pruning.py _detect_and_prune_duplicates   41 6 0   85%
src / harnessutils / compaction / pruning.py (no function)   64 0 0   100%
src / harnessutils / compaction / summarization.py _find_last_summary   4 0 0   100%
src / harnessutils / compaction / summarization.py _get_messages_since_summary   8 0 0   100%
src / harnessutils / compaction / summarization.py _build_differential_prompt   4 0 0   100%
src / harnessutils / compaction / summarization.py is_overflow   3 0 0   100%
src / harnessutils / compaction / summarization.py summarize_conversation   35 0 0   100%
src / harnessutils / compaction / summarization.py _convert_to_model_format   34 3 0   91%
src / harnessutils / compaction / summarization.py (no function)   18 0 0   100%
src / harnessutils / compaction / truncation.py detect_content_type   22 0 0   100%
src / harnessutils / compaction / truncation.py _truncate_json   30 15 0   50%
src / harnessutils / compaction / truncation.py _truncate_stacktrace   25 6 0   76%
src / harnessutils / compaction / truncation.py _truncate_logs   37 6 0   84%
src / harnessutils / compaction / truncation.py _truncate_code   20 4 0   80%
src / harnessutils / compaction / truncation.py _truncate_text   13 1 0   92%
src / harnessutils / compaction / truncation.py truncate_output   47 5 0   89%
src / harnessutils / compaction / truncation.py _format_truncated_message   10 3 0   70%
src / harnessutils / compaction / truncation.py (no function)   21 0 0   100%
src / harnessutils / config.py TruncationConfig.validate   13 4 0   69%
src / harnessutils / config.py PruningConfig.validate   13 2 0   85%
src / harnessutils / config.py ModelLimitsConfig.validate   7 2 0   71%
src / harnessutils / config.py SummarizationConfig.validate   5 1 0   80%
src / harnessutils / config.py CompactionConfig.validate   5 1 0   80%
src / harnessutils / config.py HarnessConfig.validate   9 0 0   100%
src / harnessutils / config.py HarnessConfig.from_dict   23 9 0   61%
src / harnessutils / config.py HarnessConfig.from_toml   4 4 0   0%
src / harnessutils / config.py HarnessConfig.from_json   4 4 0   0%
src / harnessutils / config.py (no function)   81 0 0   100%
src / harnessutils / conversion / __init__.py (no function)   2 0 0   100%
src / harnessutils / conversion / to_model.py to_model_messages   20 0 0   100%
src / harnessutils / conversion / to_model.py _convert_user_message   9 0 0   100%
src / harnessutils / conversion / to_model.py _convert_assistant_message   23 0 0   100%
src / harnessutils / conversion / to_model.py (no function)   6 0 0   100%
src / harnessutils / exceptions.py HarnessError.__init__   3 0 0   100%
src / harnessutils / exceptions.py HarnessError._format_error   3 1 0   67%
src / harnessutils / exceptions.py (no function)   9 0 0   100%
src / harnessutils / inspection.py ContextInspector.__init__   4 0 0   100%
src / harnessutils / inspection.py ContextInspector.summary   28 3 0   89%
src / harnessutils / inspection.py ContextInspector.get_pruning_decision   13 5 0   62%
src / harnessutils / inspection.py ContextInspector.predict_impact   41 11 0   73%
src / harnessutils / inspection.py ContextInspector.get_audit_trail   1 0 0   100%
src / harnessutils / inspection.py ContextInspector.get_tool_output_tokens   24 3 0   88%
src / harnessutils / inspection.py (no function)   33 0 0   100%
src / harnessutils / maintenance.py CleanupResult.to_dict   1 0 0   100%
src / harnessutils / maintenance.py ContextIssue.to_dict   1 0 0   100%
src / harnessutils / maintenance.py cleanup_stale_data   34 2 0   94%
src / harnessutils / maintenance.py scan_and_deduplicate   22 3 0   86%
src / harnessutils / maintenance.py detect_context_issues   17 0 0   100%
src / harnessutils / maintenance.py _calculate_redundancy   20 2 0   90%
src / harnessutils / maintenance.py _count_duplicates   16 3 0   81%
src / harnessutils / maintenance.py _calculate_average_age   8 1 0   88%
src / harnessutils / maintenance.py _calculate_information_density   2 0 0   100%
src / harnessutils / maintenance.py _count_errors   17 4 0   76%
src / harnessutils / maintenance.py _calculate_protected_ratio   23 3 0   87%
src / harnessutils / maintenance.py (no function)   35 0 0   100%
src / harnessutils / manager.py ConversationManager.__init__   4 0 0   100%
src / harnessutils / manager.py ConversationManager.create_conversation   7 0 0   100%
src / harnessutils / manager.py ConversationManager.add_message   13 1 0   92%
src / harnessutils / manager.py ConversationManager.get_messages   6 0 0   100%
src / harnessutils / manager.py ConversationManager.query_messages   7 0 0   100%
src / harnessutils / manager.py ConversationManager.get_context_summary   4 0 0   100%
src / harnessutils / manager.py ConversationManager.inspect_context   6 0 0   100%
src / harnessutils / manager.py ConversationManager.prune_before_turn   13 1 0   92%
src / harnessutils / manager.py ConversationManager.predict_overflow   14 0 0   100%
src / harnessutils / manager.py ConversationManager.needs_compaction   3 0 0   100%
src / harnessutils / manager.py ConversationManager.compact   7 1 0   86%
src / harnessutils / manager.py ConversationManager.to_model_format   2 0 0   100%
src / harnessutils / manager.py ConversationManager.calculate_context_usage   3 0 0   100%
src / harnessutils / manager.py ConversationManager.get_tool_output_tokens   26 3 0   88%
src / harnessutils / manager.py ConversationManager.get_context_quality   9 0 0   100%
src / harnessutils / manager.py ConversationManager.track_quality_metric   8 0 0   100%
src / harnessutils / manager.py ConversationManager.get_quality_trend   6 1 0   83%
src / harnessutils / manager.py ConversationManager.truncate_tool_output   5 0 0   100%
src / harnessutils / manager.py ConversationManager.create_snapshot   8 0 0   100%
src / harnessutils / manager.py ConversationManager.create_snapshot._serialize_config   10 0 0   100%
src / harnessutils / manager.py ConversationManager.restore_snapshot   13 0 0   100%
src / harnessutils / manager.py ConversationManager.compare_snapshots   1 0 0   100%
src / harnessutils / manager.py ConversationManager.export_snapshot   1 0 0   100%
src / harnessutils / manager.py ConversationManager.import_snapshot   1 0 0   100%
src / harnessutils / manager.py ConversationManager.cleanup_stale_data   9 0 0   100%
src / harnessutils / manager.py ConversationManager.scan_and_deduplicate   4 0 1   100%
src / harnessutils / manager.py ConversationManager.get_memory   2 0 0   100%
src / harnessutils / manager.py ConversationManager.set_memory   6 2 0   67%
src / harnessutils / manager.py ConversationManager.delete_memory   6 2 0   67%
src / harnessutils / manager.py ConversationManager.list_memory   1 0 0   100%
src / harnessutils / manager.py ConversationManager._load_project_memory   4 0 0   100%
src / harnessutils / manager.py ConversationManager.detect_context_issues   6 0 0   100%
src / harnessutils / manager.py (no function)   47 0 0   100%
src / harnessutils / models / __init__.py (no function)   5 0 0   100%
src / harnessutils / models / conversation.py Conversation.get_velocity   4 0 0   100%
src / harnessutils / models / conversation.py Conversation.update_velocity   5 0 0   100%
src / harnessutils / models / conversation.py Conversation.get_quality_history   5 0 0   100%
src / harnessutils / models / conversation.py Conversation.update_quality_history   6 0 0   100%
src / harnessutils / models / conversation.py Conversation.to_dict   1 0 0   100%
src / harnessutils / models / conversation.py Conversation.from_dict   1 0 0   100%
src / harnessutils / models / conversation.py (no function)   19 0 2   100%
src / harnessutils / models / message.py Message.add_part   1 0 0   100%
src / harnessutils / models / message.py Message.has_partial_output   1 0 0   100%
src / harnessutils / models / message.py Message.to_dict   4 0 0   100%
src / harnessutils / models / message.py Message.from_dict   6 0 0   100%
src / harnessutils / models / message.py (no function)   22 0 0   100%
src / harnessutils / models / parts.py TextPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py ReasoningPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py ToolPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py StepStartPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py StepFinishPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py CompactionPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py PatchPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py SubtaskPart.__post_init__   1 0 0   100%
src / harnessutils / models / parts.py (no function)   64 0 0   100%
src / harnessutils / models / usage.py Usage.total_input   1 0 0   100%
src / harnessutils / models / usage.py Usage.total_output   1 0 0   100%
src / harnessutils / models / usage.py Usage.total   1 0 0   100%
src / harnessutils / models / usage.py (no function)   17 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.avg_growth   3 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.growth_trend   6 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.predict_tokens_ahead   7 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.add_delta   3 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.to_dict   1 0 0   100%
src / harnessutils / models / velocity.py ConversationVelocity.from_dict   1 0 0   100%
src / harnessutils / models / velocity.py (no function)   15 0 0   100%
src / harnessutils / quality.py QualitySnapshot.to_dict   1 0 0   100%
src / harnessutils / quality.py QualitySnapshot.from_dict   1 0 0   100%
src / harnessutils / quality.py QualityHistory.add_snapshot   3 0 0   100%
src / harnessutils / quality.py QualityHistory.get_trend   6 0 0   100%
src / harnessutils / quality.py QualityHistory.to_dict   1 0 0   100%
src / harnessutils / quality.py QualityHistory.from_dict   2 0 0   100%
src / harnessutils / quality.py calculate_information_density   16 3 0   81%
src / harnessutils / quality.py calculate_redundancy_ratio   24 1 0   96%
src / harnessutils / quality.py calculate_staleness_score   18 3 0   83%
src / harnessutils / quality.py calculate_error_preservation_rate   31 6 0   81%
src / harnessutils / quality.py calculate_protected_ratio   22 4 0   82%
src / harnessutils / quality.py calculate_health   7 0 0   100%
src / harnessutils / quality.py generate_recommendations   13 0 0   100%
src / harnessutils / quality.py assess_quality   4 0 0   100%
src / harnessutils / quality.py (no function)   38 0 0   100%
src / harnessutils / query.py MessageFilter.matches   25 6 0   76%
src / harnessutils / query.py MessageFilter._has_errors   12 2 0   83%
src / harnessutils / query.py MessageFilter._has_warnings   8 8 0   0%
src / harnessutils / query.py MessageFilter._get_message_tools   5 0 0   100%
src / harnessutils / query.py query_messages   14 0 0   100%
src / harnessutils / query.py ContextSummary.to_dict   1 0 0   100%
src / harnessutils / query.py build_context_summary   23 0 0   100%
src / harnessutils / query.py (no function)   37 0 0   100%
src / harnessutils / snapshots.py Snapshot.to_dict   1 0 0   100%
src / harnessutils / snapshots.py Snapshot.from_dict   1 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.__init__   2 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.create_snapshot   14 1 0   93%
src / harnessutils / snapshots.py SnapshotManager.get_snapshot   11 7 0   36%
src / harnessutils / snapshots.py SnapshotManager.restore_snapshot   12 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.restore_snapshot._deserialize_part   28 2 0   93%
src / harnessutils / snapshots.py SnapshotManager.compare_snapshots   21 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.export_snapshot   5 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.import_snapshot   5 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.list_snapshots   5 0 0   100%
src / harnessutils / snapshots.py SnapshotManager.delete_snapshot   9 4 0   56%
src / harnessutils / snapshots.py (no function)   36 0 0   100%
src / harnessutils / storage / __init__.py (no function)   3 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.__init__   8 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage._ensure_directories   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.save_conversation   6 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.load_conversation   9 1 0   89%
src / harnessutils / storage / filesystem.py FilesystemStorage.save_message   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.load_message   6 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.list_messages   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.save_part   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.load_part   6 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.list_parts   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.save_truncated_output   3 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.load_truncated_output   5 0 0   100%
src / harnessutils / storage / filesystem.py FilesystemStorage.save_project_memory   4 4 0   0%
src / harnessutils / storage / filesystem.py FilesystemStorage.load_project_memory   6 6 0   0%
src / harnessutils / storage / filesystem.py FilesystemStorage.delete_project_memory   3 3 0   0%
src / harnessutils / storage / filesystem.py FilesystemStorage.cleanup_old_outputs   8 0 0   100%
src / harnessutils / storage / filesystem.py (no function)   22 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.__init__   5 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.save_conversation   1 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.load_conversation   3 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.save_message   3 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.load_message   5 2 0   60%
src / harnessutils / storage / memory.py MemoryStorage.list_messages   3 1 0   67%
src / harnessutils / storage / memory.py MemoryStorage.save_part   3 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.load_part   5 2 0   60%
src / harnessutils / storage / memory.py MemoryStorage.list_parts   3 1 0   67%
src / harnessutils / storage / memory.py MemoryStorage.save_truncated_output   1 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.load_truncated_output   3 1 0   67%
src / harnessutils / storage / memory.py MemoryStorage.save_project_memory   1 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.load_project_memory   1 0 0   100%
src / harnessutils / storage / memory.py MemoryStorage.delete_project_memory   1 1 0   0%
src / harnessutils / storage / memory.py MemoryStorage.cleanup_old_outputs   5 5 0   0%
src / harnessutils / storage / memory.py (no function)   18 0 0   100%
src / harnessutils / tokens / __init__.py (no function)   2 0 0   100%
src / harnessutils / tokens / estimator.py estimate_tokens   1 0 0   100%
src / harnessutils / tokens / estimator.py (no function)   1 0 0   100%
src / harnessutils / tokens / exact.py count_tokens_exact   25 0 0   100%
src / harnessutils / tokens / exact.py get_encoding   3 0 0   100%
src / harnessutils / tokens / exact.py count_tokens_fast   4 0 0   100%
src / harnessutils / tokens / exact.py (no function)   7 0 0   100%
src / harnessutils / turn / __init__.py (no function)   4 0 0   100%
src / harnessutils / turn / hooks.py (no function)   23 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor.__init__   6 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor.process_stream_event   21 1 0   95%
src / harnessutils / turn / processor.py TurnProcessor._handle_start   1 1 0   0%
src / harnessutils / turn / processor.py TurnProcessor._handle_step_start   5 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_text_start   1 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_text_delta   2 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_text_end   5 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_reasoning_start   1 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_reasoning_delta   2 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_reasoning_end   5 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._handle_tool_call   26 7 0   73%
src / harnessutils / turn / processor.py TurnProcessor._handle_step_finish   10 0 0   100%
src / harnessutils / turn / processor.py TurnProcessor._check_doom_loop   10 2 0   80%
src / harnessutils / turn / processor.py (no function)   21 0 0   100%
src / harnessutils / turn / state_machine.py transition_state   13 2 0   85%
src / harnessutils / turn / state_machine.py ToolStateMachine.__init__   1 0 0   100%
src / harnessutils / turn / state_machine.py ToolStateMachine.start_tool   3 0 0   100%
src / harnessutils / turn / state_machine.py ToolStateMachine.complete_tool   3 1 0   67%
src / harnessutils / turn / state_machine.py ToolStateMachine.fail_tool   3 1 0   67%
src / harnessutils / turn / state_machine.py ToolStateMachine.get_state   1 0 0   100%
src / harnessutils / turn / state_machine.py ToolStateMachine.is_terminal   2 0 0   100%
src / harnessutils / turn / state_machine.py (no function)   10 0 0   100%
src / harnessutils / types.py LLMClient.invoke   0 0 1   100%
src / harnessutils / types.py StorageBackend.save_conversation   0 0 1   100%
src / harnessutils / types.py StorageBackend.load_conversation   0 0 1   100%
src / harnessutils / types.py StorageBackend.save_message   0 0 1   100%
src / harnessutils / types.py StorageBackend.load_message   0 0 1   100%
src / harnessutils / types.py StorageBackend.list_messages   0 0 1   100%
src / harnessutils / types.py StorageBackend.save_part   0 0 1   100%
src / harnessutils / types.py StorageBackend.load_part   0 0 1   100%
src / harnessutils / types.py StorageBackend.list_parts   0 0 1   100%
src / harnessutils / types.py StorageBackend.save_truncated_output   0 0 1   100%
src / harnessutils / types.py StorageBackend.load_truncated_output   0 0 1   100%
src / harnessutils / types.py StorageBackend.cleanup_old_outputs   0 0 1   100%
src / harnessutils / types.py StorageBackend.save_project_memory   0 0 1   100%
src / harnessutils / types.py StorageBackend.load_project_memory   0 0 1   100%
src / harnessutils / types.py StorageBackend.delete_project_memory   0 0 1   100%
src / harnessutils / types.py (no function)   20 0 15   100%
src / harnessutils / utils / __init__.py (no function)   2 0 0   100%
src / harnessutils / utils / ids.py generate_id   3 0 0   100%
src / harnessutils / utils / ids.py (no function)   3 0 0   100%
Total     2568 245 33   90%

No items found using the specified filter.