Progress: an unread design is not cached and is warned of at every level; head is capped (issue 1947)
mesh/delivery merged: source.main moved to novox/mesh-catalog@980ade933853
mesh/check being carried to 7c0ce2fe218b on 980ade933853 | from 1da83c29ddf9
mesh/delivery merged: source.main moved to novox/mesh-catalog@980ade933853
mesh/check being carried to 7c0ce2fe218b on 980ade933853 | from 1da83c29ddf9
This commit is contained in:
@@ -42,6 +42,15 @@ func (w withDesigns) Read(path string) (string, string, error) {
|
||||
return c, commit, err
|
||||
}
|
||||
|
||||
func (w withDesigns) ReadHead(path string, n int) (string, string, error) {
|
||||
if c, commit, err := w.base.ReadHead(path, n); err == nil {
|
||||
return c, commit, nil
|
||||
}
|
||||
c, _, err := w.designs.ReadHead(path, n)
|
||||
commit, _ := w.base.Standing()
|
||||
return c, commit, err
|
||||
}
|
||||
|
||||
// seatsWorld plays the issue tracker and mesh-delivery from the captured answers, and counts what it is asked.
|
||||
type seatsWorld struct {
|
||||
mu sync.Mutex
|
||||
@@ -335,6 +344,12 @@ func TestProgressOfADesignMinimalAndDetailed(t *testing.T) {
|
||||
!strings.Contains(bp.Tree, "design 47") || !strings.Contains(bp.Tree, "R6") {
|
||||
t.Fatalf("an unreadable design: %v %+v", err, bp)
|
||||
}
|
||||
if mp, err := kb.Progress(ProgressAsk{Of: "mesh"}); err != nil || !strings.Contains(strings.Join(mp.Warnings, "\n"), "does not read") {
|
||||
t.Fatalf("the mesh level drops an unread design silently: %v %v", err, mp.Warnings)
|
||||
}
|
||||
if d := parseDesign(DesignsFolder+"/47-x.md", "---\nstatus: in-progress\n"); d.Unread == "" {
|
||||
t.Errorf("a frontmatter cut before its close is not said")
|
||||
}
|
||||
lines := strings.Split(p.Tree, "\n")
|
||||
if !strings.HasPrefix(lines[0], "✗ design 47 · Delivery: from a commit to delivered — ") {
|
||||
t.Fatalf("first line %q", lines[0])
|
||||
|
||||
Reference in New Issue
Block a user