get shows a round only for a proposed version (issue 784, ADR 0665)
mesh/delivery merged: source.main moved to novox/mesh-catalog@9c42423d5821
mesh/check checking c12f1a16db83 on 9c42423d5821

Claude-Session: https://claude.ai/code/session_01JG73KK8HD1gufnqyFxMFdW
This commit is contained in:
2026-11-09 23:22:46 +01:00
parent 09ea4a40bf
commit c12f1a16db
2 changed files with 5 additions and 2 deletions
@@ -388,8 +388,8 @@ func (k *KB) Get(a GetAsk) (*Got, error) {
e.PendingVersion, k, last.Version)
}
}
if a.Version == 0 {
g.Round = e.Working().Round()
if w := e.Working(); a.Version == 0 && w.Status == StatusProposed {
g.Round = w.Round()
}
ask := r.Ask
if a.Version == 0 && e.Pending != nil && e.Pending.Ask != nil {
@@ -163,6 +163,9 @@ func TestARoundCountSurvivesAClosingAndAClosingWaitsForTheOperatorsAnswer(t *tes
if g, err := w.k.Get(GetAsk{Kind: KindResearch, Number: n}); err != nil || g.Round != 3 {
t.Fatalf("get after two rounds: %+v, %v", g, err)
}
if g, err := w.k.Get(GetAsk{Kind: KindDecision, Number: 276}); err != nil || g.Round != 0 {
t.Fatalf("get of an accepted record shows round %d, %v", g.Round, err)
}
if _, err := w.k.Close("lead@shanks", CloseAsk{Number: n, To: StatusIdea, Note: "Parked: nothing carries it this month."}); err != nil {
t.Fatal(err)
}