Skip to content

Prevent issue watcher overwrites across colliding repo slugs#142

Merged
CoreyRDean merged 1 commit into
mainfrom
fix/issue-watcher-slug-collision
May 13, 2026
Merged

Prevent issue watcher overwrites across colliding repo slugs#142
CoreyRDean merged 1 commit into
mainfrom
fix/issue-watcher-slug-collision

Conversation

@CoreyRDean
Copy link
Copy Markdown
Owner

Non-technical summary

New GitHub issue watcher installs no longer overwrite each other when two different repositories collapse to the same normalized slug. This matters now because the watcher flow is meant to be reusable across repos, and silent collisions break that promise by replacing one user-visible Cycle with another.

Technical summary

  • append a short stable hash of the full owner/repo identity when generating new watcher job names in lib/clauck
  • keep the existing readable slug and issue number so installed watcher files are still recognizable in ~/.clauck
  • add regression coverage for the specific dash/slash and dot/slash collision shapes from issue fix(watcher): slug normalization collapses repo boundary, allows cross-repo collisions #120
  • add a stability test proving the same repo + issue still produces the same watcher name on repeated installs
  • preserve existing installed watchers by limiting the change to new watcher creation only

Relevant intent:

Tests:

  • python3 -m unittest tests.test_clauck_report
  • python3 -m unittest discover tests

Breaking changes:

  • none for existing installs; new watcher job filenames gain a hash suffix to prevent cross-repo collisions

Additional notes

Trade-offs:

  • watcher names are slightly longer, but the suffix buys collision-proof identity without needing a migration for already-installed jobs

Deferred follow-up:

  • existing previously-installed colliding watcher files are not auto-migrated in this change

Remaining gap:

  • this fixes watcher creation for future installs; any pre-existing overwritten watcher would still need to be recreated manually if a user already hit the bug

Closes #120.

@CoreyRDean CoreyRDean added the bug Something isn't working label May 13, 2026 — with ChatGPT Codex Connector
@CoreyRDean CoreyRDean marked this pull request as ready for review May 13, 2026 14:42
@CoreyRDean CoreyRDean merged commit 9bab7cb into main May 13, 2026
2 checks passed
@CoreyRDean CoreyRDean deleted the fix/issue-watcher-slug-collision branch May 13, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(watcher): slug normalization collapses repo boundary, allows cross-repo collisions

1 participant