mustflow 2.22.12 → 2.22.14
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/README.md +1 -1
- package/dist/cli/commands/explain-verify.js +8 -1
- package/dist/cli/commands/explain.js +269 -2
- package/dist/cli/commands/run.js +109 -77
- package/dist/cli/commands/verify.js +16 -1
- package/dist/cli/lib/run-plan.js +31 -5
- package/dist/core/active-run-locks.js +294 -0
- package/dist/core/check-issues.js +8 -0
- package/dist/core/command-contract-validation.js +179 -2
- package/dist/core/command-explanation.js +5 -3
- package/dist/core/command-preconditions.js +261 -0
- package/dist/core/skill-route-explanation.js +115 -9
- package/package.json +13 -12
- package/schemas/README.md +6 -3
- package/schemas/change-verification-report.schema.json +52 -0
- package/schemas/commands.schema.json +41 -0
- package/schemas/explain-report.schema.json +152 -4
- package/templates/default/i18n.toml +14 -14
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +1 -1
- package/templates/default/locales/en/.mustflow/skills/codebase-orientation/SKILL.md +18 -7
- package/templates/default/locales/en/.mustflow/skills/contract-sync-check/SKILL.md +14 -7
- package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +10 -5
- package/templates/default/locales/en/.mustflow/skills/docs-update/SKILL.md +12 -5
- package/templates/default/locales/en/.mustflow/skills/failure-triage/SKILL.md +26 -5
- package/templates/default/locales/en/.mustflow/skills/pattern-scout/SKILL.md +13 -7
- package/templates/default/locales/en/.mustflow/skills/performance-budget-check/SKILL.md +53 -181
- package/templates/default/locales/en/.mustflow/skills/readme-authoring/SKILL.md +8 -2
- package/templates/default/locales/en/.mustflow/skills/release-notes-authoring/SKILL.md +4 -1
- package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +15 -8
- package/templates/default/locales/en/.mustflow/skills/requirement-regression-guard/SKILL.md +10 -5
- package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +5 -1
- package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +2 -2
- package/templates/default/locales/en/.mustflow/skills/test-maintenance/SKILL.md +17 -4
- package/templates/default/manifest.toml +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skill.test-maintenance
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 5
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: test-maintenance
|
|
@@ -35,6 +35,7 @@ Keep tests aligned with the current behavior contract.
|
|
|
35
35
|
- A bug fix needs a regression test.
|
|
36
36
|
- Existing tests may be stale, duplicated, too broad, or tied to removed implementation details.
|
|
37
37
|
- Snapshot output has changed.
|
|
38
|
+
- Test execution moves between subprocess execution, in-process helpers, grouped runners, or scheduler-managed waves.
|
|
38
39
|
|
|
39
40
|
<!-- mustflow-section: do-not-use-when -->
|
|
40
41
|
## Do Not Use When
|
|
@@ -49,6 +50,7 @@ Keep tests aligned with the current behavior contract.
|
|
|
49
50
|
- Current behavior contract
|
|
50
51
|
- Changed or removed code path
|
|
51
52
|
- Existing test style
|
|
53
|
+
- Isolation model for the affected tests, including whether they share a Node process, working directory adapter, environment variables, or build output
|
|
52
54
|
- `.mustflow/config/commands.toml`
|
|
53
55
|
- `.mustflow/config/mustflow.toml` `[testing]`
|
|
54
56
|
|
|
@@ -77,9 +79,18 @@ Keep tests aligned with the current behavior contract.
|
|
|
77
79
|
- `legacy_contract`: old behavior is intentionally preserved
|
|
78
80
|
- `flaky_or_environmental`: failure may depend on environment
|
|
79
81
|
4. Add, update, remove, or report tests according to the classification.
|
|
80
|
-
5.
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
5. For `flaky_or_environmental` tests, do not delete or weaken assertions immediately. First classify the unstable factor:
|
|
83
|
+
- timing, ordering, or scheduler grouping;
|
|
84
|
+
- filesystem cleanup, lock files, or generated output;
|
|
85
|
+
- shared process state or environment variables;
|
|
86
|
+
- platform-specific path, shell, locale, or line-ending behavior;
|
|
87
|
+
- external tool availability or version drift.
|
|
88
|
+
6. For flaky tests, prefer isolation, deterministic fixtures, explicit waiting, runner locks, or narrower concurrency before `skip` markers. Use a skip only when the behavior is intentionally unsupported in that environment and the reason is documented.
|
|
89
|
+
7. Do not reintroduce removed behavior solely because old tests expect it.
|
|
90
|
+
8. When replacing subprocess tests with in-process helpers, verify that the helper does not mutate global process state that can leak across sibling tests. Pay special attention to `process.cwd()`, `process.env`, `process.argv`, `process.exitCode`, module-level caches, timers, and signal handlers.
|
|
91
|
+
9. If several in-process CLI tests can run in the same Node test runner, either provide context-local state for the shared resource, serialize the affected tests, or keep the unsafe tests isolated in separate processes.
|
|
92
|
+
10. Treat snapshot updates as manual unless `snapshot_update` is explicitly approved and configured.
|
|
93
|
+
11. Keep tests deterministic and close to the behavior contract.
|
|
83
94
|
|
|
84
95
|
<!-- mustflow-section: postconditions -->
|
|
85
96
|
## Postconditions
|
|
@@ -107,6 +118,7 @@ Do not infer missing test commands.
|
|
|
107
118
|
- If tests fail, inspect the first relevant failure.
|
|
108
119
|
- Do not delete or weaken tests merely to make validation pass.
|
|
109
120
|
- If it is uncertain whether a test is stale, report it instead of deleting it.
|
|
121
|
+
- If a failure appears only under grouped or parallel in-process execution, look for shared process state before changing the behavior assertions.
|
|
110
122
|
- If the test command is unavailable, report the missing intent.
|
|
111
123
|
|
|
112
124
|
<!-- mustflow-section: output-format -->
|
|
@@ -117,6 +129,7 @@ Do not infer missing test commands.
|
|
|
117
129
|
- Tests updated
|
|
118
130
|
- Tests removed, with reason
|
|
119
131
|
- Stale test candidates
|
|
132
|
+
- Flaky or environmental classification and handling
|
|
120
133
|
- Command intents run
|
|
121
134
|
- Skipped command intents and reasons
|
|
122
135
|
- Remaining test risks
|