Coverage improvements, assets. image feature, switch to nextest#40
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR primarily improves test coverage across the poet and rhai_components crates, introduces a dedicated “image asset” resolution path (to disambiguate image outputs from other esbuild outputs), and updates the coverage workflow to run tests via nextest.
Changes:
- Added extensive unit tests throughout
poet(MCP, markdown/MDX evaluation, filesystem, build pipeline, search indexing) and adjusted formatting in existingrhai_componentstests. - Introduced
AssetManager::image()andis_image_path(); updated markdown image rendering to resolve internal images viaasset_manager.image(...). - Switched
make coveragetocargo llvm-cov nextestand added a nextest config.
Reviewed changes
Copilot reviewed 75 out of 76 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rustfmt.toml | Simplifies rustfmt configuration (removes unstable-only options). |
| rust-toolchain.toml | Bumps Rust toolchain channel to 1.95.0. |
| rhai_components/src/rhai_template_renderer.rs | Test formatting adjustments. |
| rhai_components/src/rhai_helpers/error.rs | Test formatting adjustments. |
| rhai_components/src/rhai_helpers/clsx.rs | Test formatting adjustments. |
| rhai_components/src/rhai_call_template_function.rs | Test formatting adjustments. |
| rhai_components/src/escape_html.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/tag_name.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/parse_component.rs | Minor formatting + test assertion formatting. |
| rhai_components/src/component_syntax/mod.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/evaluator_factory.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/eval_tag_stack_node.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/combine_tag_stack.rs | Test formatting adjustments. |
| rhai_components/src/component_syntax/combine_output_symbols.rs | Small formatting + import ordering in tests. |
| rhai_components/src/builds_engine.rs | Test formatting adjustments. |
| poet/src/search_tool.rs | Adds tests for SearchTool behavior with/without an index. |
| poet/src/search_index.rs | Adds search indexing test for body keyword lookup. |
| poet/src/read_esbuild_metafile_or_default.rs | Adds tests for metafile read/parse fallback behavior. |
| poet/src/prompt_document_front_matter/mod.rs | Adds tests for argument mapping and required argument validation. |
| poet/src/prompt_document_controller.rs | Refactors test setup + adds prompt metadata exposure test. |
| poet/src/prompt_document_component_context.rs | Adds tests around role switching, flushing, linking, and chunk handling. |
| poet/src/mdast_to_tantivy_document.rs | Adds tests ensuring correct field routing for indexed content. |
| poet/src/mdast_children_to_heading_id.rs | Adds test for concatenation before slugification. |
| poet/src/mcp/tool_registry.rs | Adds tests for tool registration, calling, and pagination. |
| poet/src/mcp/session.rs | Adds tests for logging behavior and subscriptions/termination. |
| poet/src/mcp/session_manager.rs | Adds tests for session lifecycle and broadcast behavior. |
| poet/src/mcp/resource_reference.rs | Adds tests for URI parsing/validation behavior. |
| poet/src/mcp/resource_list_aggregate.rs | Adjusts test provider behavior + adds aggregate behavior tests. |
| poet/src/mcp/log_level.rs | Adds tests for severity ordering/comparisons. |
| poet/src/mcp/list_resources_cursor/deserialize.rs | Adds tests for cursor decoding and error handling. |
| poet/src/mcp/jsonrpc/role.rs | Adds tests for role parsing and rejection of unknown roles. |
| poet/src/mcp/jsonrpc/response/success/tool_call_result/mod.rs | Adds tests for structured content serialization/deserialization behavior. |
| poet/src/mcp/accepts_all.rs | Adds tests for Accept header handling outcomes. |
| poet/src/mcp_resource_provider_content_documents.rs | Adds tests for listing and reading content document resources. |
| poet/src/lib.rs | Exposes new is_image_path module. |
| poet/src/is_valid_desktop_entry_string.rs | Adds tests for validation behavior. |
| poet/src/is_image_path.rs | New helper to classify image paths via mime guessing. |
| poet/src/generate_sitemap.rs | Adds tests for priority and URL generation behavior. |
| poet/src/flexible_datetime.rs | Adds additional tests for (de)serialization and parsing patterns. |
| poet/src/find_text_content_in_mdast.rs | Adds tests for text extraction across nested/block nodes. |
| poet/src/find_table_of_contents_in_mdast.rs | Adds test coverage for ToC extraction with ids/depth. |
| poet/src/find_front_matter_in_mdast.rs | Adds tests for front matter extraction and absence behavior. |
| poet/src/filesystem/mod.rs | Adds tests for copying files/projects and read failure modes. |
| poet/src/filesystem/file_entry_kind.rs | Adds test for kind classification helpers. |
| poet/src/filesystem_http_route_index.rs | Adds tests for route registration and path lookup behavior. |
| poet/src/eval_prompt_document_mdast.rs | Switches internal image resolution to asset_manager.image() + adds broad rendering tests. |
| poet/src/eval_mdx_element.rs | Adds tests for MDX element rendering and error cases. |
| poet/src/eval_content_document_mdast.rs | Switches internal image resolution to asset_manager.image() + adds broad rendering tests. |
| poet/src/document_error.rs | Adds tests for display formatting and ordering semantics. |
| poet/src/document_error_collection.rs | Adds tests for empty/registration and deterministic display ordering. |
| poet/src/content_document_tree_node.rs | Adds test for deterministic depth-first flatten traversal. |
| poet/src/content_document_reference.rs | Adds tests for basename/path edge cases and identity semantics. |
| poet/src/content_document_linker.rs | Adds tests for id resolution and renderability-aware linking. |
| poet/src/content_document_hierarchy.rs | Adds tests for flattening and prev/next navigation with hidden docs. |
| poet/src/content_document_component_context.rs | Adds mock() for tests + adds tests for collections/ToC/current-page behavior. |
| poet/src/compile_shortcodes.rs | Adds tests for successful shortcode compilation and syntax errors. |
| poet/src/cmd/value_parser/validate_is_directory.rs | Adds tests for directory validation outcomes. |
| poet/src/cmd/value_parser/validate_is_directory_or_create.rs | Adds tests for create-or-validate behavior. |
| poet/src/cmd/value_parser/parse_socket_addr.rs | Adds tests for parsing and resolution behavior. |
| poet/src/cmd/serve/mod.rs | Import ordering tweak. |
| poet/src/build_prompt_document_controller_collection/mod.rs | Adds tests for controller construction and invalid front matter aggregation. |
| poet/src/build_project/mod.rs | Adds extensive build pipeline integration tests (rendering, sitemap, MDX, errors). |
| poet/src/build_project/build_project_result_stub.rs | Adds tests for change detection between builds. |
| poet/src/build_authors.rs | Adds tests for author loading and parse failures. |
| poet/src/author_collection.rs | Adds tests for resolving found/missing authors. |
| poet/src/asset_manager.rs | Adds image() + Rhai binding; adds extensive tests for disambiguation and error cases. |
| poet/src/assert_valid_desktop_entry_string.rs | Adds tests for success and control-character failure. |
| poet/src/app_dir_desktop_entry.rs | Adds tests for parsing required fields, duplicates, rendering. |
| poet/src/anyhow_error_aggregate.rs | Adds tests for aggregate display formatting and empty case. |
| package.json | Updates @intentee/rust-coverage-check devDependency version. |
| package-lock.json | Locks updated @intentee/rust-coverage-check package version. |
| Makefile | Switches coverage to nextest, updates gating thresholds, adds coverage-clean/report targets. |
| .config/nextest.toml | Adds nextest profile configuration. |
| .claude/rules/github-workflows.md | Updates internal workflow guidance text. |
| .claude/rules/github-actions.md | Updates internal action guidance text. |
| .claude/rules/code-coverage.md | Minor formatting update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.