feat: fixes and tests - #36
Merged
Merged
Conversation
added 30 commits
January 16, 2026 20:55
Added comprehensive tests for: - webfetch.rs: HTML conversion, tool methods, args deserialization - read.rs: file reading, sensitive file detection, similar file suggestions - grep.rs: pattern matching, glob helpers, tool methods - todo.rs: todo stores, status/priority enums, tool methods - glob.rs: build_find_command, tool methods, path handling - bash.rs: tool methods, command execution, background mode - multiedit.rs: fuzzy matching, indentation matching, diff generation - lib.rs: ToolContext methods, ToolOutput, ToolEvent Coverage improvements: - wonopcode-tools: 60.58% -> 90.18% 7 crates now at ≥90% coverage: - wonopcode-auth: 90.06% - wonopcode-protocol: 93.29% - wonopcode-snapshot: 95.40% - wonopcode-storage: 97.81% - wonopcode-test-utils: 90.82% - wonopcode-tools: 90.18% - wonopcode-util: 91.43%
- Added 37 tests to bus.rs (now 99.56% coverage) - Added 25 tests to version.rs (now 98.19% coverage) - Added 28 tests to format.rs (now 94.77% coverage) - Added 19 tests to project.rs (now 96.90% coverage) - Added 29 tests to command.rs (now 98.39% coverage) - Added 25 tests to agent.rs testing AgentMode, AgentPermission, AgentRegistry, custom agents, and sandbox config
- Added 12 tests to server.rs for ServerConfig, ServerState - Added 18 tests to serve.rs for McpToolContext, PendingPermissions, McpServerToolBuilder, and ClosureExecutor
wonopcode-discover: - Added 33 tests for service.rs (ServerInfo, AdvertiseConfig) - Added tests for error.rs (DiscoverError display/debug) - Added tests for advertise.rs (Advertiser state management) - Added tests for browse.rs (Browser, ServerInfo operations) - Coverage improved from 9% to 59% wonopcode-server: - Added 6 tests for state.rs (SharedTodoStore operations) - Added 18 tests for ws.rs (ClientMessage, ServerMessage serde) - Coverage improved from 20% to 32%
Added tests for: - headless.rs: Tests for all request types (PromptRequest, ModelRequest, AgentRequest, SessionSwitchRequest, SessionRenameRequest, SessionForkRequest, RevertRequest, McpToggleRequest, McpReconnectRequest, GotoRequest, SettingsRequest, PermissionRequest, GitUnstageRequest) - prompt.rs: Additional tests for PromptEvent::Status, PromptUsage, new_session_runners, AgentConfig clone, and model info variants (o1, o3-mini, gemini-pro, gpt-4o, claude-opus) - routes.rs: Tests for ApiError helper methods (not_found, bad_request, internal), default_replay_limit, generate_id Test count increased from 147 to 180 tests. Current coverage: - wonopcode-discover: 65.59% - wonopcode-server: ~38% Note: Reaching 90% coverage requires integration tests for HTTP handlers.
- Add tests for AgentConfig, capitalize_provider in agent.rs - Add tests for ProcessorConfig, get_model_info, load_api_key in processor.rs - Add tests for AgentMode, Theme, RenderSettings in theme.rs - Add tests for Event, EventHandler, is_quit, is_escape, etc. in event.rs Coverage improvements: - wonopcode-tui-core: 39.72% → 61.98% - wonopcode-acp: 38.46% → 47.26% - Total: 52.80% → 53.69%
Supports sorting by:
- crate: alphabetical by crate name (default)
- lines: by total lines (descending)
- covered: by covered lines (descending)
- coverage: by coverage percentage (descending)
- status: by status (worst first: 🔴 → 🟠 → 🟡 → ✅)
Usage: just covstats --sort coverage
just covstats --sort=status
just covstats --help
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.