The commit_message field is currently implemented in both the Manifest and Complete interfaces of the BUCK upload API. However, the value provided in the Manifest interface is effectively unused, as the Complete interface overwrites it when updating the session status.
Current Behavior
The Manifest interface accepts and stores commit_message in the session payload during status update, but this value has no downstream effect:
https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L708-L715
The Complete interface subsequently overwrites the commit_message field during its own status update, nullifying the Manifest-provided value:
https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L922-L934
https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L937-L945
Proposed Resolution
Retain commit_message exclusively in the Manifest interface and remove it from the Complete interface. This would:
- Simplify the Complete endpoint to require no request body, functioning purely as a session-finalization notification.
- Position the Manifest interface as the authoritative source for session metadata (including commit message).
- Achieve clearer separation of concerns: Manifest defines session context; Complete triggers completion.
The
commit_messagefield is currently implemented in both the Manifest and Complete interfaces of the BUCK upload API. However, the value provided in the Manifest interface is effectively unused, as the Complete interface overwrites it when updating the session status.Current Behavior
The Manifest interface accepts and stores
commit_messagein the session payload during status update, but this value has no downstream effect:https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L708-L715
The Complete interface subsequently overwrites the
commit_messagefield during its own status update, nullifying the Manifest-provided value:https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L922-L934
https://github.com/web3infra-foundation/mega/blob/d47be34c1cab7524ea106d9a58241b279a1eab8f/jupiter/src/service/buck_service.rs#L937-L945
Proposed Resolution
Retain
commit_messageexclusively in the Manifest interface and remove it from the Complete interface. This would: