Skip to content

feat: Add channel registration check before searching to prevent erro…#134

Open
Scott McMaster (scottmcmaster) wants to merge 4 commits into
developfrom
scott/dont-search-unreg-channels
Open

feat: Add channel registration check before searching to prevent erro…#134
Scott McMaster (scottmcmaster) wants to merge 4 commits into
developfrom
scott/dont-search-unreg-channels

Conversation

@scottmcmaster
Copy link
Copy Markdown
Contributor

…rs in search_packages

Summary

This is something I noticed running the automated AI eval tests: The agent frequently tries to search both "nixpkgs" and "nixpkgs-unstable" in the same "search packages" tool call. But if any of the requested channels does not exist, search_packages would return an error. Now we'll make sure to only search registered packages by checking first.

Test Plan

Manually, I forced the agent down both search paths.

Docs

  • Docs updated
  • No docs update needed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Warnings
⚠️ Please assign this PR to someone (usually yourself).
Messages
📖 No docs update needed — acknowledged.

📋 PR Overview

Lines changed 52 (+52 / -0)
Files 0 added, 1 modified, 0 deleted
Draft / WIP no
Has Test Plan yes
New UI components no
New Storybook stories no
New Rust modules no
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched no

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 17.3% 17.3% 27.8% 53.0%

Generated by 🚫 dangerJS against 720a41e

Copy link
Copy Markdown

Copilot AI left a comment

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 adds a pre-check to ensure requested Nix channels are registered in the local nix registry before attempting nix search, preventing tool-call failures when an agent requests non-existent channels.

Changes:

  • Added channel_is_registered() that runs nix registry list and checks for a flake:<channel> entry.
  • Updated the channel-search loop to skip channels that are not registered (with a warning log).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
Comment thread apps/native/src-tauri/src/evolve/search_packages.rs Outdated
@github-actions
Copy link
Copy Markdown
Contributor

nixmac Peekaboo E2E: ❌ FAIL

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