@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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +41 -7
- package/dist/chunks/{Schema-DO5ttJaI.mjs → Schema-C6fLlQzx.mjs} +1 -1
- package/dist/chunks/{reserved-CfQ8eurM.mjs → reserved-B6tTYjeb.mjs} +23 -6
- package/dist/chunks/{tail-C7yaWvaS.mjs → tail-_CZTP7Hu.mjs} +1 -1
- package/dist/gtd.bundle.mjs +300 -52
- package/dist/testkit.mjs +265 -20
- package/dist/workflow-kit.mjs +12 -1
- package/dist/workflows/cleanup.mjs +2 -2
- package/dist/workflows/feature.mjs +2 -2
- package/dist/workflows/fix.mjs +2 -2
- package/dist/workflows/review.mjs +2 -2
- package/dist/workflows/rollout.mjs +1 -1
- package/dist/workflows.mjs +34 -6
- package/package.json +1 -1
- package/src/cli/Cli.test.ts +15 -3
- package/src/cli/Cli.ts +62 -28
- package/src/cli/History.ts +1 -19
- package/src/cli/Metrics.test.ts +255 -0
- package/src/cli/Metrics.ts +318 -0
- package/src/cli/Output.ts +13 -0
- package/src/cli/Program.test.ts +3 -1
- package/src/cli/Program.ts +4 -0
- package/src/workflow-kit/health.ts +15 -1
- package/src/workflows/cleanup/cleanup.test.ts +2 -0
- package/src/workflows/feature/refactor.test.ts +4 -0
- package/src/workflows/rollout/rollout.feature +16 -0
- package/src/workflows/rollout/rollout.test.ts +2 -0
- package/src/workflows/shared/health.test.ts +2 -0
- package/src/workflows/shared/health.ts +34 -5
- package/src/workflows/shared/recheck.feature +60 -0
|
@@ -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="
|