Skip to content

fix: dedupe repeated skill_discovered events#69

Merged
byapparov merged 1 commit into
mainfrom
fix/issue-68-skill-discovered-dedupe
Apr 24, 2026
Merged

fix: dedupe repeated skill_discovered events#69
byapparov merged 1 commit into
mainfrom
fix/issue-68-skill-discovered-dedupe

Conversation

@byapparov
Copy link
Copy Markdown
Contributor

Summary

  • dedupe session.skill_discovered emission per (sessionID, skill) so repeated tool registration across steps does not inflate telemetry
  • keep discovery scoped per session so a new session still emits its own events
  • add regression coverage for repeat init in one session and fresh discovery in another

Testing

  • bun test test/tool/skill-events.test.ts
  • pre-push hook: bun turbo typecheck

Closes #68

@aictrl-dev
Copy link
Copy Markdown

aictrl-dev Bot commented Apr 24, 2026

Now I'll dispatch all subagents in parallel: Security (empty manifest), Consistency, and Bug Hunter (1 shard, S=81).## Code Review: PR #69 — fix: dedupe repeated skill_discovered events

Files reviewed: 2 (packages/cli/src/tool/skill.ts, packages/cli/test/tool/skill-events.test.ts)
Concerns checked: Security, Consistency, Bug/Breaking-Changes

Security

No files matched security-sensitive paths. No findings.

Consistency

No findings. The refactored publish helper and Instance.state-based dedup set follow existing module conventions. The new test mirrors the structure of existing tests in the same file.

Bugs & Breaking Changes

No findings. The Set<string> keyed on sessionID:skillName correctly deduplicates within a session while allowing fresh discovery in new sessions. The test coverage validates both the dedupe case and the cross-session case.


Result: [] — no issues found.

@byapparov byapparov merged commit ba8244f into main Apr 24, 2026
4 of 5 checks passed
@byapparov byapparov deleted the fix/issue-68-skill-discovered-dedupe branch April 24, 2026 14:16
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.

skill_discovered event re-emitted on every step, inflating telemetry counts

1 participant