Repository navigation
fix: suppress false positive shell integration warning for wrapper files - #1736
Conversation
The "Install tend CI plugin" shell step installed plugins into a standalone Claude CLI instance, but claude-code-action creates its own settings file on startup — so the plugins were invisible to the actual Claude session. The prompt `/tend-ci-runner:review` resolved to "Unknown skill" with zero tokens used and no review posted. Replace the shell step with claude-code-action's `plugin_marketplaces` and `plugins` inputs so plugins are installed in the correct context. Fixes max-sixty/worktrunk#1736 Co-Authored-By: Claude <[email protected]>
The generated workflows referenced skills as `/tend:tend-*` (e.g., `/tend:tend-review`), but the plugin is named `tend-ci-runner` and the skills are `review`, `triage`, etc. The correct format is `/tend-ci-runner:review`. This caused the silent review failure on #1736 — Claude resolved the skill client-side, found nothing, and returned "Unknown skill" with zero tokens. The CI check showed green because the process exited cleanly. The root cause is the published `uvx tend` generator (v0.0.2) still uses the old naming convention. A new release of the generator will fix it for future `uvx tend init` runs; this PR fixes the existing generated files. > _This was written by Claude Code on behalf of @max-sixty_ Co-authored-by: Claude <[email protected]>
|
@worktrunk-bot /tend-ci-runner:review 1736 |
|
thanks @saschabratton . it does sound like our existing code had a problem one concern is that the only tests that we have seem to revert the useful warnings. @worktrunk-bot do you think you could
and
|
Add explanatory doc comments to the fish/nushell outdated wrapper tests clarifying why the "not detected as integration" warning is correctly absent (wrapper files ARE the integration, already recognized by scan_shell_configs). Add test_config_show_unmatched_candidate_not_suppressed_by_wrapper to verify both behaviors in a single run: bash alias triggers the warning while the fish wrapper file is correctly suppressed. Fix the unmatched_summary URL builder to apply the same confirmed_paths filter, preventing wrapper file lines from leaking into the report URL. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Investigated and pushed changes. Here's what I found: Were the old tests asserting good behavior? No — the old snapshots included a false positive. When a Fish/Nushell wrapper file exists (even outdated), the system already shows the correct "Outdated shell extension" warning with actionable advice ( Changes I made:
|
CI failed — snapshot formatting guard violation
Same phase-boundary pattern as the existing unmatched_candidate_warning snapshot — blank line separates "Shell integration not active" diagnostic from per-shell status section. Co-Authored-By: Claude Opus 4.6 <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
CI is failing: test_no_blank_line_before_hint_in_snapshots rejects the new snapshot because it has a blank line before a ↳ hint.
This is the same pattern as the two existing allowlisted snapshots — the blank line separates the "Shell integration not active" diagnostic from the per-shell status section. The ↳ is a status item (bash: Not configured), not a detached hint.
Fix: Add the new snapshot to BLANK_BEFORE_HINT_ALLOWED in tests/integration_tests/snapshot_formatting_guard.rs:
const BLANK_BEFORE_HINT_ALLOWED: &[&str] = &[
// config show: blank line separates "Shell integration not active" diagnostic
// from per-shell status section. The `↳` here is a status item, not a hint.
"config_show__config_show_partial_shell_config_shows_hint",
"config_show__config_show_unmatched_candidate_warning",
// Same pattern: blank line between "Shell integration not active" and per-shell status
"config_show__config_show_unmatched_candidate_not_suppressed_by_wrapper",
];The code changes themselves look correct — the confirmed_paths filter logic is sound, the secondary fix for the URL builder is consistent, and the new test covers the important property (path-specific suppression).
|
@worktrunk-bot please can you give some simple examples of where we hit this false positive if possible include those in tests but at least explain here |
|
Here are the concrete false positive scenarios this PR fixes: Scenario 1: Fish wrapper (outdated)User has function wt
command wt $argv
end
But then the separate detection scan finds
That second warning is wrong — the file was already recognized. It asks users to report a bug that doesn't exist. Scenario 2: Nushell wrapper (outdated)Same pattern. def --wrapped wt [...args] {
# ...
}Again, What the fix doesBefore emitting unmatched candidate warnings, the PR collects paths that The new |
|
excellent, thank you! would there be a simpler way to design this? I worry a bit about the shell |
Replaces five `matches!(r.shell, Shell::Fish | Shell::Nushell)` checks with a single method, so adding a new wrapper-based shell only requires updating one place. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Good call — I pushed a refactor that adds |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
thanks @max-sixty! |
Problem:
wt config showemitted a false positive "Found wt in ... but not detected as integration" warning for Nushell (and Fish) wrapper files. These files ARE the integration (they contain the shell function definition), not config files that source it, sois_shell_integration_line()correctly doesn't match their contents, but the warning logic didn't account for this.Fix: Before emitting unmatched candidate warnings, collect paths already confirmed as integration files by
scan_shell_configs. For Fish/Nushell (standalone wrapper files), any action means the file was recognized. For eval-based shells (Bash/Zsh), onlyAlreadyExistscounts. Skip those paths when checking for unmatched candidates.Fixes #1735