Hold a decision record to the words rules only from 2026-10-11 (review of #206)
mesh/merge-gate pass: builds new: modules/mesh-knowledge, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compo…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered
mesh/merge-gate pass: builds new: modules/mesh-knowledge, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compo…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered
hq's words check never read a decision record, so a correction to any decision of October 7 to 10 was refused for words it was allowed to write. The links an accepted record holds are kept by its correction without being judged again.
This commit is contained in:
@@ -121,7 +121,7 @@ func allText(r *Record) string {
|
||||
func JudgeRecord(r *Record, held *Entry, lookup Lookup, ref *Reference) []Refusal {
|
||||
var out []Refusal
|
||||
refuse := func(rule, format string, a ...any) {
|
||||
if Holds(rule, r.Date) {
|
||||
if Holds(rule, r.Kind, r.Date) {
|
||||
out = append(out, Refusal{Rule: rule, Says: fmt.Sprintf(format, a...)})
|
||||
}
|
||||
}
|
||||
@@ -215,16 +215,20 @@ func JudgeRecord(r *Record, held *Entry, lookup Lookup, ref *Reference) []Refusa
|
||||
continue
|
||||
}
|
||||
}
|
||||
switch l.Kind {
|
||||
case LinkBecame:
|
||||
kept := held != nil && held.Current.Accepted() && hasLink(held.Current, l)
|
||||
switch {
|
||||
case kept:
|
||||
// An insight keeps what the accepted record linked, as hq wrote it: a change hq named by record waits
|
||||
// for its clause to be judged.
|
||||
case l.Kind == LinkBecame:
|
||||
if r.Kind != KindResearch || !(l.To.Kind == KindDecision || l.To.Kind == TargetDesign) || l.To.Clause > 0 {
|
||||
refuse("link-fits", "became goes from a research effort to a decision record or a design: not %s", l)
|
||||
}
|
||||
case LinkChanges:
|
||||
case l.Kind == LinkChanges:
|
||||
if !decision || l.To.Kind != KindDecision || l.To.Clause == 0 {
|
||||
refuse("link-fits", "changes goes from a decision (or a clause of it) to a clause of another decision, named as 0276 §4: not %s", l)
|
||||
}
|
||||
case LinkSupersedes, LinkExtends:
|
||||
case l.Kind == LinkSupersedes || l.Kind == LinkExtends:
|
||||
if r.Kind != l.To.Kind || !isRecord || l.To.Clause > 0 {
|
||||
refuse("link-fits", "%s goes from a record to a record of its kind: not %s", l.Kind, l)
|
||||
}
|
||||
@@ -555,8 +559,19 @@ var RuleFrom = map[string]string{
|
||||
"live-citation": "2026-10-11",
|
||||
}
|
||||
|
||||
// Holds says whether a rule holds a record of this date. A record with no day is held to every rule.
|
||||
func Holds(rule, date string) bool {
|
||||
// DecisionFrom overrides RuleFrom for a decision record: hq's words check never read 02-DECISIONS ("a decision
|
||||
// record keeps the words it was written with"), so its retired words and daemons' lines hold a decision only from
|
||||
// the day the knowledge base takes the write.
|
||||
var DecisionFrom = map[string]string{
|
||||
"retired-word": "2026-10-11",
|
||||
"daemon-line": "2026-10-11",
|
||||
}
|
||||
|
||||
// Holds says whether a rule holds a record of this kind and date. A record with no day is held to every rule.
|
||||
func Holds(rule, kind, date string) bool {
|
||||
from, dated := RuleFrom[rule]
|
||||
if d, ok := DecisionFrom[rule]; ok && kind == KindDecision {
|
||||
from = d
|
||||
}
|
||||
return !dated || !isDay.MatchString(date) || date >= from
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user