fix(sessions): bind forge into session key to prevent cross-forge collision #534
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!534
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/520"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #520.
Summary
<forge>:<type>:<owner>/<name>:<issue>. Two repos with the same<owner>/<name>on different forges keep independent Claude resume sessions.dropAllForIssueis forge-scoped — closing issue #4 onforgejo:acme/widgetno longer wipes sessions forgithub:acme/widget. Cleanup callers compute forge viagetForgeForRepo.migrateSessionKeysAddForgePrefixbackfills any pre-existing un-prefixed key withforgejo:(the only forge that ran before this change). Idempotent. Runs aftermigrateArchitectSessionKeysso legacyarchitect:<…>rows get renamed first then prefixed.forgejo:is the correct historical default.Test plan
just qa— typecheck + Biome + 2452 tests greencross-forge isolation (#520)describe insessions.test.tsproves same<owner>/<name>on different forges round-trips independently anddropAllForIssueis forge-scopedmigrateSessionKeysAddForgePrefixdescribe covers backfill, leave-prefixed-alone, idempotent, no-clobberSession key shape,
dropAllForIssueforge-scoping, migration ordering (migrateArchitectSessionKeys→migrateSessionKeysAddForgePrefix), and all call sites (agent-runner,cleanup,/reset) are correct. CI green, cross-forge isolation tests present.Nit not worth blocking:
FORGE_PREFIXESinmigrateSessionKeysAddForgePrefixis a hardcoded list — acceptable given the no-shared-import constraint, but worth a comment noting it must be kept in sync if a new forge type is added to@claude-hooks/shared.