Skip to content

Coverage improvements, assets. image feature, switch to nextest#40

Merged
mcharytoniuk merged 4 commits into
mainfrom
coverage
Jul 3, 2026
Merged

Coverage improvements, assets. image feature, switch to nextest#40
mcharytoniuk merged 4 commits into
mainfrom
coverage

Conversation

@mcharytoniuk

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 3, 2026 23:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 existing rhai_components tests.
  • Introduced AssetManager::image() and is_image_path(); updated markdown image rendering to resolve internal images via asset_manager.image(...).
  • Switched make coverage to cargo llvm-cov nextest and 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.

Comment thread .config/nextest.toml
@mcharytoniuk mcharytoniuk merged commit e3f2c66 into main Jul 3, 2026
3 checks passed
@mcharytoniuk mcharytoniuk deleted the coverage branch July 3, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants