H-A-506 review 2: only a test run's ask key outlives its pipeline's end
The kept-key rule also kept a mesh-wants composition step's own ask key, whose shared runs are mesh-wants' and no test run whose end deletes it, so every ended pipeline left that key for good. A key is kept past the end only for a test run's ask, the rule DropOpen uses. Builds: design 47 H2 H-A-506 addendum, H-A-506 corrected
This commit is contained in:
@@ -110,7 +110,7 @@ func (s *Starter) dropEnded(p seat.Pipeline, prior []seat.StepResult, unput []As
|
||||
// The end cleared these steps' asks, so their ask keys go here, not with the end's own (H-A-506 addendum); a shared
|
||||
// test run's key goes with the run's end (H-A-506 corrected).
|
||||
for _, st := range steps {
|
||||
if sharedRun(st) == "" {
|
||||
if sharedRun(st) == "" || st.Seat == wants.Seat { // only a test run's key waits for the run's end
|
||||
unmarkAsk(s.Clock, st.Ask, s.logf)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,7 +523,7 @@ func (h *Hearer) said(p seat.Pipeline, asked []int, ended bool) error {
|
||||
// Every ask key of its steps goes with the pipeline's end (H-A-506 addendum), but a shared test run's: another
|
||||
// pipeline may still read the run, and its key goes with the run's end (H-A-500 addendum (1), H-A-506 corrected).
|
||||
for _, st := range p.Steps {
|
||||
if sharedRun(st) == "" {
|
||||
if sharedRun(st) == "" || st.Seat == wants.Seat { // only a test run's key waits for the run's end
|
||||
unmarkAsk(h.Clock, st.Ask, h.logf)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,6 +420,15 @@ func TestATestRunsEndMovesEveryReaderAndIsCountedOnce(t *testing.T) {
|
||||
if s := stepNamed(c.pipeline(p), "", "composition"); len(s.Shared) != 1 || s.Shared[0] != (seat.Shared{Machine: "ace", Run: "main.9.ace", Ask: "r1"}) {
|
||||
t.Errorf("the composition step's shared = %+v, want mesh-wants' as it came", s.Shared)
|
||||
}
|
||||
// Its own ask key goes with the pipeline's end: a mesh-wants step's shared runs are no test run whose end deletes it
|
||||
// (H-A-506 addendum, corrected).
|
||||
_ = c.clock.MarkAsk(comp.Ask, AskMark{Pipeline: p.Pipeline, Step: "composition"})
|
||||
if err := c.h.said(c.pipeline(p), nil, true); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok, _ := c.clock.AskOf(comp.Ask); ok {
|
||||
t.Errorf("the composition's ask key %s outlives its pipeline's end", comp.Ask)
|
||||
}
|
||||
}
|
||||
|
||||
// Asking a test run again moves every reader (design 47 G §727; A-469l, A-470d, A-470e): a rerun of one artifact's failed
|
||||
|
||||
Reference in New Issue
Block a user