Skip to content

fix: restore confidence and riskLevel variables broken by refactoring#43

Closed
Copilot wants to merge 3 commits intofeat/cli-all-toolsfrom
copilot/sub-pr-42
Closed

fix: restore confidence and riskLevel variables broken by refactoring#43
Copilot wants to merge 3 commits intofeat/cli-all-toolsfrom
copilot/sub-pr-42

Conversation

Copy link

Copilot AI commented Feb 21, 2026

What / Why

Commits 15fb852 and 1676134 introduced bugs in search-codebase.ts that broke preflight decision card logic:

  • Commented-out confidence calculation (line 537) - still used in editPreflight object, causing undefined reference
  • Renamed riskLevel to _riskLevel (line 501) - underscore prefix indicated unused, but variable is consumed by decision card output

Both variables are required for search intent="edit|refactor|migrate" workflows.

Changes:

  • Restored const confidence = computeIndexConfidence()
  • Restored let riskLevel: 'low' | 'medium' | 'high' = 'low' and its assignments

Note: 7 test failures are pre-existing (confirmed at commit de93ae8, before CLI implementation). Root cause: indexer returns 0 chunks in test environment due to huggingface.co network issues. Unrelated to this fix.

Release notes

This should appear in release notes as a bug fix for the CLI feature.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 21, 2026 17:22
…mmits

Co-authored-by: PatrickSys <74001504+PatrickSys@users.noreply.github.com>
Reverts problematic refactoring from commits 15fb852 and 1676134:
- Uncommented confidence calculation (was breaking editPreflight)
- Renamed _riskLevel back to riskLevel (variable was unused)

Note: 7 test failures are pre-existing (confirmed at commit de93ae8)

Co-authored-by: PatrickSys <74001504+PatrickSys@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 21, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • huggingface.co
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/codebase-context/codebase-context/node_modules/.pnpm/vitest@4.0.16_@types&#43;node@20.19.25_tsx@4.21.0/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/codebase-context/codebase-context/node_modules/.pnpm/vitest@4.0.16_@types&#43;node@20.19.25_tsx@4.21.0/node_modules/vitest/dist/workers/forks.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add CLI commands for all MCP tools fix: restore confidence and riskLevel variables broken by refactoring Feb 21, 2026
Copilot AI requested a review from PatrickSys February 21, 2026 17:26
@PatrickSys PatrickSys closed this Feb 21, 2026
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