Make pull merges durably auditable before mutation #1028

Closed
opened 2026-08-17 15:22:08 +00:00 by rockachopa · 0 comments
Member

Problem

The assigned-pull merge endpoint mutates Gitea before recording pull_merged. A journal failure can therefore leave an irreversible merge with no durable Security activity evidence. Timeout reconciliation can also report a confirmed merge without recording it. Existing reserve/finalize/discard support already protects issue closure but is not used for merges.

Acceptance criteria

  • Reserve a privacy-safe pull_merged event before the merge request; reservation failure returns 503 and makes no merge call.
  • Finalize after confirmed merge, including timeout reconciliation.
  • Retain pending evidence when merge outcome or finalization is uncertain.
  • Discard the reservation for definite rejected/non-mutating outcomes.
  • Persist only owner/repo#number, never the head SHA or credentials.
  • Add behavioral tests proving failure ordering and lifecycle.

Implementation must use strict RED-GREEN-REFACTOR and close this issue from its PR.

## Problem The assigned-pull merge endpoint mutates Gitea before recording `pull_merged`. A journal failure can therefore leave an irreversible merge with no durable Security activity evidence. Timeout reconciliation can also report a confirmed merge without recording it. Existing reserve/finalize/discard support already protects issue closure but is not used for merges. ## Acceptance criteria - Reserve a privacy-safe `pull_merged` event before the merge request; reservation failure returns 503 and makes no merge call. - Finalize after confirmed merge, including timeout reconciliation. - Retain pending evidence when merge outcome or finalization is uncertain. - Discard the reservation for definite rejected/non-mutating outcomes. - Persist only `owner/repo#number`, never the head SHA or credentials. - Add behavioral tests proving failure ordering and lifecycle. Implementation must use strict RED-GREEN-REFACTOR and close this issue from its PR.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1028
No description provided.