fix: complete session only after document transfer#1310
Conversation
|
@bhavyajain0810 is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @bhavyajain0810, thanks for contributing to Nyay Setu! 🎉 I have automatically:
Our workflows will now analyze your changes to classify:
Tip Ensure your PR description references the issue it resolves (e.g. Happy coding! 🚀 |
|
Hi @viru0909-dev, The CI failures appear to be caused by unresolved conflict markers already present in unrelated base files, not by this PR. I verified my PR diff using: git diff --name-only upstream/main...HEADand this PR only changes: The failing backend/NLP checks are pointing to unrelated files from the base branch, such as Since this PR is scoped to #770, I have not included unrelated cleanup changes. Please let me know if you want me to handle those base conflict markers in a separate PR. |
viru0909-dev
left a comment
There was a problem hiding this comment.
🤖 Automated PR Review — Changes Requested 🔴
Hey @bhavyajain0810! Thanks for the PR. The automated review found 1 issue(s) that must be resolved before this can be approved.
❌ Failed Checks
| Status | Check | Details |
|---|---|---|
| ❌ | Checklist Completed | 2 checklist item(s) are still unchecked. Complete all checklist items before requesting a review. |
✅ Passed Checks
| Status | Check | Details |
|---|---|---|
| ✅ | Title Quality | Title looks good. |
| ✅ | Description Quality | Description is well-structured. |
| ✅ | Issue Linked | Issue linked via closing keyword. |
| ✅ | No Merge Conflicts | Mergeability unknown (GitHub still computing) — skipping. |
| ✅ | Branch Up-to-date | Branch is recent (last updated 1.6 days ago). |
| ✅ | CI / Tests | No CI checks found (possibly no workflows configured). |
📋 How to resolve
- Read each failed check above carefully.
- Push the required fixes to your branch
fix/session-completion-document-transfer-770. - The bot will re-review automatically on the next push.
If this PR has been idle for 3+ more days after this message, it will be scheduled for closure.
🤖 This review was generated automatically by the NYAY-SETU PR Review Bot.
viru0909-dev
left a comment
There was a problem hiding this comment.
Review Summary
This PR has been reviewed and requires changes before it can be approved. The issues below must be resolved.
Issues to Resolve
| Result | Check | Notes |
|---|---|---|
| FAIL | Description | Description is missing: a Checklist section with checkboxes. |
| FAIL | Checklist | No checklist found in the description. |
Passing Checks
| Result | Check | Notes |
|---|---|---|
| PASS | Title | Title format is acceptable. |
| PASS | Issue Link | Issue is linked with a closing keyword. |
| PASS | Merge Conflicts | Conflict status is not yet computed by GitHub — skipping. |
| PASS | Branch Freshness | Branch was last updated 2.0 days ago. |
| PASS | CI / Tests | No CI checks are configured or results are not yet available. |
| PASS | Code Quality | No code quality issues detected in the diff. |
To proceed: push the required fixes to fix/session-completion-document-transfer-770 and the PR will be re-evaluated on the next review run.
viru0909-dev
left a comment
There was a problem hiding this comment.
Review Summary
This PR has been reviewed and requires changes before it can be approved. The issues below must be resolved.
Issues to Resolve
| Result | Check | Notes |
|---|---|---|
| FAIL | Description | Description is missing: a Checklist section with checkboxes. |
| FAIL | Checklist | No checklist found in the description. |
Passing Checks
| Result | Check | Notes |
|---|---|---|
| PASS | Title | Title format is acceptable. |
| PASS | Issue Link | Issue is linked with a closing keyword. |
| PASS | Merge Conflicts | Conflict status is not yet computed by GitHub — skipping. |
| PASS | Branch Freshness | Branch was last updated 0.9 days ago. |
| PASS | CI / Tests | No CI checks are configured or results are not yet available. |
| PASS | Code Quality | No code quality issues detected in the diff. |
To proceed: push the required fixes to fix/session-completion-document-transfer-770 and the PR will be re-evaluated on the next review run.
83659a7 to
6f02a34
Compare
|
Hi @viru0909-dev, I have updated the PR checklist and retriggered the workflows with commit The PR Template Compliance / The remaining environment-related failure appears to be from the unrelated base-branch issues documented earlier; this PR remains limited to Could you please re-review the PR and dismiss the outdated changes-requested review if everything looks good? Thank you! |
Pull Request
Description
This PR fixes a data-loss risk in the Vakil-Friend
completeSession()flow.Previously, a session could be marked as
COMPLETEDbefore uploaded documents were transferred to the newly created case. If the transfer failed, the session could remain permanently completed while its evidence was not linked correctly.The updated flow transfers documents before changing the session status. If document transfer fails, the method throws an exception before the session is finalized.
Closes #770
Type of change
Checklist
COMPLETEDTesting
git diff --checksuccessfullytransferDocumentsBeforeCompletion(...)executes beforeChatSessionStatus.COMPLETEDVakilFriendService.javaScreenshots
Not applicable, backend-only change.