feat(gitea-twin): the drift refusal should name each twin source last commit, not only the twin #1103

Closed
opened 2026-09-04 01:22:07 +02:00 by bosun · 0 comments
Owner

gitea-twin-check's refusal names WHICH twins drifted. The next question a reader has is FROM WHAT CHANGE, and answering it costs one mechanical command they have to run themselves.

Today's failure, on its first PR-event report:

gitea-twin: .gitea/workflows/mirror-release.yml does not match the generator —
either .forgejo/workflows/mirror-release.yml moved and the twin was not
regenerated, or the twin was hand-edited

Correct, and it stops one step short. git log -1 -- <source> turns that into:

mirror-release.yml           6f89823  fix(mirror): a runnable label …        (#1090)
reusable-mirror-release.yml  17d6982  fix(mirror): re-download from …        (#1090)
reusable-release.yml         3fa8507  feat(post-cut): discriminate an …      (#1091)

That attribution is what made today's drift diagnosable in minutes rather than being mistaken for a defect in the PR that first reported it — @shipwright's #1099 reddened on drift it did not cause, and the first two hypotheses were both about his branch.

Why it is worth the line

🔑 The refusal currently supports the wrong first inference. A contributor whose PR goes red reasonably assumes their change caused it. Naming the source commit per drifted twin distinguishes "you drifted this" from "this was already drifted when you got here" — and those need opposite responses.

⚠️ And the second case is not hypothetical: all three of today's drifts predated the PR that surfaced them. One of them was authored by the person who wrote the gate.

AC

  • each drifted twin in the failure output names its source's last commit — short sha and subject
  • the lookup failing does not fail the check: an unresolvable source still reports the drift, with the attribution absent rather than the run dead
  • an arm covers the attribution line, so it cannot silently stop being emitted

📌 The second AC is the one worth writing carefully. This is a diagnostic embellishment on a gate whose actual job is the pass/fail — a git log that errors must not take the refusal with it.

Offered by @shipwright and deliberately NOT bundled into rt#1102, which is generated-only and stays reviewable as a pure generator diff.

Closeout

Verified on origin/main at landed commit f91b884c1c after PR #1104 merged. The three ACs are satisfied by the merged SourceCommit implementation and its controls: attributed drift includes short SHA and subject; an unresolvable source preserves the refusal while omitting attribution; and the attribution arm is mutation-covered. Lookout review 6263 was official and exact-head-bound to the pre-rebase content, and all 26 required contexts passed.

`gitea-twin-check`'s refusal names WHICH twins drifted. The next question a reader has is FROM WHAT CHANGE, and answering it costs one mechanical command they have to run themselves. Today's failure, on its first PR-event report: ``` gitea-twin: .gitea/workflows/mirror-release.yml does not match the generator — either .forgejo/workflows/mirror-release.yml moved and the twin was not regenerated, or the twin was hand-edited ``` Correct, and it stops one step short. `git log -1 -- <source>` turns that into: ``` mirror-release.yml 6f89823 fix(mirror): a runnable label … (#1090) reusable-mirror-release.yml 17d6982 fix(mirror): re-download from … (#1090) reusable-release.yml 3fa8507 feat(post-cut): discriminate an … (#1091) ``` That attribution is what made today's drift diagnosable in minutes rather than being mistaken for a defect in the PR that first reported it — @shipwright's #1099 reddened on drift it did not cause, and the first two hypotheses were both about his branch. ## Why it is worth the line 🔑 **The refusal currently supports the wrong first inference.** A contributor whose PR goes red reasonably assumes their change caused it. Naming the source commit per drifted twin distinguishes *"you drifted this"* from *"this was already drifted when you got here"* — and those need opposite responses. ⚠️ **And the second case is not hypothetical: all three of today's drifts predated the PR that surfaced them.** One of them was authored by the person who wrote the gate. ## AC - [x] each drifted twin in the failure output names its source's last commit — short sha and subject - [x] the lookup failing does not fail the check: an unresolvable source still reports the drift, with the attribution absent rather than the run dead - [x] an arm covers the attribution line, so it cannot silently stop being emitted 📌 The second AC is the one worth writing carefully. This is a diagnostic embellishment on a gate whose actual job is the pass/fail — a `git log` that errors must not take the refusal with it. Offered by @shipwright and deliberately NOT bundled into rt#1102, which is generated-only and stays reviewable as a pure generator diff. ## Closeout Verified on origin/main at landed commit f91b884c1c989c26958fdbbfd727f5d93f874c6a after PR #1104 merged. The three ACs are satisfied by the merged SourceCommit implementation and its controls: attributed drift includes short SHA and subject; an unresolvable source preserves the refusal while omitting attribution; and the attribution arm is mutation-covered. Lookout review 6263 was official and exact-head-bound to the pre-rebase content, and all 26 required contexts passed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
frankenbit/release-toolkit#1103
No description provided.