@calmo/task-runner 3.8.3 → 4.0.4
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/.agent/workflows/openspec-apply.md +20 -0
- package/.agent/workflows/openspec-archive.md +24 -0
- package/.agent/workflows/openspec-proposal.md +25 -0
- package/.github/workflows/release-please.yml +46 -0
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/.release-please-manifest.json +3 -0
- package/AGENTS.md +2 -4
- package/CHANGELOG.md +109 -0
- package/README.md +1 -1
- package/dist/TaskGraphValidator.js +2 -4
- package/dist/TaskGraphValidator.js.map +1 -1
- package/openspec/changes/adopt-release-pr/design.md +40 -0
- package/openspec/changes/adopt-release-pr/proposal.md +47 -0
- package/openspec/changes/adopt-release-pr/specs/release-pr/spec.md +34 -0
- package/openspec/changes/adopt-release-pr/tasks.md +14 -0
- package/openspec/changes/archive/2026-01-18-add-concurrency-control/specs/task-runner/spec.md +26 -0
- package/openspec/changes/archive/2026-01-18-add-external-task-cancellation/specs/task-runner/spec.md +63 -0
- package/openspec/changes/archive/2026-01-18-add-integration-tests/specs/task-runner/spec.md +22 -0
- package/openspec/changes/archive/2026-01-18-add-task-retry-policy/specs/task-runner/spec.md +40 -0
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/specs/task-runner/spec.md +25 -0
- package/openspec/changes/archive/2026-01-18-refactor-core-architecture/specs/task-runner/spec.md +31 -0
- package/openspec/changes/feat-continue-on-error/proposal.md +20 -0
- package/openspec/changes/feat-continue-on-error/tasks.md +17 -0
- package/openspec/changes/feat-per-task-timeout/specs/task-runner/spec.md +34 -0
- package/openspec/changes/feat-task-metrics/specs/001-generic-task-runner/spec.md +13 -0
- package/openspec/specs/task-runner/spec.md +162 -0
- package/package.json +11 -20
- package/release-please-config.json +9 -0
- package/src/TaskGraphValidator.ts +2 -4
- package/.gemini/commands/speckit.analyze.toml +0 -188
- package/.gemini/commands/speckit.checklist.toml +0 -298
- package/.gemini/commands/speckit.clarify.toml +0 -185
- package/.gemini/commands/speckit.constitution.toml +0 -86
- package/.gemini/commands/speckit.implement.toml +0 -139
- package/.gemini/commands/speckit.plan.toml +0 -93
- package/.gemini/commands/speckit.specify.toml +0 -262
- package/.gemini/commands/speckit.tasks.toml +0 -141
- package/.gemini/commands/speckit.taskstoissues.toml +0 -34
- package/.github/workflows/release.yml +0 -46
- package/.releaserc.json +0 -27
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/coverage-final.json +0 -15
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -146
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/EventBus.ts.html +0 -379
- package/coverage/lcov-report/src/ExecutionConstants.ts.html +0 -121
- package/coverage/lcov-report/src/TaskGraphValidationError.ts.html +0 -130
- package/coverage/lcov-report/src/TaskGraphValidator.ts.html +0 -649
- package/coverage/lcov-report/src/TaskRunner.ts.html +0 -706
- package/coverage/lcov-report/src/TaskRunnerBuilder.ts.html +0 -337
- package/coverage/lcov-report/src/TaskRunnerExecutionConfig.ts.html +0 -154
- package/coverage/lcov-report/src/TaskStateManager.ts.html +0 -529
- package/coverage/lcov-report/src/WorkflowExecutor.ts.html +0 -712
- package/coverage/lcov-report/src/contracts/ErrorTypes.ts.html +0 -103
- package/coverage/lcov-report/src/contracts/RunnerEvents.ts.html +0 -217
- package/coverage/lcov-report/src/contracts/index.html +0 -131
- package/coverage/lcov-report/src/index.html +0 -236
- package/coverage/lcov-report/src/strategies/DryRunExecutionStrategy.ts.html +0 -178
- package/coverage/lcov-report/src/strategies/RetryingExecutionStrategy.ts.html +0 -373
- package/coverage/lcov-report/src/strategies/StandardExecutionStrategy.ts.html +0 -190
- package/coverage/lcov-report/src/strategies/index.html +0 -146
- package/coverage/lcov.info +0 -671
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/coverage/src/EventBus.ts.html +0 -379
- package/coverage/src/ExecutionConstants.ts.html +0 -121
- package/coverage/src/TaskGraphValidationError.ts.html +0 -130
- package/coverage/src/TaskGraphValidator.ts.html +0 -649
- package/coverage/src/TaskRunner.ts.html +0 -706
- package/coverage/src/TaskRunnerBuilder.ts.html +0 -337
- package/coverage/src/TaskRunnerExecutionConfig.ts.html +0 -154
- package/coverage/src/TaskStateManager.ts.html +0 -529
- package/coverage/src/WorkflowExecutor.ts.html +0 -712
- package/coverage/src/contracts/ErrorTypes.ts.html +0 -103
- package/coverage/src/contracts/RunnerEvents.ts.html +0 -217
- package/coverage/src/contracts/index.html +0 -131
- package/coverage/src/index.html +0 -236
- package/coverage/src/strategies/DryRunExecutionStrategy.ts.html +0 -178
- package/coverage/src/strategies/RetryingExecutionStrategy.ts.html +0 -373
- package/coverage/src/strategies/StandardExecutionStrategy.ts.html +0 -190
- package/coverage/src/strategies/index.html +0 -146
- package/test-report.xml +0 -299
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implement an approved OpenSpec change and keep tasks in sync.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
|
|
10
|
+
**Steps**
|
|
11
|
+
Track these steps as TODOs and complete them one by one.
|
|
12
|
+
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
|
|
13
|
+
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
|
|
14
|
+
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
|
|
15
|
+
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
|
|
16
|
+
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
|
|
17
|
+
|
|
18
|
+
**Reference**
|
|
19
|
+
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
|
|
20
|
+
<!-- OPENSPEC:END -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Archive a deployed OpenSpec change and update specs.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
|
|
10
|
+
**Steps**
|
|
11
|
+
1. Determine the change ID to archive:
|
|
12
|
+
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
|
|
13
|
+
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
|
|
14
|
+
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
|
|
15
|
+
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
|
|
16
|
+
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
|
|
17
|
+
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
|
|
18
|
+
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
|
|
19
|
+
5. Validate with `openspec validate --strict --no-interactive` and inspect with `openspec show <id>` if anything looks off.
|
|
20
|
+
|
|
21
|
+
**Reference**
|
|
22
|
+
- Use `openspec list` to confirm change IDs before archiving.
|
|
23
|
+
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
|
|
24
|
+
<!-- OPENSPEC:END -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scaffold a new OpenSpec change and validate strictly.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
|
|
10
|
+
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.
|
|
11
|
+
|
|
12
|
+
**Steps**
|
|
13
|
+
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
|
|
14
|
+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
|
|
15
|
+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
|
|
16
|
+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
|
|
17
|
+
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
|
|
18
|
+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
|
|
19
|
+
7. Validate with `openspec validate <id> --strict --no-interactive` and resolve every issue before sharing the proposal.
|
|
20
|
+
|
|
21
|
+
**Reference**
|
|
22
|
+
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
|
|
23
|
+
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
|
|
24
|
+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
|
|
25
|
+
<!-- OPENSPEC:END -->
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: release-please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: googleapis/release-please-action@v4
|
|
18
|
+
id: release
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
target-branch: main
|
|
22
|
+
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
25
|
+
|
|
26
|
+
- name: Setup pnpm
|
|
27
|
+
uses: pnpm/action-setup@v4
|
|
28
|
+
with:
|
|
29
|
+
version: 10.28.0
|
|
30
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
31
|
+
|
|
32
|
+
- uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: "lts/*"
|
|
35
|
+
registry-url: "https://registry.npmjs.org"
|
|
36
|
+
cache: "pnpm"
|
|
37
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
38
|
+
|
|
39
|
+
- run: pnpm install --frozen-lockfile
|
|
40
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
41
|
+
|
|
42
|
+
- run: pnpm build
|
|
43
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
44
|
+
|
|
45
|
+
- run: pnpm publish --no-git-checks
|
|
46
|
+
if: ${{ steps.release.outputs.release_created }}
|
package/.husky/commit-msg
CHANGED
|
File without changes
|
package/.husky/pre-commit
CHANGED
|
File without changes
|
package/AGENTS.md
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<!-- OPENSPEC:START -->
|
|
2
|
-
|
|
3
2
|
# OpenSpec Instructions
|
|
4
3
|
|
|
5
4
|
These instructions are for AI assistants working in this project.
|
|
6
5
|
|
|
7
6
|
Always open `@/openspec/AGENTS.md` when the request:
|
|
8
|
-
|
|
9
7
|
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
10
8
|
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
11
9
|
- Sounds ambiguous and you need the authoritative spec before coding
|
|
12
10
|
|
|
13
11
|
Use `@/openspec/AGENTS.md` to learn:
|
|
14
|
-
|
|
15
12
|
- How to create and apply change proposals
|
|
16
13
|
- Spec format and conventions
|
|
17
14
|
- Project structure and guidelines
|
|
18
|
-
- When creating specs or docs, add a prefix "docs:" to your commit to avoid triggering a new module version
|
|
19
15
|
|
|
20
16
|
Keep this managed block so 'openspec update' can refresh the instructions.
|
|
21
17
|
|
|
@@ -27,6 +23,8 @@ Keep this managed block so 'openspec update' can refresh the instructions.
|
|
|
27
23
|
- Avoid using 'any' type at all costs.
|
|
28
24
|
- Always prefer to add more tests instead of simply bypassing coverage validation with comments.
|
|
29
25
|
- Its forbidden to have coverage drop below 100%, thats non negotiable.
|
|
26
|
+
- **Strict Null Safety:** Do not use `??` or optional chaining `?.` when you can guarantee existence via prior validation. Use non-null assertions `!` only when the invariant is locally provable or enforced by a validator.
|
|
27
|
+
- **Dead Code Elimination:** Avoid `v8 ignore` comments. If code is unreachable, restructure the logic to prove it is unreachable to the compiler, or remove the branch if the invariant is guaranteed.
|
|
30
28
|
|
|
31
29
|
## Operational Protocols
|
|
32
30
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## <small>3.8.4 (2026-01-21)</small>
|
|
2
|
+
|
|
3
|
+
* fix: 🛰️ Sonar Specialist: Fix dead code in `TaskGraphValidator` (#93) ([b760765](https://github.com/thalesraymond/task-runner/commit/b760765)), closes [#93](https://github.com/thalesraymond/task-runner/issues/93)
|
|
4
|
+
* docs: add Continue On Error feature proposal (#94) ([2a658fb](https://github.com/thalesraymond/task-runner/commit/2a658fb)), closes [#94](https://github.com/thalesraymond/task-runner/issues/94)
|
|
5
|
+
|
|
1
6
|
## <small>3.8.3 (2026-01-21)</small>
|
|
2
7
|
|
|
3
8
|
* fix: 🐛 trigger ci ([27f6121](https://github.com/thalesraymond/task-runner/commit/27f6121))
|
|
@@ -13,6 +18,110 @@
|
|
|
13
18
|
* refactor: Refactor TaskRunner to reduce cognitive complexity (#89) ([95c67d9](https://github.com/thalesraymond/task-runner/commit/95c67d9)), closes [#89](https://github.com/thalesraymond/task-runner/issues/89)
|
|
14
19
|
* Refactor TaskGraphValidator to address SonarCloud issues (#88) ([77c1538](https://github.com/thalesraymond/task-runner/commit/77c1538)), closes [#88](https://github.com/thalesraymond/task-runner/issues/88)
|
|
15
20
|
|
|
21
|
+
## [4.0.4](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.3...task-runner-v4.0.4) (2026-01-22)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* 🐛 id-token: writ ([39fbc2b](https://github.com/thalesraymond/task-runner/commit/39fbc2bc83d448cd2385a2c71089832f61f4b3e3))
|
|
27
|
+
|
|
28
|
+
## [4.0.3](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.2...task-runner-v4.0.3) (2026-01-22)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* 🐛 remove npm token (depoys is based on trust setting) ([872d42a](https://github.com/thalesraymond/task-runner/commit/872d42ad35524757f0974e5b46b54b9abf10d7c8))
|
|
34
|
+
|
|
35
|
+
## [4.0.2](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.1...task-runner-v4.0.2) (2026-01-22)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* 🐛 using new action (remove deprecated warning) ([6238bbd](https://github.com/thalesraymond/task-runner/commit/6238bbdfd7689468e4eb650c427848fae8f2d674))
|
|
41
|
+
|
|
42
|
+
## [4.0.1](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.0...task-runner-v4.0.1) (2026-01-22)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* 🐛 test ci ([0137225](https://github.com/thalesraymond/task-runner/commit/013722547a31d5429f3024ba21eeefba0fbfc426))
|
|
48
|
+
|
|
49
|
+
## [4.0.0](https://github.com/thalesraymond/task-runner/compare/task-runner-v3.8.4...task-runner-v4.0.0) (2026-01-22)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### ⚠ BREAKING CHANGES
|
|
53
|
+
|
|
54
|
+
* 🧨 Major refactor in the engine, added strategy pattern support
|
|
55
|
+
* **security:** none
|
|
56
|
+
* **security:** none
|
|
57
|
+
* **security:** none
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* 🎸 Generating 3.0.0 since automation wrongly skiped ([c545f25](https://github.com/thalesraymond/task-runner/commit/c545f25be8c689d4a0b518f71635d5b6303b2c64))
|
|
62
|
+
* 🎸 new conditional execution feature ([e936ad7](https://github.com/thalesraymond/task-runner/commit/e936ad71acf5fa3c744b4fa7984f6c7665f75e32))
|
|
63
|
+
* add CI workflow and restore dependabot ([57ae940](https://github.com/thalesraymond/task-runner/commit/57ae940d3dde2adf2de362a48b635def7de2fa7a))
|
|
64
|
+
* add CI workflow and restore dependabot ([48ec98b](https://github.com/thalesraymond/task-runner/commit/48ec98b075feb4bb7e8d339105afdbcb0b5f0fa3))
|
|
65
|
+
* add CI workflow and restore dependabot ([9263c43](https://github.com/thalesraymond/task-runner/commit/9263c43466ee43dd5e07a4edbd9f2ca0b49015e6))
|
|
66
|
+
* add CI workflow for build, lint, and test ([6f97dc0](https://github.com/thalesraymond/task-runner/commit/6f97dc0ee6d1f09de5ddedc64aca73d257e4bc65))
|
|
67
|
+
* add CI workflow for build, lint, and test ([a03422e](https://github.com/thalesraymond/task-runner/commit/a03422ea9ab18cb9f38d8fde58a64c4ce982ff7f))
|
|
68
|
+
* add concurrency control to TaskRunner ([90c2b6f](https://github.com/thalesraymond/task-runner/commit/90c2b6fc7466d9b63820c190e73cc4e96f557335))
|
|
69
|
+
* add concurrency control to TaskRunner ([2a8dfd2](https://github.com/thalesraymond/task-runner/commit/2a8dfd2e825f4802030723c26cf83a51037b99c7))
|
|
70
|
+
* add issue templates ([6ff97f1](https://github.com/thalesraymond/task-runner/commit/6ff97f1140f4de2f3c4a02bd98579474af0893fe))
|
|
71
|
+
* add task priority for concurrency scheduling ([#87](https://github.com/thalesraymond/task-runner/issues/87)) ([43bb6b4](https://github.com/thalesraymond/task-runner/commit/43bb6b4e381dd822358f0e573bfd414a5356d8a5))
|
|
72
|
+
* add task retry policy ([81d4bd3](https://github.com/thalesraymond/task-runner/commit/81d4bd3567a7c4542ba35e311a1a19dd7da7b904))
|
|
73
|
+
* add workflow preview and dry-run capabilities ([e1ccda9](https://github.com/thalesraymond/task-runner/commit/e1ccda9f23e13befd4221cd95b7acfd5500d0e66))
|
|
74
|
+
* add workflow preview and dry-run capabilities ([138f4ae](https://github.com/thalesraymond/task-runner/commit/138f4ae2761d992f111cc108612f4d81b06f6a41))
|
|
75
|
+
* add workflow state persistence proposal ([b62769e](https://github.com/thalesraymond/task-runner/commit/b62769ed128f3c77efb88532c2d2a5d971f0f751))
|
|
76
|
+
* configure semantic-release for automated releases ([fa13bf5](https://github.com/thalesraymond/task-runner/commit/fa13bf5a42f9eb4a4c65aebca28c1b11ff36b618))
|
|
77
|
+
* Implement generic task runner with dependency management and parallel execution ([e0c8bf9](https://github.com/thalesraymond/task-runner/commit/e0c8bf9d3fe8bd7aa14ebb442752e02600c7332e))
|
|
78
|
+
* implement Observer Pattern event system in TaskRunner ([d682983](https://github.com/thalesraymond/task-runner/commit/d682983ebb2aa72eefb05ec06382b206f35473cc))
|
|
79
|
+
* implement Observer Pattern event system in TaskRunner ([48bd3d0](https://github.com/thalesraymond/task-runner/commit/48bd3d0c83bf76dacceee4bb105beb0365816f1c))
|
|
80
|
+
* **implement:** complete file structure refactor ([7764e43](https://github.com/thalesraymond/task-runner/commit/7764e4336effdb8098d4c29c7df5ab10df3d0997))
|
|
81
|
+
* **implement:** complete file structure refactor and cleanup ([372ca8b](https://github.com/thalesraymond/task-runner/commit/372ca8b3703f5e4b3aa14754165ab0fff9451c05))
|
|
82
|
+
* initialize project with TypeScript, Vitest, and basic sum function ([02dd759](https://github.com/thalesraymond/task-runner/commit/02dd75989bfc7a4e9d1f1360fe334284dafd021a))
|
|
83
|
+
* **plan:** create technical plan for file refactor ([29d2a97](https://github.com/thalesraymond/task-runner/commit/29d2a97e0b8b1d98caa27467bf4e865c987e5371))
|
|
84
|
+
* pre-validation of task graph for cycles and missing deps ([4680c1b](https://github.com/thalesraymond/task-runner/commit/4680c1b076abcbd5349129b2ac5db19b4585eec7)), closes [#004](https://github.com/thalesraymond/task-runner/issues/004)
|
|
85
|
+
* **specs:** add spec for file structure refactor ([884c551](https://github.com/thalesraymond/task-runner/commit/884c5512cf9267b4c10a42053019a72abf624650))
|
|
86
|
+
* **tasks:** create tasks for file structure refactor ([3b99e22](https://github.com/thalesraymond/task-runner/commit/3b99e2269220d740ca552733c4bcb41b74bc8108))
|
|
87
|
+
* throw TaskGraphValidationError on validation failure ([35a4e91](https://github.com/thalesraymond/task-runner/commit/35a4e91e66beb7d0660b4059740f4067ab4f2af2))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Bug Fixes
|
|
91
|
+
|
|
92
|
+
* 🐛 fix sanitization of mermaid function ([b09db63](https://github.com/thalesraymond/task-runner/commit/b09db63b2fdad55c5cfb197ce6009cb81a8604f5))
|
|
93
|
+
* 🐛 fixing commit script and adding a fix to test auto relea ([97cedf4](https://github.com/thalesraymond/task-runner/commit/97cedf4acda6c84db02be4549bf0eb7cbc3a4c16))
|
|
94
|
+
* 🐛 trigger ci ([27f6121](https://github.com/thalesraymond/task-runner/commit/27f61216f6aad326409ac4ded114e79c8b9fbd61))
|
|
95
|
+
* 🛡️ Sentinel: Fix Mermaid graph identifier sanitization ([#81](https://github.com/thalesraymond/task-runner/issues/81)) ([a8bebe3](https://github.com/thalesraymond/task-runner/commit/a8bebe3577e2b3f96aaa759bc6eff91b173b5785))
|
|
96
|
+
* 🛰️ Sonar Specialist: Fix dead code in `TaskGraphValidator` ([#93](https://github.com/thalesraymond/task-runner/issues/93)) ([b760765](https://github.com/thalesraymond/task-runner/commit/b76076593cb80f414868872248fad4a8e503f8bd))
|
|
97
|
+
* add file extensions and types to test file to fix CI errors ([54b186f](https://github.com/thalesraymond/task-runner/commit/54b186f7e1bce6e79e2e8ef3b7a501d1be28b467))
|
|
98
|
+
* address PR comments on sonar config ([6eab0b5](https://github.com/thalesraymond/task-runner/commit/6eab0b52fa420bcb26f64737f2915fe20867603d))
|
|
99
|
+
* address PR comments on sonar config ([156eea0](https://github.com/thalesraymond/task-runner/commit/156eea041a1713de20cea3f0e4bac132e4f81649))
|
|
100
|
+
* address pr feedback ([4a23576](https://github.com/thalesraymond/task-runner/commit/4a2357650012fe9e48baa98222576346a2ce1f79))
|
|
101
|
+
* address pr feedback ([97cf83f](https://github.com/thalesraymond/task-runner/commit/97cf83ffa22dba3972a275f99b7eb4da4c012878))
|
|
102
|
+
* change singleQuote option to false in Prettier configuration ([94625a3](https://github.com/thalesraymond/task-runner/commit/94625a3084ee1d6ae218990bf3e9bb5138002415))
|
|
103
|
+
* correct syntax errors in README.md examples and improve context hydration explanation ([98e3a5a](https://github.com/thalesraymond/task-runner/commit/98e3a5abd25e8856aa0c4458e8b7c8555b01a887))
|
|
104
|
+
* **EventBus:** fix lint errors in test file ([86b3ad8](https://github.com/thalesraymond/task-runner/commit/86b3ad86584372552c757ecaf9e47b8ffdec3cb5))
|
|
105
|
+
* **EventBus:** handle floating promises ([#90](https://github.com/thalesraymond/task-runner/issues/90)) ([9872c37](https://github.com/thalesraymond/task-runner/commit/9872c376b912014a73ef180e426d2de5ca771c76))
|
|
106
|
+
* **EventBus:** handle unhandled promise rejections in event listeners ([5f5235a](https://github.com/thalesraymond/task-runner/commit/5f5235adde48f4ce738fe89cad27ddc1023a4445))
|
|
107
|
+
* Fix missing event emission on task cancellation ([#92](https://github.com/thalesraymond/task-runner/issues/92)) ([3d7e7aa](https://github.com/thalesraymond/task-runner/commit/3d7e7aa191686520f0f6d2e721cf1ec2bf7ac983))
|
|
108
|
+
* remove any type usage in TaskRunner to satisfy linter ([b0a21a7](https://github.com/thalesraymond/task-runner/commit/b0a21a748bdf8fb71e14f7ea3a83937b5a36cb2f))
|
|
109
|
+
* remove unreachable code and verify single execution in concurrency logic ([7255cee](https://github.com/thalesraymond/task-runner/commit/7255cee7c686431a4cac0db5e26f2f12e85ea849))
|
|
110
|
+
* resolve linting errors and verify concurrency control ([9ed2585](https://github.com/thalesraymond/task-runner/commit/9ed2585fb2f712c7210fae84dba70152b9ab7169))
|
|
111
|
+
* revert unauthorized changes to package.json and tsconfig.test.json ([cd44f9e](https://github.com/thalesraymond/task-runner/commit/cd44f9e38451a608a73d201624e675612e7b93af))
|
|
112
|
+
* **security:** replace recursive cycle detection with iterative DFS ([2d2e395](https://github.com/thalesraymond/task-runner/commit/2d2e395aab9306610af03ba4b1305ad448d69d63))
|
|
113
|
+
* **security:** replace recursive cycle detection with iterative DFS ([1e2d7ca](https://github.com/thalesraymond/task-runner/commit/1e2d7ca1704ae288fc54258df698621ecab2eceb))
|
|
114
|
+
* **security:** replace recursive cycle detection with iterative DFS ([292947f](https://github.com/thalesraymond/task-runner/commit/292947f67aa8e64adf62bd23c56f1ce06766c16f))
|
|
115
|
+
* standardize quotes and formatting in dependabot configuration ([ab2d7fa](https://github.com/thalesraymond/task-runner/commit/ab2d7fa2bb14c17b300bca64d0c29711bcc0d5f5))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Performance Improvements
|
|
119
|
+
|
|
120
|
+
* **executor:** optimize processQueue loop using pending set ([2924700](https://github.com/thalesraymond/task-runner/commit/2924700cfc161af1500190395d5043a9249388f8))
|
|
121
|
+
* Make event listeners async to prevent blocking ([1f8728f](https://github.com/thalesraymond/task-runner/commit/1f8728f4bd9735868c942223548f13ffc9fb98d5))
|
|
122
|
+
* Make event listeners async to prevent blocking ([a52f8d0](https://github.com/thalesraymond/task-runner/commit/a52f8d09827c27b78a07f342a56c392460f89668))
|
|
123
|
+
* optimize task scheduling to prevent pipeline stalls ([37c52f7](https://github.com/thalesraymond/task-runner/commit/37c52f7ce78b1ee1d8483d4b2c33bd73e585850f))
|
|
124
|
+
|
|
16
125
|
## 3.8.0 (2026-01-21)
|
|
17
126
|
|
|
18
127
|
* feat: add task priority for concurrency scheduling (#87) ([43bb6b4](https://github.com/thalesraymond/task-runner/commit/43bb6b4)), closes [#87](https://github.com/thalesraymond/task-runner/issues/87) [#74](https://github.com/thalesraymond/task-runner/issues/74)
|
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ When calling `execute`, you can provide a configuration object:
|
|
|
120
120
|
- **signal**: Accepts an `AbortSignal` to cancel the workflow programmatically.
|
|
121
121
|
- **dryRun**: Overrides the current strategy with `DryRunExecutionStrategy` for this execution.
|
|
122
122
|
|
|
123
|
-
```typescript
|
|
123
|
+
```typescript
|
|
124
124
|
await runner.execute(steps, {
|
|
125
125
|
concurrency: 2,
|
|
126
126
|
dryRun: true
|
|
@@ -103,8 +103,7 @@ export class TaskGraphValidator {
|
|
|
103
103
|
stack.push({
|
|
104
104
|
taskId: startTaskId,
|
|
105
105
|
index: 0,
|
|
106
|
-
|
|
107
|
-
dependencies: adjacencyList.get(startTaskId) ?? [],
|
|
106
|
+
dependencies: adjacencyList.get(startTaskId),
|
|
108
107
|
});
|
|
109
108
|
while (stack.length > 0) {
|
|
110
109
|
const frame = stack[stack.length - 1];
|
|
@@ -124,8 +123,7 @@ export class TaskGraphValidator {
|
|
|
124
123
|
stack.push({
|
|
125
124
|
taskId: dependenceId,
|
|
126
125
|
index: 0,
|
|
127
|
-
|
|
128
|
-
dependencies: adjacencyList.get(dependenceId) ?? [],
|
|
126
|
+
dependencies: adjacencyList.get(dependenceId),
|
|
129
127
|
});
|
|
130
128
|
}
|
|
131
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskGraphValidator.js","sourceRoot":"","sources":["../src/TaskGraphValidator.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,OAAO,kBAAkB;IAC7B;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAoB;QAC3B,MAAM,MAAM,GAAsB,EAAE,CAAC;QAErC,+BAA+B;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAE5D,oCAAoC;QACpC,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE1D,sBAAsB;QACtB,8GAA8G;QAC9G,MAAM,sBAAsB,GAAG,MAAM,CAAC,IAAI,CACxC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAw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AAG,CAAC,YAAY,CAAC,CAAC;oBAC1B,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBACjC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;oBAExB,KAAK,CAAC,IAAI,CAAC;wBACT,MAAM,EAAE,YAAY;wBACpB,KAAK,EAAE,CAAC;wBACR,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAE;qBAC/C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,0CAA0C;gBAC1C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;gBACX,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Design: Release PR Pattern
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
The current system uses `semantic-release` within a GitHub Actions workflow (`release.yml`). This workflow triggers on every push to `main`, executing an immediate release (version bump, changelog, git tag, npm publish, github release). This leads to high frequency "version explosion" in a trunk-based high-velocity environment.
|
|
5
|
+
|
|
6
|
+
## Solution
|
|
7
|
+
We will adopt the **Release PR Pattern** using **Release Please**.
|
|
8
|
+
|
|
9
|
+
### Architecture
|
|
10
|
+
- **Tool**: `googleapis/release-please-action`.
|
|
11
|
+
- **Trigger**: Pushes to `main`.
|
|
12
|
+
- **Mechanism**:
|
|
13
|
+
1. **Analysis**: The action analyzes commits since the last tagged version.
|
|
14
|
+
2. **PR Creation**: It creates (or updates) a special Pull Request containing:
|
|
15
|
+
- The proposed next version numbers.
|
|
16
|
+
- The generated CHANGELOG entry.
|
|
17
|
+
3. **Release**:
|
|
18
|
+
- When the Release PR is **merged**, the action runs again.
|
|
19
|
+
- It detects the accidental merge of the release commit.
|
|
20
|
+
- It creates the GitHub Release and Tags.
|
|
21
|
+
- It outputs a `release_created` boolean.
|
|
22
|
+
4. **Publish**:
|
|
23
|
+
- A downstream step in the same workflow listens for `if: ${{ steps.release.outputs.release_created }}`.
|
|
24
|
+
- If true, it executes the build and publish commands (e.g., `pnpm publish`).
|
|
25
|
+
|
|
26
|
+
### Migration Strategy
|
|
27
|
+
1. **Cleanup**: Completely remove `semantic-release` configuration and workflow to prevent dual-release mechanisms or conflicts.
|
|
28
|
+
2. **Configuration**:
|
|
29
|
+
- `release-please-config.json`: Defines the release type (`node`), packages (for monorepo support, though this is seemingly a single package config, using the root as the package is standard).
|
|
30
|
+
- `.release-please-manifest.json`: Stores the current version (source of truth for Release Please). We will initialize it with the current version from `package.json`.
|
|
31
|
+
3. **Workflow**:
|
|
32
|
+
- Replace `.github/workflows/release.yml` with `.github/workflows/release-please.yml`.
|
|
33
|
+
|
|
34
|
+
### Key Differences
|
|
35
|
+
| Feature | Old (Semantic Release) | New (Release Please) |
|
|
36
|
+
| :------------ | :--------------------- | :---------------------------------- |
|
|
37
|
+
| **Trigger** | Every push to `main` | Merge of Release PR |
|
|
38
|
+
| **Changelog** | Generated on commit | Previewed in PR, committed on merge |
|
|
39
|
+
| **Version** | Bumped on commit | Bumped in PR, committed on merge |
|
|
40
|
+
| **Control** | Automated | Manual approval via Merge |
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Proposal: Adopt Release PR Pattern
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Switch from "continuous deployment on every commit" to the **Release PR Pattern** (Google Style) using [Release Please](https://github.com/google-github-actions/release-please-action).
|
|
5
|
+
This ensures that releases are batched, version explosion is prevented, and human control is restored via PR merges, while maintaining automation.
|
|
6
|
+
|
|
7
|
+
## User Review Required
|
|
8
|
+
> [!IMPORTANT]
|
|
9
|
+
> This is a breaking change to the release process.
|
|
10
|
+
> - **Current Behavior**: Every commit to `main` triggers a release/publish.
|
|
11
|
+
> - **New Behavior**: Commits to `main` update a "Release PR". A release only happens when you **merge** that PR.
|
|
12
|
+
|
|
13
|
+
## Proposed Changes
|
|
14
|
+
|
|
15
|
+
### Configuration
|
|
16
|
+
#### [DELETE] [.releaserc.json](file:///home/thales/projects/task-runner/.releaserc.json)
|
|
17
|
+
- Remove Semantic Release configuration.
|
|
18
|
+
|
|
19
|
+
#### [NEW] [release-please-config.json](file:///home/thales/projects/task-runner/release-please-config.json)
|
|
20
|
+
- Configuration for Release Please (monorepo-friendly structure, standard conventional commits).
|
|
21
|
+
|
|
22
|
+
#### [NEW] [.release-please-manifest.json](file:///home/thales/projects/task-runner/.release-please-manifest.json)
|
|
23
|
+
- Tracks versions (required for Release Please).
|
|
24
|
+
|
|
25
|
+
### Infra / CI
|
|
26
|
+
#### [DELETE] [.github/workflows/release.yml](file:///home/thales/projects/task-runner/.github/workflows/release.yml)
|
|
27
|
+
- Remove successful `semantic-release` workflow.
|
|
28
|
+
|
|
29
|
+
#### [NEW] [.github/workflows/release-please.yml](file:///home/thales/projects/task-runner/.github/workflows/release-please.yml)
|
|
30
|
+
- New GitHub Action workflow that:
|
|
31
|
+
1. Runs `release-please` to update the PR.
|
|
32
|
+
2. If a release is created (PR merged), runs build/publish steps.
|
|
33
|
+
|
|
34
|
+
## Verification Plan
|
|
35
|
+
|
|
36
|
+
### Automated Tests
|
|
37
|
+
- **Dry Run**: We cannot easily "test" the GitHub Action without merging, but we can verify the configuration files are valid JSON.
|
|
38
|
+
- **Lint**: Ensure new workflow file syntax is valid (tools like `action-validator` if available, otherwise manual review).
|
|
39
|
+
|
|
40
|
+
### Manual Verification
|
|
41
|
+
- **Post-Merge**:
|
|
42
|
+
1. Push a `fix: test` commit to `main`.
|
|
43
|
+
2. Verify `release-please` bot creates a PR "chore: release 1.0.1".
|
|
44
|
+
3. Push another `feat: cool` commit.
|
|
45
|
+
4. Verify PR updates to includes the feature.
|
|
46
|
+
5. Merge the PR.
|
|
47
|
+
6. Verify GitHub Release created and NPM publish (if configured).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Spec: Release PR Pattern
|
|
2
|
+
|
|
3
|
+
## ADDED Requirements
|
|
4
|
+
|
|
5
|
+
### Requirement: Release PR Generation
|
|
6
|
+
The system MUST automatically maintain a "Release PR" that targets the `main` branch. This PR must accumulate all conventional changes since the last release, calculating the next semantic version and generating a corresponding changelog entry.
|
|
7
|
+
|
|
8
|
+
#### Scenario: Feature commit triggers PR update
|
|
9
|
+
Given the latest release is `v1.0.0`
|
|
10
|
+
And a developer merges a commit with message `feat: add awesome feature` to `main`
|
|
11
|
+
Then the system should create or update the Release PR
|
|
12
|
+
And the PR title should be `chore: release 1.1.0`
|
|
13
|
+
And the PR body should contain the changelog entry for "add awesome feature"
|
|
14
|
+
And the `package.json` version in the PR should be `1.1.0`
|
|
15
|
+
|
|
16
|
+
#### Scenario: Fix commit triggers patch update
|
|
17
|
+
Given the latest release is `v1.0.0`
|
|
18
|
+
And a developer merges a commit `fix: urgent bug` to `main`
|
|
19
|
+
Then the Release PR should be updated to target version `1.0.1`
|
|
20
|
+
|
|
21
|
+
### Requirement: Release Publication
|
|
22
|
+
The system MUST execute the release process (git tag, GitHub Release, npm publish) ONLY when the Release PR is merged into `main`.
|
|
23
|
+
|
|
24
|
+
#### Scenario: Merge triggers publish
|
|
25
|
+
Given the Release PR for `v1.1.0` exists
|
|
26
|
+
When a maintainer merges the PR into `main`
|
|
27
|
+
Then the system should create a GitHub Release `v1.1.0`
|
|
28
|
+
And the system should publish the package to the configured registry (NPM)
|
|
29
|
+
And the system should NOT publish any other commits merged to `main` until the next Release PR merge
|
|
30
|
+
|
|
31
|
+
## REMOVED Requirements
|
|
32
|
+
|
|
33
|
+
### Requirement: Immediate Release
|
|
34
|
+
The system MUST NOT trigger a release or publish artifacts on every commit to `main`, unless that commit is the merge of a Release PR.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
- [x] Remove Semantic Release configuration <!-- id: 0 -->
|
|
2
|
+
- Delete `.releaserc.json`
|
|
3
|
+
- Remove `release.yml`
|
|
4
|
+
- Uninstall `semantic-release` and its plugins
|
|
5
|
+
- [x] Initialize Release Please configuration <!-- id: 1 -->
|
|
6
|
+
- Create `release-please-config.json` (root package type: node)
|
|
7
|
+
- Create `.release-please-manifest.json` (synced with current package.json version)
|
|
8
|
+
- [x] Create Release Workflow <!-- id: 2 -->
|
|
9
|
+
- Create `.github/workflows/release-please.yml`
|
|
10
|
+
- Step 1: `googleapis/release-please-action`
|
|
11
|
+
- Step 2: `pnpm publish` (conditional on release creation)
|
|
12
|
+
- [x] Verification <!-- id: 3 -->
|
|
13
|
+
- Validate CI YAML syntax
|
|
14
|
+
- Verify JSON config validity
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Concurrency Limit
|
|
4
|
+
|
|
5
|
+
The `WorkflowExecutor` SHALL limit the number of concurrently executing tasks if a `concurrency` limit is provided.
|
|
6
|
+
|
|
7
|
+
#### Scenario: Concurrency limit applied
|
|
8
|
+
|
|
9
|
+
- **GIVEN** a `WorkflowExecutor` configured with `concurrency: N`
|
|
10
|
+
- **WHEN** multiple independent tasks become ready
|
|
11
|
+
- **THEN** no more than N tasks SHALL be in the 'running' state simultaneously.
|
|
12
|
+
|
|
13
|
+
#### Scenario: Queueing ready tasks
|
|
14
|
+
|
|
15
|
+
- **WHEN** the number of running tasks equals the `concurrency` limit
|
|
16
|
+
- **THEN** any additional tasks that become ready SHALL remain in the 'ready' state until a slot becomes available.
|
|
17
|
+
|
|
18
|
+
#### Scenario: Slot release
|
|
19
|
+
|
|
20
|
+
- **WHEN** a running task completes or fails
|
|
21
|
+
- **THEN** the loop SHALL immediately check for ready tasks and start them up to the limit.
|
|
22
|
+
|
|
23
|
+
#### Scenario: Default unlimited concurrency
|
|
24
|
+
|
|
25
|
+
- **WHEN** `WorkflowExecutor` is initialized without a `concurrency` option (or 0/undefined)
|
|
26
|
+
- **THEN** it SHALL execute all ready tasks immediately (unlimited concurrency).
|
package/openspec/changes/archive/2026-01-18-add-external-task-cancellation/specs/task-runner/spec.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: TaskRunner Execution
|
|
4
|
+
|
|
5
|
+
The `TaskRunner` SHALL execute a sequence of `TaskStep`s based on their dependencies, processing inputs and producing outputs.
|
|
6
|
+
|
|
7
|
+
#### Scenario: Successful execution
|
|
8
|
+
|
|
9
|
+
- **WHEN** all `TaskStep`s complete successfully
|
|
10
|
+
- **THEN** the `TaskRunner` returns a successful workflow result.
|
|
11
|
+
|
|
12
|
+
#### Scenario: Execution with AbortSignal
|
|
13
|
+
|
|
14
|
+
- **WHEN** `TaskRunner.execute` is called with an `AbortSignal`
|
|
15
|
+
- **THEN** the `TaskRunner` monitors the `AbortSignal` for cancellation requests.
|
|
16
|
+
|
|
17
|
+
#### Scenario: Execution with Global Timeout
|
|
18
|
+
|
|
19
|
+
- **WHEN** `TaskRunner.execute` is called with a `timeout` option
|
|
20
|
+
- **THEN** the `TaskRunner` monitors the elapsed time for the workflow.
|
|
21
|
+
|
|
22
|
+
### Requirement: External Workflow Cancellation
|
|
23
|
+
|
|
24
|
+
The `TaskRunner` SHALL allow external cancellation of an ongoing workflow.
|
|
25
|
+
|
|
26
|
+
#### Scenario: Workflow cancelled by AbortSignal
|
|
27
|
+
|
|
28
|
+
- **WHEN** an `AbortSignal` provided to `TaskRunner.execute` is triggered
|
|
29
|
+
- **THEN** the `TaskRunner` immediately attempts to stop execution of current and pending tasks.
|
|
30
|
+
|
|
31
|
+
#### Scenario: Workflow cancelled by Global Timeout
|
|
32
|
+
|
|
33
|
+
- **WHEN** the specified global `timeout` for `TaskRunner.execute` is reached
|
|
34
|
+
- **THEN** the `TaskRunner` immediately attempts to stop execution of current and pending tasks.
|
|
35
|
+
|
|
36
|
+
#### Scenario: Tasks marked as cancelled
|
|
37
|
+
|
|
38
|
+
- **WHEN** a workflow is cancelled (by `AbortSignal` or `timeout`)
|
|
39
|
+
- **THEN** all unexecuted `TaskStep`s SHALL be marked with a 'cancelled' status in the final result.
|
|
40
|
+
|
|
41
|
+
#### Scenario: Pre-aborted workflow
|
|
42
|
+
|
|
43
|
+
- **WHEN** `TaskRunner.execute` is called with an `AbortSignal` that is already aborted
|
|
44
|
+
- **THEN** the `TaskRunner` SHALL return immediately with all tasks marked as cancelled, without executing any steps.
|
|
45
|
+
|
|
46
|
+
#### Scenario: Graceful interruption of current task
|
|
47
|
+
|
|
48
|
+
- **WHEN** a workflow is cancelled and a `TaskStep` is currently executing
|
|
49
|
+
- **THEN** the `TaskStep` SHALL receive the cancellation signal (e.g., via `AbortSignal` context) to allow for graceful interruption.
|
|
50
|
+
|
|
51
|
+
### Requirement: Cancellation Conflict Resolution
|
|
52
|
+
|
|
53
|
+
The `TaskRunner` SHALL handle scenarios where both `AbortSignal` and global `timeout` are provided.
|
|
54
|
+
|
|
55
|
+
#### Scenario: AbortSignal precedes Timeout
|
|
56
|
+
|
|
57
|
+
- **WHEN** both `AbortSignal` and `timeout` are provided, and `AbortSignal` is triggered first
|
|
58
|
+
- **THEN** the `TaskRunner` SHALL cancel the workflow based on the `AbortSignal`, ignoring the `timeout`.
|
|
59
|
+
|
|
60
|
+
#### Scenario: Timeout precedes AbortSignal
|
|
61
|
+
|
|
62
|
+
- **WHEN** both `AbortSignal` and `timeout` are provided, and `timeout` is reached first
|
|
63
|
+
- **THEN** the `TaskRunner` SHALL cancel the workflow based on the `timeout`, ignoring the `AbortSignal`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Integration Verification
|
|
4
|
+
|
|
5
|
+
The system's integrity SHALL be verified through comprehensive integration scenarios executed against the real runtime environment without mocks.
|
|
6
|
+
|
|
7
|
+
#### Scenario: Complex Graph Execution
|
|
8
|
+
|
|
9
|
+
- **WHEN** a complex task graph (diamonds, sequences, parallel branches) is executed
|
|
10
|
+
- **THEN** the system SHALL respect all dependency constraints and execution orders.
|
|
11
|
+
- **AND** the final state MUST reflect the cumulative side effects of all successful tasks.
|
|
12
|
+
|
|
13
|
+
#### Scenario: Failure Propagation
|
|
14
|
+
|
|
15
|
+
- **WHEN** a task fails in a complex graph
|
|
16
|
+
- **THEN** ONLY dependent tasks SHALL be skipped
|
|
17
|
+
- **AND** independent branches SHALL continue to execute to completion.
|
|
18
|
+
|
|
19
|
+
#### Scenario: Context Integrity
|
|
20
|
+
|
|
21
|
+
- **WHEN** multiple tasks mutate the shared context
|
|
22
|
+
- **THEN** state changes MUST be propagated correctly to downstream tasks.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Task Retry Configuration
|
|
4
|
+
|
|
5
|
+
The `TaskStep` interface SHALL support an optional `retry` property of type `TaskRetryConfig`.
|
|
6
|
+
|
|
7
|
+
#### Scenario: Retry Config Structure
|
|
8
|
+
|
|
9
|
+
- **GIVEN** a `TaskRetryConfig` object
|
|
10
|
+
- **THEN** it SHALL support:
|
|
11
|
+
- `attempts`: Number of retry attempts (default: 0).
|
|
12
|
+
- `delay`: Base delay in milliseconds (default: 0).
|
|
13
|
+
- `backoff`: Backoff strategy ('fixed' | 'exponential') (default: 'fixed').
|
|
14
|
+
|
|
15
|
+
### Requirement: Retrying Execution Strategy
|
|
16
|
+
|
|
17
|
+
The system SHALL provide a `RetryingExecutionStrategy` that implements `IExecutionStrategy` and wraps another `IExecutionStrategy`.
|
|
18
|
+
|
|
19
|
+
#### Scenario: Successful execution
|
|
20
|
+
|
|
21
|
+
- **WHEN** the inner strategy returns a successful `TaskResult`
|
|
22
|
+
- **THEN** `RetryingExecutionStrategy` SHALL return that result immediately.
|
|
23
|
+
|
|
24
|
+
#### Scenario: Retry on failure
|
|
25
|
+
|
|
26
|
+
- **WHEN** the inner strategy throws or returns a failed `TaskResult`
|
|
27
|
+
- **AND** the task has `retry.attempts > 0`
|
|
28
|
+
- **THEN** it SHALL wait for the configured `delay`.
|
|
29
|
+
- **AND** it SHALL re-execute the task using the inner strategy.
|
|
30
|
+
- **AND** it SHALL decrement the remaining attempts.
|
|
31
|
+
|
|
32
|
+
#### Scenario: Max attempts reached
|
|
33
|
+
|
|
34
|
+
- **WHEN** the task fails and no attempts remain
|
|
35
|
+
- **THEN** it SHALL return the failed result (or throw).
|
|
36
|
+
|
|
37
|
+
#### Scenario: Exponential Backoff
|
|
38
|
+
|
|
39
|
+
- **WHEN** `retry.backoff` is 'exponential'
|
|
40
|
+
- **THEN** the delay SHALL increase for each attempt (e.g., `delay * 2^attempt`).
|