Skip to content

fix(skill-nudge): log swallowed errors in debug mode#284

Open
yuhaouno wants to merge 1 commit into
TestSprite:mainfrom
yuhaouno:fix/debug-skill-nudge-errors
Open

fix(skill-nudge): log swallowed errors in debug mode#284
yuhaouno wants to merge 1 commit into
TestSprite:mainfrom
yuhaouno:fix/debug-skill-nudge-errors

Conversation

@yuhaouno

@yuhaouno yuhaouno commented Jul 25, 2026

Copy link
Copy Markdown

Adds debug-only stderr diagnostics for failed profile lookups and unreadable managed skill targets, while preserving default output and exit status. Wires the parsed global --debug flag into the pre-action nudge. This is the narrow skill-nudge subtask of #186. Verified with full tests, lint, typecheck, and format:check. Closes #285.

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

✅ This PR is linked to an issue assigned to @yuhaouno — thanks! The needs-issue label has been removed.

@github-actions github-actions Bot added the needs-issue PR not linked to an issue yet — please open one first and claim it (see CONTRIBUTING) label Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Changes

Skill nudge debug diagnostics

Layer / File(s) Summary
Managed target read diagnostics
src/lib/skill-nudge.ts
The skill presence probe reports managed target read failures through an optional, failure-isolated callback.
Debug propagation and validation
src/lib/skill-nudge.ts, src/index.ts, src/lib/skill-nudge.test.ts
The CLI forwards --debug, nudge handling emits debug messages for swallowed errors, and tests cover debug-enabled and disabled output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI as preAction hook
  participant Nudge as maybeEmitSkillNudge
  participant Probe as isVerifySkillInstalled
  participant Output as write sink
  CLI->>Nudge: pass debug option
  Nudge->>Probe: check skill presence with onReadError
  Probe->>Nudge: report managed target read failure
  Nudge->>Output: emit debug diagnostic
  Nudge->>Output: emit existing skill warning
Loading

Suggested reviewers: ruili-testsprite, zeshi-du

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: debug-mode logging for swallowed skill-nudge errors.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot removed the needs-issue PR not linked to an issue yet — please open one first and claim it (see CONTRIBUTING) label Jul 25, 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.

[Hackathon] Debug diagnostics for suppressed skill-nudge errors

1 participant