@pmelab/gtd 38.1.0 → 39.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ @inmem
2
+ Feature: a red check is re-run once before it reaches a person
3
+
4
+ Before the fix loop escalates, `healthy` re-runs the suite as
5
+ `health.recheck`. Green there ends the loop as if the check had passed, and
6
+ the re-check's landing records `Gtd-Mark: flaky=health.check`. Red again
7
+ escalates as before.
8
+
9
+ Background:
10
+ Given a gtd config with:
11
+ """
12
+ import { healthy } from "@pmelab/gtd/workflows"
13
+ import { agent, human } from "@pmelab/gtd/flows"
14
+
15
+ export const held = async () => {
16
+ await agent("first", "go")
17
+ await healthy(() => agent("fix", "go"))
18
+ await human("done")
19
+ }
20
+ export default held
21
+ """
22
+ And step "first" writes "src/a.ts" with:
23
+ """
24
+ export const a = 1
25
+ """
26
+ And step "health.check" writes ".gtd/FEEDBACK.md" with:
27
+ """
28
+ 1 test failing
29
+ """
30
+ And step "fix" deletes ".gtd/FEEDBACK.md"
31
+ And judge step "health.judge" answers:
32
+ """
33
+ [{"id":"verdict","answer":"progress","p":0.9}]
34
+ """
35
+
36
+ Scenario: a re-check that passes ends the loop without a person, recorded as flaky
37
+ Given step "health.recheck" deletes ".gtd/FEEDBACK.md"
38
+ When gtd starts workflow "held"
39
+ And the process is driven
40
+ Then the process rests at "done"
41
+ And the commit subjects end with:
42
+ """
43
+ gtd(agent): fix → health.check
44
+ gtd(check): health.check → health.judge
45
+ gtd(judge): health.judge → health.recheck
46
+ gtd(check): health.recheck → done
47
+ """
48
+ And the last commit body contains "Gtd-Mark: flaky=health.check"
49
+ And ".gtd/FEEDBACK.md" does not exist
50
+
51
+ Scenario: a re-check that stays red escalates, with nothing recorded as flaky
52
+ Given step "health.recheck" writes ".gtd/FEEDBACK.md" with:
53
+ """
54
+ 1 test still failing
55
+ """
56
+ When gtd starts workflow "held"
57
+ And the process is driven
58
+ Then the process rests at "health.describe"
59
+ And the last commit subject is "gtd(check): health.recheck → health.describe"
60
+ And no commit body contains "Gtd-Mark: flaky="