Repository navigation
fix: bound agent metadata previews and preserve removal outcomes - #15
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The bounded scheduling and modal ownership changes are consistent, cancellation-safe, and adequately covered by regression tests.
Pull request overview
Hardens Discover metadata loading and compact removal lifecycle handling.
Changes:
- Bounds metadata previews globally and adds per-item timeouts.
- Preserves removal outcomes while UI completion is queued.
- Adds concurrency, cancellation, timeout, LRU, and ownership tests.
File summaries
| File | Description |
|---|---|
src/SkillView.Core/Ui/SearchAgentMetadataLoader.cs |
Implements bounded, timed metadata loading. |
src/SkillView.Core/Ui/SkillViewApp.cs |
Integrates the loader and captures hidden-dir state. |
src/SkillView.Core/Ui/RemoveConfirmModal.cs |
Blocks shortcuts until UI completion commits. |
tests/SkillView.Tests/Ui/SearchAgentMetadataLoaderTests.cs |
Covers bounds, overlap, timeout, retry, and cancellation. |
tests/SkillView.Tests/Ui/SearchAgentMetadataCacheTests.cs |
Strengthens LRU behavior coverage. |
tests/SkillView.Tests/Ui/RemoveConfirmModalTests.cs |
Covers operation ownership states. |
AGENTS.md |
Records durable scheduling and modal rules. |
agent_docs/ui-lifecycle-and-resource-bounds.md |
Documents lifecycle and resource bounds. |
docs/reviews/adversarial-concurrency-resource-cancellation-audit-2026-08-28.md |
Updates audit remediation status. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
This is the next batch from the concurrency, resource, cancellation, and cross-platform hardening audit. It completes the remaining Discover agent-metadata scheduling work, addresses the final post-merge Copilot finding from PR #14, and closes the audit's weak LRU-test gap.
Why
Agent-filtered Discover searches may inspect up to 200 search results with
gh skill preview. The prior implementation ran those previews sequentially with no per-item deadline. One hung process could consume the entire two-minute search lifetime, while large searches caused excessive latency and process churn.The final review on PR #14 also identified a compact-removal race: the worker task could be complete while its
IApplication.Invokecompletion was still queued. During that interval, Esc/ncould overwrite a successful removal withCancelled, oracould launch the advanced wizard against an already-deleted skill.Changes
Bounded and cancellable metadata loading
SearchAgentMetadataLoaderas the single owner of Discover agent-metadata preview scheduling.Compact-removal completion ownership
nandaremain blocked while a completed worker is waiting for UI commit, preserving the realRemoved/Failedoutcome and preventing a duplicate wizard flow.finishing removal…state during that completion window.Contract and regression coverage
User-facing release notes
ghprocesses.Validation
dotnet build --no-restore— passed; the only warning was the known sandbox denial writing NuGet vulnerability-cache data.dotnet test --no-build— 650 passed, 0 failed, 0 skipped, including the ANSI-driver integration suite.dotnet format SkillView.sln --no-restore --verify-no-changes— passed; workspace loading emitted its existing non-failing warning.--versionsmoke — passed forskillviewandgh-skillview, both reporting Terminal.Gui 2.4.17.0.git diff --check— passed.Review focus
Follow-up audit items intentionally remain separate: install-modal task ownership, root CLI cancellation and post-kill waiting, cross-platform path identity, Esc focus behavior, and the lower-risk stress/streaming remainder.