feat(core): 0.2.4 — kernel concurrent layers, verifier ecosystem, parity harness#85
Merged
Conversation
…ystem, parity harness
Kernel (S5 unlock):
- Concurrent DAG layer execution: driver.ts now runs phases within a
topo layer concurrently via Promise.all with atomic layer-boundary
commit. Gate/budget decisions are checked between layers. Removes the
'concurrent DAG layers require the imperative runtime' restriction.
- Retry support: both runOneAgent (step.ts) and runAgentCall
(step-kinds.ts) now honor phase.retry = { max, backoffMs, factor }
for ALL failures (not just transient), matching the imperative
contract. Removes the 'retry requires the imperative runtime' gate.
- Context pre-read: kernel reads phase.context files and prepends them
to the prompt as <context> blocks, matching the imperative runtime.
Removes the 'context pre-read requires the imperative runtime' gate.
- Per-phase literal cwd: kernel resolves literal string cwd values
(absolute or relative to flow cwd) and passes them to runTask.
Interpolation placeholder cwds and workspace keywords remain
imperative-only. Per-branch cwd also remains imperative-only.
Pluggable verifier ecosystem (#82 dogfood):
- Built-in script-lint verifier (verifiers/script-lint.ts): catches
grep dash-pattern without '--', unbalanced regex in grep/sed, and
pipelines ending with a filter without pipefail/PIPESTATUS. Ships as
an optional built-in; compileTaskflow auto-includes it (lint !== false).
- Verifier discovery (verifiers/discover.ts): convention-based loading
from .pi/taskflows/verifiers/ (project) and ~/.pi/taskflows/verifiers/
(user). Async dynamic import, fail-open, project shadows user by name.
- builtinVerifiers barrel export from taskflow-core.
- MCP taskflow_lint tool: runs built-in + discovered verifiers via MCP,
exposing the pluggable verifier surface to all MCP hosts.
Compile visualization:
- Inline flow defs (phase.def) now render as Mermaid subgraphs showing
child phases and their edges. Saved-use flows remain plain nodes.
S5.0 parity harness:
- kernel-parity.test.ts: 10 golden fixtures run on BOTH engines
(imperative + event kernel) with deterministic mock runner, asserting
status/output/error/gate parity. Covers: linear chain, concurrent
layer, gate, reduce, when-guard, join-any, script, loop, wide DAG,
and retry.
Tests: 1578 core + 217 hosts/dsl/mcp = 1795 total, all green.
New test files: verifier-script-lint (25), verifier-discover (8),
kernel-parity (10), compile subgraph (2). Updated: exec-kernel-hardening,
runtime-closure-0.2.0, verify-pluggable.
added 4 commits
July 20, 2026 17:44
… for taskflow_lint - Add taskflow_lint to all 4 host MCP tool roster tests (claude/codex/ opencode/grok) - Update marketplace.json descriptions: 16 → 17 tools, add lint to list - Update skills-build test: 16 → 17 MCP tools assertion - Fix compile.ts type narrowing (p.type union excludes 'flow') - Fix server.ts unused variable in lint handler early-return path All 2021 tests green, typecheck clean, build passes.
- CHANGELOG.md: 0.2.4 section (kernel concurrent layers, retry/context/cwd, script-lint verifier, verifier discovery, taskflow_lint MCP tool, compile subgraph, S5.0 parity harness) - Version bump: 0.2.3 → 0.2.4 across all 10 package.json files - Skills: taskflow_lint in core.md example, pluggable verifier ecosystem section in advanced.md, rebuilt all host skill files - Host test version assertions: 0.2.3 → 0.2.4 - test:pack passed: 9 packages, 24 imports, 68 exports, 5 bins - Full suite: 2021/2021 green, typecheck clean
…parity test
- Restore 'expect contracts require the imperative runtime' in
kernel-policy.ts: the contract-violation retry loop was NOT ported to
the kernel step handlers; admitting expect flows would silently skip
validation. Deferred to a future release.
- Replace dynamic import('node:fs')/import('node:path') with static
module-level imports in step.ts and step-kinds.ts context pre-read.
The dynamic imports ran once per context file per attempt — wasteful.
- Add gate-in-concurrent-layer parity test: a gate sharing a layer with
an independent agent must correctly propagate its decision to the
next layer on both engines.
2022 tests, 2021 pass (1 pre-existing MCP background flake).
heggria
enabled auto-merge (squash)
July 20, 2026 10:53
- Replace 4 polynomial regexes in script-lint.ts with linear-time alternatives (stripPathPrefix via lastIndexOf, includes() instead of /bash\s+.*-o\s+pipefail/). Fixes 4 high-severity CodeQL alerts. - Add taskflow_lint to e2e-mcp-comprehensive.mts tool roster assertion. 2022/2022 tests green, typecheck clean.
heggria
added a commit
that referenced
this pull request
Jul 20, 2026
…ity harness (#85) * feat(core): 0.2.4 — kernel concurrent layers, pluggable verifier ecosystem, parity harness Kernel (S5 unlock): - Concurrent DAG layer execution: driver.ts now runs phases within a topo layer concurrently via Promise.all with atomic layer-boundary commit. Gate/budget decisions are checked between layers. Removes the 'concurrent DAG layers require the imperative runtime' restriction. - Retry support: both runOneAgent (step.ts) and runAgentCall (step-kinds.ts) now honor phase.retry = { max, backoffMs, factor } for ALL failures (not just transient), matching the imperative contract. Removes the 'retry requires the imperative runtime' gate. - Context pre-read: kernel reads phase.context files and prepends them to the prompt as <context> blocks, matching the imperative runtime. Removes the 'context pre-read requires the imperative runtime' gate. - Per-phase literal cwd: kernel resolves literal string cwd values (absolute or relative to flow cwd) and passes them to runTask. Interpolation placeholder cwds and workspace keywords remain imperative-only. Per-branch cwd also remains imperative-only. Pluggable verifier ecosystem (#82 dogfood): - Built-in script-lint verifier (verifiers/script-lint.ts): catches grep dash-pattern without '--', unbalanced regex in grep/sed, and pipelines ending with a filter without pipefail/PIPESTATUS. Ships as an optional built-in; compileTaskflow auto-includes it (lint !== false). - Verifier discovery (verifiers/discover.ts): convention-based loading from .pi/taskflows/verifiers/ (project) and ~/.pi/taskflows/verifiers/ (user). Async dynamic import, fail-open, project shadows user by name. - builtinVerifiers barrel export from taskflow-core. - MCP taskflow_lint tool: runs built-in + discovered verifiers via MCP, exposing the pluggable verifier surface to all MCP hosts. Compile visualization: - Inline flow defs (phase.def) now render as Mermaid subgraphs showing child phases and their edges. Saved-use flows remain plain nodes. S5.0 parity harness: - kernel-parity.test.ts: 10 golden fixtures run on BOTH engines (imperative + event kernel) with deterministic mock runner, asserting status/output/error/gate parity. Covers: linear chain, concurrent layer, gate, reduce, when-guard, join-any, script, loop, wide DAG, and retry. Tests: 1578 core + 217 hosts/dsl/mcp = 1795 total, all green. New test files: verifier-script-lint (25), verifier-discover (8), kernel-parity (10), compile subgraph (2). Updated: exec-kernel-hardening, runtime-closure-0.2.0, verify-pluggable. * fix: sync tool roster (17 tools), typecheck, and marketplace metadata for taskflow_lint - Add taskflow_lint to all 4 host MCP tool roster tests (claude/codex/ opencode/grok) - Update marketplace.json descriptions: 16 → 17 tools, add lint to list - Update skills-build test: 16 → 17 MCP tools assertion - Fix compile.ts type narrowing (p.type union excludes 'flow') - Fix server.ts unused variable in lint handler early-return path All 2021 tests green, typecheck clean, build passes. * release: Taskflow 0.2.4 - CHANGELOG.md: 0.2.4 section (kernel concurrent layers, retry/context/cwd, script-lint verifier, verifier discovery, taskflow_lint MCP tool, compile subgraph, S5.0 parity harness) - Version bump: 0.2.3 → 0.2.4 across all 10 package.json files - Skills: taskflow_lint in core.md example, pluggable verifier ecosystem section in advanced.md, rebuilt all host skill files - Host test version assertions: 0.2.3 → 0.2.4 - test:pack passed: 9 packages, 24 imports, 68 exports, 5 bins - Full suite: 2021/2021 green, typecheck clean * fix: review round — restore expect restriction, static imports, gate parity test - Restore 'expect contracts require the imperative runtime' in kernel-policy.ts: the contract-violation retry loop was NOT ported to the kernel step handlers; admitting expect flows would silently skip validation. Deferred to a future release. - Replace dynamic import('node:fs')/import('node:path') with static module-level imports in step.ts and step-kinds.ts context pre-read. The dynamic imports ran once per context file per attempt — wasteful. - Add gate-in-concurrent-layer parity test: a gate sharing a layer with an independent agent must correctly propagate its decision to the next layer on both engines. 2022 tests, 2021 pass (1 pre-existing MCP background flake). * docs: fix CHANGELOG — add expect to imperative-only list, 11 parity fixtures ---------
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
🔴 Kernel: concurrent DAG layers (S5 unlock)
The event kernel now executes phases within a topo layer concurrently via
Promise.allwith atomic layer-boundary commit. Gate/budget decisions are checked between layers. This removes the single biggest blocker to kernel default-ON.Also unlocked on the kernel path:
phase.retry = { max, backoffMs, factor }now honored for ALL failures (not just transient), matching the imperative contractphase.contextfiles read and prepended as<context>blocks🟡 Pluggable verifier ecosystem (#82 dogfood)
--, unbalanced regex, pipelines without pipefail. Auto-included bycompileTaskflow(lint !== falseto opt out).pi/taskflows/verifiers/(project shadows user). Async, fail-opentaskflow_linttool — exposes built-in + discovered verifiers to all MCP hosts🟢 Compile subgraph visualization
Inline flow defs (
phase.def) now render as Mermaid subgraphs showing child phases and edges.S5.0 parity harness
kernel-parity.test.ts: 10 golden fixtures run on BOTH engines with deterministic mock runner, asserting status/output/error/gate parity. Covers linear, concurrent, gate, reduce, when-guard, join-any, script, loop, wide DAG, retry.Tests
1795 total, all green (1578 core + 217 hosts/dsl/mcp).
New: verifier-script-lint (25), verifier-discover (8), kernel-parity (10), compile subgraph (2).
Updated: exec-kernel-hardening, runtime-closure-0.2.0, verify-pluggable.
Remaining for 0.2.4 (not in this PR)