Issue 313: history adopted at the switch was held for a person; ADR 0250 retires it and ends owed work the forge cannot do
This commit is contained in:
+96
@@ -0,0 +1,96 @@
|
||||
---
|
||||
topic: the mesh
|
||||
status: accepted
|
||||
date: 2026-10-08
|
||||
deciders: jochen
|
||||
reconstructed: false
|
||||
extends: 02-DECISIONS/0239-a-delivery-is-owned-by-the-mesh-delivery-module-and-runs-from-commit-to-delivered.md
|
||||
---
|
||||
|
||||
# 250. A merge heard only from the bus's history is retired, and owed work the forge cannot do ends
|
||||
|
||||
## Context
|
||||
|
||||
[ADR 0239](0239-a-delivery-is-owned-by-the-mesh-delivery-module-and-runs-from-commit-to-delivered.md)
|
||||
gives the delivery's owner one table of states. Decision 10, *the switch*, adopts the walks open when the
|
||||
owner is first assigned. It does not mention the merges the bus still holds from before. A new consumer of the
|
||||
forge's `pull.merged` hears them all again. The owner took each as a fresh merge whose head it had never
|
||||
heard, and its row *merged unchecked → held* held each one for a person.
|
||||
|
||||
At the first switch that was 688 deliveries, merged from four days to two hours earlier, all on the machines
|
||||
long before
|
||||
([issue 313](../04-ISSUES/313-history-was-held-for-a-person-and-its-views-retried-for-ever/00-report.md)).
|
||||
`held` could be left only by a release, which walks, or a stop, which says a person stopped a running
|
||||
delivery. Neither is true of history. The self-check listed every one past its bound.
|
||||
|
||||
Decision 5 says owed work is "retried until done". A view on a pull request the forge no longer holds can
|
||||
never be done. It was tried every ten seconds, 11,000 times each, and nothing said so.
|
||||
|
||||
## Considered Options
|
||||
|
||||
1. **A final state `retired` for history, taken at adoption, and a person's act for what is already held.**
|
||||
Chosen.
|
||||
2. **Adopt history as `delivered`.** It did reach the machines, but this owner did not deliver it, and
|
||||
`delivered` is the word for a walk this owner saw done. Rejected.
|
||||
3. **Stop them.** `stopped` means a person ended a delivery, and its status is an error on the commit.
|
||||
Rejected.
|
||||
4. **Let healer H2's `close` take held history.** `held` is the operator's by design. A healer leaving it
|
||||
unasked would hide the case where the rule is wrong. Rejected for the deliveries already held. New history
|
||||
is not held at all, so no healer is needed for it.
|
||||
5. **Skip merges from the bus's history altogether.** Then the commit's note would keep no record that this
|
||||
owner heard them, and a merge heard late for another reason would go unrecorded. Rejected.
|
||||
|
||||
## Decision
|
||||
|
||||
1. **History is a delivery made from the forge's word at its merge, heard fifteen minutes or more after
|
||||
that merge, and with no walk of it open.** The forge says a merge within seconds, so one heard that late was
|
||||
replayed. A walk the controller keeps open or waiting for it makes it a delivery, never history.
|
||||
2. **A new final state, `retired`.** It is reached in two ways:
|
||||
- *history*, an observed row from `proposed`, `checked`, `ready` and `rejected`, taken before any other.
|
||||
New history goes there at adoption and is never checked, held or walked;
|
||||
- *retire*, a person's act from `held`, with why, whose guard is the rule of point 1. It is never a release:
|
||||
nothing is walked, delivered or put back.
|
||||
3. **The seat gains `retire-history`.** It takes one delivery by id and is refused when the rule does not
|
||||
take it. Or it takes every held delivery, of one repository when named, and answers how many it retired and
|
||||
which it left held and why. `dry` answers the same and changes nothing. The verb is promised by the
|
||||
controller as optional before the holder serves it
|
||||
([ADR 0246](0246-a-seats-new-verb-is-promised-before-it-is-required.md)).
|
||||
4. **History is not shown on its pull request.** Its transitions are said on the bus and kept on the commit's
|
||||
note. No view or `mesh/delivery` status is asked: the forge may no longer hold that pull request, or may
|
||||
hold another under its number.
|
||||
5. **Owed work ends.** This replaces "retried until done" in decision 5:
|
||||
- the forge's own answer that what an effect is for does not exist (a 404, or "does not exist") is final.
|
||||
The effect is given up with one line among the owner's refusals;
|
||||
- any other failure is tried again later each time: ten seconds, doubling to an hour. After sixty tries,
|
||||
about two days, it is given up the same way.
|
||||
|
||||
## Consequences
|
||||
|
||||
- The deliveries held at the first switch are retired by one call of `retire-history`, after a dry run says
|
||||
how many. The self-check's findings for them end.
|
||||
- A switch, a reassignment or a lost consumer position no longer turns the bus's history into work for a
|
||||
person.
|
||||
- A merge heard late that is not history, because its walk waits, is held as before.
|
||||
- An owed effect can now be lost. When it is, the owner says so, and the commit's note keeps whatever was
|
||||
already written.
|
||||
|
||||
**How it is checked.** mesh-delivery's tests: `TestAMergeLongPastHeardFromTheForgesWordIsRetiredAtAdoption`
|
||||
(history retired at adoption, with nothing asked of its pull request; a live merge from the forge's word and
|
||||
a merge whose walk is open are not history; a reused number does not merge an old delivery again),
|
||||
`TestRetireHistoryRetiresTheAdoptedHistoryInBulkAndLeavesEveryOtherHeldOne` (dry first, then the bulk retire;
|
||||
nothing asked of the controller; a retired delivery cannot be released),
|
||||
`TestRetireHistoryIsRefusedForARealHeldDelivery`, and `TestOwedWorkTheForgeSaysCanNeverBeDoneIsDropped` (a
|
||||
final answer is given up after one try and said; other failures back off and end). The table's own tests
|
||||
take and refuse both new rows. The controller's `TestTheDeliverySeatPromisesRetireHistoryOptionally` checks
|
||||
the seat promises the verb as optional.
|
||||
|
||||
## References
|
||||
|
||||
- [Issue 313](../04-ISSUES/313-history-was-held-for-a-person-and-its-views-retried-for-ever/00-report.md),
|
||||
its report and diagnosis.
|
||||
- [ADR 0239](0239-a-delivery-is-owned-by-the-mesh-delivery-module-and-runs-from-commit-to-delivered.md),
|
||||
decisions 2, 5 and 10.
|
||||
- [ADR 0246](0246-a-seats-new-verb-is-promised-before-it-is-required.md), a verb promised before it is
|
||||
required.
|
||||
- [Design 47](../03-DESIGN/01-to-be/47-delivery-from-commit-to-delivered.md), *The state table*, *What every
|
||||
transition does* and *The verbs*.
|
||||
Reference in New Issue
Block a user