Skip to content

refactor(mt#649): Remove branchNameToTaskId and redundant self-repair in prepare-pr#292

Merged
edobry merged 2 commits into
mainfrom
task-mt#649
Apr 3, 2026
Merged

refactor(mt#649): Remove branchNameToTaskId and redundant self-repair in prepare-pr#292
edobry merged 2 commits into
mainfrom
task-mt#649

Conversation

@edobry
Copy link
Copy Markdown
Owner

@edobry edobry commented Apr 3, 2026

Summary

Remove branchNameToTaskId() — it reintroduced fragile string parsing that the UUID refactor was meant to eliminate. The DB record (SessionRecord.taskId) is the source of truth for task linkage.

Also remove ~420 lines of redundant self-repair code from preparePrImpl and preparePr. The session DB is already wrapped with SessionAutoRepairProvider which handles orphaned sessions at the provider layer — the self-repair in the PR functions was dead weight.

Changes

  • task-id.ts: Delete branchNameToTaskId(), update @deprecated JSDoc to reference DB lookup
  • prepare-pr-operations.ts: Remove ~210-line self-repair block (TASK chore(deps-dev): bump @types/node from 22.18.3 to 24.4.0 #168), replace with simple error. Remove 7 unused imports.
  • prepare-pr.ts: Same treatment — remove self-repair, simplify error
  • backend-qualified-id.ts: Remove @deprecated reference to deleted function
  • multi-backend-integration.test.ts: Remove 5 self-repair tests, add test verifying no self-repair at this layer

Net: -420 lines of redundant code

Test plan

  • 371 tests pass in src/domain/git/
  • Full test suite passes

edobry added 2 commits April 3, 2026 16:07
- Delete branchNameToTaskId() from src/domain/tasks/task-id.ts
- Update @deprecated JSDoc on sessionNameToTaskId to reference DB lookup instead
- Update @deprecated comment in backend-qualified-id.ts to not reference branchNameToTaskId
@edobry edobry merged commit 47fb54e into main Apr 3, 2026
2 checks passed
@edobry edobry deleted the task-mt#649 branch April 3, 2026 20:08
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.

1 participant