userdefined111 commented on PR #652:
URL: 
https://github.com/apache/tooling-trusted-releases/pull/652#issuecomment-3909696541

   ### Summary
   This PR implements operation logging for the merge process. Previously, the 
`merge()` function performed file operations silently. This change updates 
`merge.py` to return a detailed log of all actions (add, delete, skip, replace) 
and updates the storage logic to persist this log to the revision object.
   
   ### Changes
   * **Modified `atr/shared/merge.py`:**
       * Updated `merge()` to return `ops: list[dict[str, str]]` instead of 
`None`.
       * Added logic to append an operation record (e.g., `{"path": "...", 
"action": "...", "reason": "..."}`) for every file handling case.
       * Refactored internal helpers (`_merge_all_present`) to pass the `ops` 
list down for accurate logging.
   
   * **Modified `atr/storage.py`:**
       * Updated the call to `merge.merge()` in 
`CommitteeParticipant.create_and_manage`.
       * Captured the returned `merge_ops` list.
       * Assigned the log to `new_revision.merge_log` so it is saved to the 
database.
   
   ### Impact
   This change allows us to track exactly how a revision was constructed from 
its parents. It provides an audit trail for debugging merge conflicts and 
verifying that file operations (like deletions or replacements) occurred 
correctly.
   
   ### Checklist
   - [x] I have read and followed CONTRIBUTING.md
   - [x] I have read DEVELOPMENT.md
   - [x] I have run the required tests and checks locally
   - [x] All required checks are currently passing
   - [x] This branch is rebased on the current main branch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to