mesh-knowledge: ask changes in the review for a decision nothing would cite, so its acceptance never turns the module unhealthy (hq issue 504)
The whole-set rule cited ran only after acceptance: the review approved a decision with no home and no record linking it, the rule then failed, and the module's health turned red for a fault its author could only repair after the fact. hq held the rule at the record's own merge. The review now judges it ahead, before the judgement: such a decision stays proposed with a changes finding naming the rule. It is not refused at propose, because no record can link a number only reserved.
This commit is contained in:
@@ -546,6 +546,36 @@ func JudgeSet(records []*Record) []Finding {
|
||||
return out
|
||||
}
|
||||
|
||||
// UncitedOnAcceptance is the whole-set rule `cited` judged ahead, on a decision's working version as it would
|
||||
// stand once accepted, over the records as JudgeSet reads them: "" when it names a home or a record accepted (or
|
||||
// superseded) links it, else what the rule would say. hq held this rule at the merge of the record's own pull
|
||||
// request, which carried the design citing it; the knowledge base holds it in the review, before the judgement, so
|
||||
// an acceptance never leaves a decision cited by nothing (novox/hq issue 504). It is not refused at propose: no
|
||||
// record can link a number only reserved, so a record that will cite a new one is proposed after it, accepted, and
|
||||
// the new one proposed again. A citing record changed by a correction after the acceptance is what the rule, run
|
||||
// after every acceptance, still says. An imported record was held to hq's checks, and its correction is not judged
|
||||
// here, as JudgeSet does not judge it.
|
||||
func UncitedOnAcceptance(r *Record, all []*Entry) string {
|
||||
if r.Kind != KindDecision || len(r.Homes) > 0 || (r.Pending != nil && r.AcceptedAt.IsZero()) {
|
||||
return ""
|
||||
}
|
||||
k := r.Key()
|
||||
for _, e := range all {
|
||||
from := e.Current
|
||||
if from.Key() == k || !(from.Accepted() || from.Status == StatusSuperseded) {
|
||||
continue
|
||||
}
|
||||
for _, l := range from.Links {
|
||||
if to, ok := l.To.Record(); ok && to == k {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%s would be accepted with nothing citing it: it names no home and no accepted record links it. Name "+
|
||||
"its home (homes: the hq design or playbook that cites it), or have the record that links it accepted first; then "+
|
||||
"propose this one again", k)
|
||||
}
|
||||
|
||||
// RuleFrom is the day each dated rule began to hold a record, as hq's checks hold it: a record dated earlier was
|
||||
// never held to it, and a dated correction of it (a progressive insight, which keeps the record's date) is not.
|
||||
// words.py held the retired words from 2026-10-07 and the daemons' lines from 2026-10-09; cycle.py the deferrals
|
||||
|
||||
Reference in New Issue
Block a user