@calmo/task-runner 3.4.0 → 3.5.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/.github/dependabot.yml +7 -7
- package/.github/workflows/ci.yml +4 -4
- package/.jules/backlog_maniac.md +1 -0
- package/.jules/nexus.md +1 -0
- package/.jules/sentinel.md +1 -0
- package/.releaserc.json +2 -7
- package/AGENTS.md +21 -16
- package/CHANGELOG.md +192 -174
- package/README.md +95 -88
- package/coverage/coverage-final.json +9 -9
- package/coverage/index.html +9 -9
- package/coverage/lcov-report/index.html +9 -9
- package/coverage/lcov-report/src/EventBus.ts.html +30 -24
- package/coverage/lcov-report/src/TaskGraphValidationError.ts.html +12 -3
- package/coverage/lcov-report/src/TaskGraphValidator.ts.html +152 -137
- package/coverage/lcov-report/src/TaskRunner.ts.html +48 -45
- package/coverage/lcov-report/src/TaskRunnerBuilder.ts.html +29 -5
- package/coverage/lcov-report/src/TaskRunnerExecutionConfig.ts.html +1 -1
- package/coverage/lcov-report/src/TaskStateManager.ts.html +82 -52
- package/coverage/lcov-report/src/WorkflowExecutor.ts.html +210 -66
- package/coverage/lcov-report/src/contracts/RunnerEvents.ts.html +1 -1
- package/coverage/lcov-report/src/contracts/index.html +1 -1
- package/coverage/lcov-report/src/index.html +16 -16
- package/coverage/lcov-report/src/strategies/DryRunExecutionStrategy.ts.html +4 -4
- package/coverage/lcov-report/src/strategies/RetryingExecutionStrategy.ts.html +29 -11
- package/coverage/lcov-report/src/strategies/StandardExecutionStrategy.ts.html +7 -7
- package/coverage/lcov-report/src/strategies/index.html +1 -1
- package/coverage/lcov.info +426 -383
- package/coverage/src/EventBus.ts.html +30 -24
- package/coverage/src/TaskGraphValidationError.ts.html +12 -3
- package/coverage/src/TaskGraphValidator.ts.html +152 -137
- package/coverage/src/TaskRunner.ts.html +48 -45
- package/coverage/src/TaskRunnerBuilder.ts.html +29 -5
- package/coverage/src/TaskRunnerExecutionConfig.ts.html +1 -1
- package/coverage/src/TaskStateManager.ts.html +82 -52
- package/coverage/src/WorkflowExecutor.ts.html +210 -66
- package/coverage/src/contracts/RunnerEvents.ts.html +1 -1
- package/coverage/src/contracts/index.html +1 -1
- package/coverage/src/index.html +16 -16
- package/coverage/src/strategies/DryRunExecutionStrategy.ts.html +4 -4
- package/coverage/src/strategies/RetryingExecutionStrategy.ts.html +29 -11
- package/coverage/src/strategies/StandardExecutionStrategy.ts.html +7 -7
- package/coverage/src/strategies/index.html +1 -1
- package/dist/EventBus.js +13 -11
- package/dist/EventBus.js.map +1 -1
- package/dist/TaskGraphValidationError.js.map +1 -1
- package/dist/TaskGraphValidator.js +9 -9
- package/dist/TaskGraphValidator.js.map +1 -1
- package/dist/TaskRunner.js.map +1 -1
- package/dist/TaskRunnerBuilder.js.map +1 -1
- package/dist/TaskStateManager.d.ts +6 -0
- package/dist/TaskStateManager.js +11 -2
- package/dist/TaskStateManager.js.map +1 -1
- package/dist/TaskStep.d.ts +5 -0
- package/dist/WorkflowExecutor.js +49 -7
- package/dist/WorkflowExecutor.js.map +1 -1
- package/dist/strategies/RetryingExecutionStrategy.js +3 -1
- package/dist/strategies/RetryingExecutionStrategy.js.map +1 -1
- package/dist/strategies/StandardExecutionStrategy.js +1 -1
- package/dist/strategies/StandardExecutionStrategy.js.map +1 -1
- package/openspec/AGENTS.md +81 -15
- package/openspec/changes/archive/2026-01-18-add-concurrency-control/proposal.md +7 -4
- package/openspec/changes/archive/2026-01-18-add-concurrency-control/tasks.md +1 -0
- package/openspec/changes/archive/2026-01-18-add-external-task-cancellation/proposal.md +4 -1
- package/openspec/changes/archive/2026-01-18-add-external-task-cancellation/tasks.md +2 -1
- package/openspec/changes/archive/2026-01-18-add-integration-tests/proposal.md +3 -0
- package/openspec/changes/archive/2026-01-18-add-integration-tests/tasks.md +1 -0
- package/openspec/changes/archive/2026-01-18-add-task-retry-policy/proposal.md +3 -0
- package/openspec/changes/archive/2026-01-18-add-task-retry-policy/tasks.md +1 -0
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/proposal.md +3 -0
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/tasks.md +1 -0
- package/openspec/changes/archive/2026-01-18-feat-conditional-execution/proposal.md +35 -0
- package/openspec/changes/archive/2026-01-18-feat-conditional-execution/tasks.md +32 -0
- package/openspec/changes/archive/2026-01-18-refactor-core-architecture/proposal.md +3 -0
- package/openspec/changes/archive/2026-01-18-refactor-core-architecture/tasks.md +1 -0
- package/openspec/changes/feat-per-task-timeout/proposal.md +11 -6
- package/openspec/changes/feat-per-task-timeout/tasks.md +1 -1
- package/openspec/project.md +21 -15
- package/package.json +2 -1
- package/src/EventBus.ts +18 -16
- package/src/TaskGraph.ts +8 -8
- package/src/TaskGraphValidationError.ts +4 -1
- package/src/TaskGraphValidator.ts +148 -143
- package/src/TaskRunner.ts +42 -41
- package/src/TaskRunnerBuilder.ts +11 -3
- package/src/TaskStateManager.ts +12 -2
- package/src/TaskStep.ts +6 -0
- package/src/WorkflowExecutor.ts +63 -15
- package/src/contracts/ITaskGraphValidator.ts +12 -12
- package/src/contracts/ValidationError.ts +6 -6
- package/src/contracts/ValidationResult.ts +4 -4
- package/src/strategies/DryRunExecutionStrategy.ts +3 -3
- package/src/strategies/RetryingExecutionStrategy.ts +15 -9
- package/src/strategies/StandardExecutionStrategy.ts +4 -4
- package/test-report.xml +132 -108
package/.github/dependabot.yml
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
version: 2
|
|
7
7
|
updates:
|
|
8
|
-
- package-ecosystem:
|
|
9
|
-
directory:
|
|
10
|
-
versioning-strategy:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
versioning-strategy: "lockfile-only"
|
|
11
11
|
schedule:
|
|
12
|
-
interval:
|
|
13
|
-
- package-ecosystem:
|
|
14
|
-
directory:
|
|
12
|
+
interval: "weekly"
|
|
13
|
+
- package-ecosystem: "github-actions"
|
|
14
|
+
directory: "/"
|
|
15
15
|
schedule:
|
|
16
|
-
interval:
|
|
16
|
+
interval: "weekly"
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -2,9 +2,9 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [
|
|
7
|
+
branches: [main]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build:
|
|
@@ -24,8 +24,8 @@ jobs:
|
|
|
24
24
|
- name: Setup Node.js
|
|
25
25
|
uses: actions/setup-node@v6
|
|
26
26
|
with:
|
|
27
|
-
node-version:
|
|
28
|
-
cache:
|
|
27
|
+
node-version: "22"
|
|
28
|
+
cache: "pnpm"
|
|
29
29
|
|
|
30
30
|
- name: Install dependencies
|
|
31
31
|
run: pnpm install
|
package/.jules/backlog_maniac.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
## 2026-01-18 - TaskGraphValidationError
|
|
2
|
+
|
|
2
3
|
**Learning:** Generic errors hide structured validation data, forcing consumers to parse strings or guess what went wrong.
|
|
3
4
|
**Action:** Introduced `TaskGraphValidationError` which encapsulates the `ValidationResult`, allowing programmatic access to specific validation failures (e.g., missing dependencies, cycles).
|
package/.jules/nexus.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Nexus Journal
|
|
2
2
|
|
|
3
3
|
## 2024-05-23 - Reliability via Granularity
|
|
4
|
+
|
|
4
5
|
**Insight:** Users often confuse "Workflow Timeout" with "Task Timeout". A workflow might allow 5 minutes, but a single HTTP request shouldn't hang for 4 minutes.
|
|
5
6
|
**Action:** By pushing timeout logic down to the `TaskStep` level (and the Strategy layer), we remove the burden of "cooperative cancellation" from the user's business logic, enforcing it at the runner level. This makes the system "secure by default" against zombie tasks.
|
package/.jules/sentinel.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
## 2026-06-15 - Graph Traversal DoS
|
|
2
|
+
|
|
2
3
|
**Vulnerability:** Recursive graph traversal (DFS) can lead to Denial of Service via Stack Overflow when processing deep user-supplied graphs.
|
|
3
4
|
**Learning:** Even with large stack limits, recursion is a risk for user-controlled data structures. Node.js stack size is finite.
|
|
4
5
|
**Prevention:** Use iterative algorithms with explicit stacks for graph traversal (e.g., cycle detection).
|
package/.releaserc.json
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"branches": [
|
|
3
|
-
"main"
|
|
4
|
-
],
|
|
2
|
+
"branches": ["main"],
|
|
5
3
|
"plugins": [
|
|
6
4
|
[
|
|
7
5
|
"@semantic-release/commit-analyzer",
|
|
@@ -21,10 +19,7 @@
|
|
|
21
19
|
[
|
|
22
20
|
"@semantic-release/git",
|
|
23
21
|
{
|
|
24
|
-
"assets": [
|
|
25
|
-
"package.json",
|
|
26
|
-
"CHANGELOG.md"
|
|
27
|
-
],
|
|
22
|
+
"assets": ["package.json", "CHANGELOG.md"],
|
|
28
23
|
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
29
24
|
}
|
|
30
25
|
]
|
package/AGENTS.md
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<!-- OPENSPEC:START -->
|
|
2
|
+
|
|
2
3
|
# OpenSpec Instructions
|
|
3
4
|
|
|
4
5
|
These instructions are for AI assistants working in this project.
|
|
5
6
|
|
|
6
7
|
Always open `@/openspec/AGENTS.md` when the request:
|
|
8
|
+
|
|
7
9
|
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
8
10
|
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
9
11
|
- Sounds ambiguous and you need the authoritative spec before coding
|
|
10
12
|
|
|
11
13
|
Use `@/openspec/AGENTS.md` to learn:
|
|
14
|
+
|
|
12
15
|
- How to create and apply change proposals
|
|
13
16
|
- Spec format and conventions
|
|
14
17
|
- Project structure and guidelines
|
|
@@ -18,16 +21,33 @@ Keep this managed block so 'openspec update' can refresh the instructions.
|
|
|
18
21
|
<!-- OPENSPEC:END -->
|
|
19
22
|
|
|
20
23
|
## Additional Rules
|
|
24
|
+
|
|
21
25
|
- Never edit CHANGELOG.md manually. This file is for semantic release and is filled automatically.
|
|
22
26
|
- Avoid using 'any' type at all costs.
|
|
23
27
|
- Always prefer to add more tests instead of simply bypassing coverage validation with comments.
|
|
24
28
|
- Its forbidden to have coverage drop below 100%, thats non negotiable.
|
|
25
29
|
|
|
30
|
+
## Operational Protocols
|
|
31
|
+
|
|
32
|
+
- **Critic-First Generation**: Every code block you generate must undergo an internal "Reflection" pass. Explicitly flag potential race conditions, security flaws (OWASP Top 10), or architectural debt.
|
|
33
|
+
- **Verification Gatekeeping**: You are STRICTLY FORBIDDEN from claiming a task is "finished" until you provide terminal output of a passing test suite, a successful build log and a successful lint log.
|
|
34
|
+
- **Planning Sparring**: For any task >20 lines, you must first output a blueprint and validate it. You will not write implementation code until the user approves the blueprint.
|
|
35
|
+
- **Tool-Augmented Research**: Use `/search` and `/read` to understand the entire context of the project. Do not assume; verify existing utility functions to ensure DRY (Don't Repeat Yourself) compliance.
|
|
36
|
+
- **The Confession Rule**: If you hit a logic error or a hallucination, you must immediately halt and state: "I have identified an inconsist- - **Atomic Commits for Complex Features:** When working on complex multi-task features, you MUST commit after completing each distinct task. Before each commit, ensure that `pnpm build`, `pnpm lint`, and `pnpm test` pass. This creates safe rollback points and prevents restarting the entire feature if issues arise.
|
|
37
|
+
|
|
38
|
+
## Style & Tone
|
|
39
|
+
|
|
40
|
+
- **Tone**: Professional, technical, and high-density.
|
|
41
|
+
- **Zero Politeness Fluff**: No "I'd be happy to," "Great question," etc.
|
|
42
|
+
- **Architectural Comparisons**: Use markdown tables for comparing architectural trade-offs.
|
|
43
|
+
- **Hypothesis Labeling**: Label speculative thoughts clearly as `[ARCHITECTURAL_HYPOTHESIS]`.
|
|
44
|
+
|
|
26
45
|
# task-runner Development Guidelines
|
|
27
46
|
|
|
28
47
|
Auto-generated from all feature plans. Last updated: 2026-01-17
|
|
29
48
|
|
|
30
49
|
## Active Technologies
|
|
50
|
+
|
|
31
51
|
- TypeScript 5.9.3 + vitest 4.0.17 (for testing) (004-pre-execution-validation)
|
|
32
52
|
- TypeScript 5.9.3 + vitest 4.0.17, AbortSignal/AbortController (standard Web APIs) (002-task-cancellation)
|
|
33
53
|
- N/A (in-memory context object) (002-task-cancellation)
|
|
@@ -53,22 +73,7 @@ tests/
|
|
|
53
73
|
: Follow standard conventions
|
|
54
74
|
|
|
55
75
|
## Recent Changes
|
|
76
|
+
|
|
56
77
|
- 005-concurrency-control: Added TypeScript 5.9.3 + vitest 4.0.17
|
|
57
78
|
- 002-task-cancellation: Added TypeScript 5.9.3 + vitest 4.0.17, AbortSignal/AbortController (standard Web APIs)
|
|
58
79
|
- 004-pre-execution-validation: Added TypeScript 5.9.3 + vitest 4.0.17 (for testing)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<!-- MANUAL ADDITIONS START -->
|
|
63
|
-
- **Atomic Commits for Complex Features:** When working on complex multi-task features, you MUST commit after completing each distinct task. Before each commit, ensure that `pnpm build`, `pnpm lint`, and `pnpm test` pass. This creates safe rollback points and prevents restarting the entire feature if issues arise.
|
|
64
|
-
- Never edit CHANGELOG.md manually. This file is for semantic release and is filled automatically.
|
|
65
|
-
|
|
66
|
-
Before marking a task as concluded, YOU MUST:
|
|
67
|
-
|
|
68
|
-
1. run pnpm install
|
|
69
|
-
2. run pnpm build
|
|
70
|
-
3. run pnpm test
|
|
71
|
-
4. run pnpm lint
|
|
72
|
-
|
|
73
|
-
If any of those command fail, review your changes.
|
|
74
|
-
<!-- MANUAL ADDITIONS END -->
|