[DEPLOY] production-release(v.0.3.x)#378
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces state transition helper methods to IssuePin and integrates them into ProblemSolverCommandServiceImpl to transition issue pins to 'in progress' or 'resolved' states. The review feedback highlights a missing state check to prevent participation in already resolved issues and suggests improving the ordering of state updates relative to database persistence operations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| throw ProblemSolverException.of(IssueErrorCode.GO_NOW_400_1); | ||
| } | ||
|
|
||
| issuePin.markInProgressIfBeforeProgress(); |
There was a problem hiding this comment.
issuePin.getIssuePinState() == IssuePinState.RESOLVED state check is missing. imagine an issue that is already resolved, new solvers should not be allowed to participate. import and add a check before proceeding.
also, markInProgressIfBeforeProgress() should be called before saveAndFlush to keep the state consistent.
if (issuePin.getIssuePinState() == issueissyu.backend.domain.issue.enums.IssuePinState.RESOLVED) {
throw ProblemSolverException.of(IssueErrorCode.GO_NOW_400_1);
}
issuePin.markInProgressIfBeforeProgress();| solver.markResolved(); | ||
| problemSolverRepository.save(solver); | ||
|
|
||
| solver.getIssuePin().markResolvedIfInProgress(); |
There was a problem hiding this comment.
calling markResolvedIfInProgress() after saving the solver is a bit inconsistent. since the method is @transactional, dirty checking will save it, but it is better to modify all states before calling save, or even better, remove the explicit save call and rely on dirty checking.
🔗 Related Issue
✨ 작업 개요
체크리스트
📷 이미지 첨부 (선택)
🧐 집중 리뷰 요청