Say the router's refusal of a proposal only once its discard is kept (issue 589)
mesh/merge-gate head e4e0ce761901 merged into trunk 9c9a76d220f8 — pass: builds claude-code → ace, g14, novox, shanks; no bus step; every machine composes …
mesh/repo-check head e4e0ce761901 merged into trunk 9c9a76d220f8 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate head e4e0ce761901 merged into trunk 9c9a76d220f8 — pass: builds claude-code → ace, g14, novox, shanks; no bus step; every machine composes …
mesh/repo-check head e4e0ce761901 merged into trunk 9c9a76d220f8 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery superseded: a newer head of the same pull request
The refusal test failed on a loaded build agent: Propose returned on hearing the refusal before HeardEnd had written the discard, so a reader right after saw nothing decided. The question path keeps the same order.
This commit is contained in:
@@ -838,14 +838,20 @@ func HeardEnd(p Paths, store ProposalStore, w asks.Warrant, now time.Time) (stri
|
|||||||
if !known || (w.About != "" && w.About != prop.Ask().About) {
|
if !known || (w.About != "" && w.About != prop.Ask().About) {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
// Said to a proposer waiting on it only once the discard is kept: what it reads next is already there (the
|
||||||
|
// flake of the router's refusal test under a loaded build agent, 2026-10-12).
|
||||||
|
tell := func() {
|
||||||
endedMu.Lock()
|
endedMu.Lock()
|
||||||
ended[w.Ask] = w
|
ended[w.Ask] = w
|
||||||
endedMu.Unlock()
|
endedMu.Unlock()
|
||||||
|
}
|
||||||
approved, err := ReadApproved(p)
|
approved, err := ReadApproved(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
tell()
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if _, done := approved.Decided[w.Ask]; done {
|
if _, done := approved.Decided[w.Ask]; done {
|
||||||
|
tell()
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
// Heard, not read from a record: Reconcile still reads the router's record of it, so an ask the router took after
|
// Heard, not read from a record: Reconcile still reads the router's record of it, so an ask the router took after
|
||||||
@@ -856,7 +862,9 @@ func HeardEnd(p Paths, store ProposalStore, w asks.Warrant, now time.Time) (stri
|
|||||||
}
|
}
|
||||||
approved.Decided[w.Ask] = d
|
approved.Decided[w.Ask] = d
|
||||||
delete(approved.Refused, w.Ask)
|
delete(approved.Refused, w.Ask)
|
||||||
if err := writeApproved(p, approved); err != nil {
|
err = writeApproved(p, approved)
|
||||||
|
tell()
|
||||||
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return "proposal " + w.Ask + ": " + d.Outcome, nil
|
return "proposal " + w.Ask + ": " + d.Outcome, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user