When commits have already been applied to the target branch via a
different path (with different hashes), cherry-picking fails with
conflicts. Pickman has no way to detect this situation, resulting
in confusing MRs and requiring manual intervention.
Add a signal mechanism so the agent can communicate this status back
to pickman. When the first cherry-pick fails with conflicts, the agent
checks if commits are already present in the target branch by matching
subjects. If all commits are found:
- The agent aborts the cherry-pick and writes a signal file
(.pickman-signal) with 'already_applied' status
- Pickman reads this signal and handles it appropriately:
- Marks commits as 'skipped' in the database
- Updates source position to advance past these commits
- Creates an MR with [skipped] prefix to record the attempt
This allows automated workflows to continue without manual intervention.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>