Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe skill-nudge pre-action now receives the global ChangesSkill-nudge handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Low Sequence Diagram(s)sequenceDiagram
participant PreActionHook
participant maybeEmitSkillNudge
participant detectCallerFromEnv
participant isVerifySkillInstalled
participant stderr
PreActionHook->>maybeEmitSkillNudge: pass debug setting
maybeEmitSkillNudge->>detectCallerFromEnv: detect calling agents
detectCallerFromEnv-->>maybeEmitSkillNudge: return callers
maybeEmitSkillNudge->>isVerifySkillInstalled: check each caller target
isVerifySkillInstalled-->>maybeEmitSkillNudge: return presence or report read error
maybeEmitSkillNudge->>stderr: write warning or debug diagnostic
Merge Risk: ⚪ Minimal · up to Debug diagnostics remain isolated from normal command output and do not interrupt execution; no merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Out of Scope Changes checkExplanation The change also adds per-caller skill detection through
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
6208369 to
828c2e3
Compare
828c2e3 to
c2d5656
Compare
|
Sorry — this has been open 26 days with no human reply, and on top of that your CI had never actually run. Fork PRs here sit at On the substance: I'm happy with this and intend to merge it. Two things I'd flagged internally when it was opened are both resolved:
The shape is right too — gating One thing blocks the merge, and it's cosmetic. onReadError: ctx.debug
? (path: string, error: unknown) =>
- emitDebug(
- write,
- `skill nudge could not read ${path}; treating target as absent`,
- error,
- )
+ emitDebug(write, `skill nudge could not read ${path}; treating target as absent`, error)
: undefined,
Everything else is green: typecheck, unit tests on Node 20/22 and Windows, build, coverage, E2E, secret scan, eslint-security. The one remaining red check, |
|
Thanks! I pushed the Prettier-only formatting fix in @zeshi-du The new push appears to have put the fork workflows back into |
zeshi-du
left a comment
There was a problem hiding this comment.
Approved.
CI is now green on everything that reflects this change: typecheck, Node 20 / Node 22 / Windows unit tests, build, coverage, local E2E, gitleaks, ESLint security, and Lint & Format after your style(skill-nudge) commit — thank you for turning that around the same day.
The one red mark, Dependency Review, is ours, not yours. Our organisation has the dependency graph disabled, so that action fails on every pull request in this repo regardless of content. I've opened a fix internally so it skips with a warning instead of failing when the graph is unavailable. Please ignore it.
One note on timing: a release is mid-flight right now, and merging to main during the snapshot window would break our mirror's integrity check. So this sits approved for a day or so and then goes in — the delay is purely release mechanics, not a further review. I'll merge it myself and comment here when it lands.
For the record, since this PR waited far too long for a first human response: the two objections raised in the earlier internal review are both resolved. The file is no longer being concurrently rewritten, and the concern about bare stderr not reusing the redaction path doesn't apply here — emitDebug reports fs errors against local agent-config paths, and printing the path is the diagnostic content. Gating on --debug, wrapping the callback in its own try/catch so a diagnostic failure can't turn a best-effort probe into a hard failure, and the 100 lines of tests are all the right calls.
What does this PR do?
Threads the existing global
--debugflag into the skill-nudge pre-action context so the two remaining swallowed error paths insrc/lib/skill-nudge.tsare diagnosable when debug output is requested.Specifically:
AGENTS.md) emit a debug-only stderr diagnostic while continuing to treat that target as absent.This follows the debug-emission pattern established in #223.
Related issue
Closes #285
Type of change
Checklist
mainbranch.(
feat(...),fix(...),docs(...), …).npm run lintandnpm run format:checkpass.npm run typecheckpasses.npm testpasses and coverage stays at or above the 80% gate.credentials required).
README.md/DOCUMENTATION.mdwhererelevant.
Notes for reviewers
The implementation is intentionally narrow and follows #223's existing pattern:
capture the swallowed error, honor the existing
--debugflag, emit to stderr,and preserve normal output and exit behavior.
The managed-target read failure occurs inside
isVerifySkillInstalled(), so thisPR adds an optional best-effort diagnostic callback rather than changing the
function's return behavior. The callback is isolated with its own error guard so
diagnostic failures cannot affect command execution.
The branch changes only:
src/index.tssrc/lib/skill-nudge.tssrc/lib/skill-nudge.test.tsFull lint, format, typecheck, unit-test, and coverage verification is left to the
repository CI on this PR.
Summary by CodeRabbit
New Features
Bug Fixes