Skip to content

[Repo Assist] test: add 5 unit tests for OperationComplete and Error message handling (231→236)#174

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/test-operation-messages-2026-05-02-aa0d536e95e0e7e1
Draft

[Repo Assist] test: add 5 unit tests for OperationComplete and Error message handling (231→236)#174
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/test-operation-messages-2026-05-02-aa0d536e95e0e7e1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 2, 2026

🤖 This PR was created by Repo Assist, an automated AI assistant.

What

Adds 5 unit tests covering the OperationComplete and Error message paths in process_messages, which previously had no dedicated test coverage for single-operation scenarios.

Test What it verifies
process_messages_operation_complete_single_op_invalidates_cache detail_cache is evicted when a successful Upgrade completes
process_messages_operation_complete_failure_no_refresh Failed operation sets "failed" status, clears loading, does not set post_refresh_status
process_messages_operation_complete_success_sets_post_refresh_status Successful Pin sets post_refresh_status carrying the operation message
process_messages_operation_complete_unpin_invalidates_cache detail_cache is evicted after Unpin
process_messages_error_clears_loading_and_post_refresh_status Error handler resets both loading and post_refresh_status (existing test only covered detail_loading + status text)

Why

The only OperationComplete test that existed before was for the BatchUpgrade path (multi-select clearing). The five code paths for single operations (Install / Uninstall / Upgrade / Pin / Unpin) were exercised by the code but not covered by tests — a regression in cache-invalidation or refresh-triggering logic would have gone unnoticed.

Test Status

cargo check --all-targets  → clean
cargo fmt -- --check       → clean
cargo clippy -- -D warnings → clean
cargo test                 → 236 passed (was 231) — 5 new tests

Generated by Repo Assist · ● 3.7M ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64

…ng (231→236)

- operation_complete_single_op_invalidates_cache: verifies detail_cache
  is cleared when a successful single operation (Upgrade) completes
- operation_complete_failure_no_refresh: verifies loading stays false and
  post_refresh_status remains None for a failed operation
- operation_complete_success_sets_post_refresh_status: verifies a
  successful Pin sets post_refresh_status with the operation message
- operation_complete_unpin_invalidates_cache: verifies detail_cache is
  cleared after Unpin (parallel to the Upgrade cache test)
- error_clears_loading_and_post_refresh_status: verifies the Error
  handler resets both loading and post_refresh_status (the existing
  test only covered detail_loading and the status string)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants