Skip to content

Releases: grunnverk/tree-execution

1.5.8

27 Mar 19:54
7372820

Choose a tag to compare

Overview

  • This release is a small maintenance bump that updates package metadata and aligns dependency/dev-tooling requirements. The release contains only package.json changes (version bump to 1.5.8 and related metadata updates).
  • Scope: 3 commits, 1 file changed (package.json), 4 insertions and 4 deletions.
  • Contributors: Tim O'Brien and nanobot.

What changed (high level)

  • Version bumped to 1.5.8.
  • package.json metadata and developer tooling configuration were refreshed.
  • Dependencies and devDependencies were aligned to current internal/shared package versions and modern tooling versions.
  • Node engine requirement is set to >=24.0.0 (this was present in the package metadata).

Why this matters

  • Keeps the package aligned with the rest of the monorepo and with recent dev-tooling versions.
  • Ensures consumers and contributors use a supported Node.js runtime (>=24), reducing environment-related inconsistencies.
  • No functional code changes were made; this is a metadata/release housekeeping update to keep packaging, publishing, and tooling consistent.

User-facing impact

  • No changes to runtime behavior or APIs.
  • Libraries that depend on @grunnverk/tree-execution should not see functional changes.
  • Consumers must be prepared to use Node.js >=24 when installing or developing against this package (check your environment if you run older Node versions).

Developer impact

  • Run the usual build/test/lint steps after pulling the release:
    • npm run build
    • npm run test
    • npm run lint
  • Update any local development environments to Node >=24 if not already using it.
  • If you pin versions of @grunnverk packages in dependent projects, consider aligning them with the versions declared here.

Files changed

  • package.json
    • version: 1.5.8
    • dependency/devDependency alignment and metadata updates
    • scripts, keywords, author, repository/bugs/homepage, engines, files fields were confirmed/updated

Breaking changes

  • None detected. There are no code changes that modify public APIs or behavior.
  • The only notable requirement is the Node engine constraint (>=24.0.0) declared in package.json — treat this as an environment requirement rather than an API break.

Notes and recommendations

  • This release is a safe, low-risk bump focused on packaging and metadata. No migration steps are required for users beyond ensuring Node >=24 when applicable.
  • If you maintain downstream packages that pin Node engine versions or peer dependencies tightly, verify compatibility with Node 24 and the aligned @grunnverk packages listed in package.json.

Changelog (summary)

  • chore(release): bump package to 1.5.8 and update package metadata
  • chore: bump package version to 1.5.8-dev.0 and update package metadata (intermediate commits)
  • chore: bump to 1.5.8-dev.0 (intermediate commit)

If you need the exact package.json diff or want me to list the dependency versions that changed, I can include that detail.

v1.5.7

15 Mar 12:07
034a899

Choose a tag to compare

What’s the main story in 1.5.7

This release improves failure-handling, logging, and runtime output behavior for the tree execution command. It introduces a deterministic "model handoff" contract (structured block + JSON payload) intended for automated/manual handoff to downstream systems (including model/AI tooling), expands configuration types, refines output level selection logic, and includes tests that lock down the new contract behavior.

Summary of scope

  • 3 commits from 1 contributor
  • 6 files changed
  • ~262 insertions, 14 deletions
  • Key files touched: src/util/outputContract.ts, src/tree.ts, src/types/config.ts, tests for the new contract and output level, package.json

What changed (important details)

  1. Deterministic model handoff contract (new)

    • Added FailureHandoff interface and helpers:
      • formatFailureHandoffBlock(handoff: FailureHandoff): string[]
        • Produces a deterministic text block that includes:
          • A JSON payload line (compact) between MODEL_HANDOFF_BEGIN / MODEL_HANDOFF_END markers
          • A human-readable summary (MODEL_HANDOFF_HEADER + key/value lines)
        • Includes optional fields (related_logs, remediation, escalation) when provided.
      • createFailureHandoffPrompt(runId: string, logPath: string, packageName?: string): string
        • Convenience helper to produce a short investigatory prompt referencing run id, log path and package name.
    • Constants exported:
      • MODEL_HANDOFF_BEGIN, MODEL_HANDOFF_HEADER, MODEL_HANDOFF_END
    • Tests added that assert exact formatting and determinism:
      • tests/util/outputContract.test.ts

    Why it matters:

    • Provides a stable, machine- and human-readable format for exporting execution failures.
    • Makes it easier to integrate with automated triage, AI agents, or chatops tools that need a predictable payload and human summary.

    Example (behavior):

    • formatFailureHandoffBlock(...) returns an array of lines such as:
      • MODEL_HANDOFF_BEGIN
      • MODEL_HANDOFF_HEADER
      • " run_id: ..."
      • " command: ..."
      • ...
      • MODEL_HANDOFF_END
    • createFailureHandoffPrompt('run_2', '/tmp/logs/pkg.log', '@foo/pkg')
      • -> "Investigate run run_2 for package @foo/pkg using log /tmp/logs/pkg.log, identify root cause, and continue execution from the correct step."
  2. Output / logging behavior refinements

    • determineShowOutputLevel(...) implemented/adjusted to return one of 'none' | 'minimal' | 'full' based on:
      • runConfig.debug -> 'full'
      • runConfig.verbose -> 'minimal'
      • human-first defaults: commit and publish built-in commands show 'minimal' by default; other commands default to 'none'
    • This clarifies expectations for logging across built-in vs custom commands and respects debug/verbose flags.
  3. Runtime log directory resolution

    • Added resolveRuntimeLogDirectory(runConfig: TreeExecutionConfig, packageDir: string): string
      • If runtimeLogDirectory is not set, falls back to DEFAULT_RUNTIME_LOG_DIRECTORY (homedir/.kodrdriv/log)
      • If runtimeLogDirectory is absolute, uses it directly; otherwise it is resolved relative to packageDir
    • This ensures predictable storage of runtime logs and supports both absolute and project-relative configuration.
  4. New runtime manifest type and execution context improvements

    • Added RuntimeRunManifest interface (fields for runId, command, packageName, packageDir, phase, logFilePath, generatedAt)
    • Execution context tracking (publishedVersions, TreeExecutionContext) was extended/used in src/tree.ts for better persistence and summaries
    • Helper to reset internal global state for testing: __resetGlobalState()
  5. Tests and stability

    • New unit tests for the output contract and output level logic were added:
      • tests/util/outputContract.test.ts
      • tests/util/outputLevel.test.ts
    • These tests check deterministic formatting and that related logs / prompt formation behave correctly.
  6. Metadata bump

    • package.json version set to "1.5.7"
    • Dependencies updated/stated (no new major dependency bumps in this diff)
    • Node engine requirement remains >=24.0.0

Impact on users and developers

  • Users

    • Better failure handoff: If your workflows rely on kodrdriv logs and automated triage, you can now consume a deterministic block that includes both machine-readable JSON and a human summary.
    • More predictable log placement: runtimeLogDirectory can be absolute or relative; default falls back to ~/.kodrdriv/log.
    • Improved control of output verbosity: debug/verbose flags and built-in command defaults give clearer, user-facing output behavior.
  • Developers / Integrators

    • New API surface to use:
      • formatFailureHandoffBlock, createFailureHandoffPrompt, MODEL_HANDOFF_* constants
      • resolveRuntimeLogDirectory and RuntimeRunManifest type (for internal manifests)
    • Tests provide examples of expected contract output that downstream consumers should rely on.
    • The deterministic JSON + header format is safe for programmatic parsing (JSON line) and also readable for humans/operators.

Breaking changes and important considerations

  • Type/function signature changes flagged in this release:
    • resolveRuntimeLogDirectory has been added/modified.
    • FailureHandoff and RuntimeRunManifest interfaces were added and exported.
    • formatFailureHandoffBlock and createFailureHandoffPrompt are new exports.
  • If any external code imported earlier internal helpers with the same names/signatures, verify imports and types (this release introduces/exports new types and functions; it does not intentionally remove previously exported APIs, but callers should confirm they are using the intended new helpers).
  • The release notes call out that function/type signatures changed in the diff scan — specifically check any direct imports from src/util/outputContract.ts or calls to runtime log resolution to ensure compatibility after updating.
  • No behavior-changing removal of features was detected. However, because new types and helpers are introduced and src/tree.ts has been expanded with new logging/manifest behavior, any code that relied on the previous internal shape of runtime manifests or relied on previously undocumented text output should be validated against the new deterministic contract.

Migration guidance

  • If you consume kodrdriv output programmatically:
    • Prefer parsing the JSON payload line between MODEL_HANDOFF_BEGIN and MODEL_HANDOFF_END (formatFailureHandoffBlock writes JSON as the second line).
    • Avoid brittle parsing of arbitrary stdout/stderr text; the new contract is intended as the stable surface for machine consumption.
  • If you rely on runtime log location:
    • Consider setting runtimeLogDirectory explicitly in TreeExecutionConfig (absolute paths will be used as-is; relative paths are resolved under the package directory).
  • If you import helpers from this package in other code:
    • Update imports to use the new exported helpers if you need the deterministic handoff or log path resolution helpers.

Testing and verification

  • Run the added unit tests:
    • npm test (tests include outputContract and outputLevel coverage)
  • Exercise a failing run and inspect output:
    • Look for MODEL_HANDOFF_BEGIN / MODEL_HANDOFF_END block and compact JSON payload for programmatic ingestion.

Changelog highlights (developer-oriented)

  • Added: src/util/outputContract.ts
    • Exports: MODEL_HANDOFF_BEGIN, MODEL_HANDOFF_END, MODEL_HANDOFF_HEADER, FailureHandoff, formatFailureHandoffBlock, createFailureHandoffPrompt
  • Changed: src/tree.ts
    • Added resolveRuntimeLogDirectory, RuntimeRunManifest, expanded execution context and logging flows; integrated formatFailureHandoffBlock and createFailureHandoffPrompt.
  • Tests: deterministic tests added for output contract and output levels.
  • Package: package.json version bumped to 1.5.7.

If you maintain integrations that parse kodrdriv output, update them to use the new handoff contract for robust parsing. This release aims to make failure handoffs explicit and reliable for automation and human operators.

Release v1.5.6

12 Feb 04:58
17c0eb1

Choose a tag to compare

Summary

This release updates package metadata for @grunnverk/tree-execution and aligns runtime and dependency requirements. The change-set is small and focused: a version bump to 1.5.6 and dependency/devDependency refreshes recorded in package.json.

What changed (high level)

  • Package version set to 1.5.6.
  • Dependencies updated in package.json:
    • @grunnverk/tree-core -> ^1.5.5
    • @grunnverk/git-tools -> ^1.5.16
    • @grunnverk/shared -> ^1.5.8
  • DevDependencies refreshed (eslint, typescript, vitest and related tooling versions).
  • Node engine requirement is declared as >=24.0.0 in package.json.
  • No source files or production code were modified beyond package.json.

Only one file changed:

  • package.json — 4 insertions, 4 deletions.

Contributors: Tim O'Brien (all commits in this release).

Why this release matters

  • Keeps package metadata and developer tooling up to date with the rest of the monorepo.
  • Aligns runtime and shared-library versions across @grunnverk packages, reducing potential incompatibilities when consuming this package alongside updated @grunnverk packages.
  • Declaring engines.node >=24 makes the supported Node.js runtime explicit to consumers and CI.

Problems solved / capabilities added

  • Reduces version skew and dependency mismatch risk with other @grunnverk packages by bumping dependency ranges to the currently aligned versions.
  • Ensures development and test tooling uses updated, consistent versions across the repo.

Impact on users and developers

  • Consumers: No behavior/API changes in the library itself; upgrading to 1.5.6 should be safe from a runtime-API standpoint. The primary impact is dependency alignment — consumers who rely on peer/indirect versions may see different resolved versions after installing.
  • Developers/contributors: Requires Node.js 24+ for development and CI where engines are enforced. After pulling this release, run npm install and rebuild (npm run build) as usual to pick up updated devDependencies and ensure local tooling matches CI.
  • No source code changes or new features were introduced in runtime code; this release is maintenance-focused.

Breaking changes

  • Automated checks found no breaking API changes in code. The only potential breaking consideration is the declared Node.js engine of ">=24.0.0". If a developer or CI environment runs on Node <24 and enforces engines, installs or tooling may fail. If your environment uses an older Node, upgrade to Node 24+ before using this release.
  • No other breaking changes were detected.

Upgrade notes / practical steps

  • Update package references (if pinned) to "@grunnverk/tree-execution": "1.5.6".
  • Run npm install to pick up the aligned dependency versions.
  • Ensure local development and CI use Node.js >=24.
  • Rebuild (npm run build) and run tests (npm test) after upgrading if you consume this package internally.

Miscellaneous

  • This release is small and focused on alignment and housekeeping. If you need confirmation that a particular runtime API stayed stable, mention the API surface you use and we can double-check tests/usages specifically.

1.5.5

02 Feb 16:58
643a3ad

Choose a tag to compare

Summary

This release (1.5.5) contains a small set of packaging and dependency updates. There are no source-code changes to the runtime logic in this release — only package metadata was updated.

What changed

  • package.json
    • Bumped package version to 1.5.5.
    • Updated package dependencies:
      • @grunnverk/tree-core -> ^1.5.4
      • @grunnverk/git-tools -> ^1.5.15
      • @grunnverk/shared -> ^1.5.7
    • Development tooling versions listed in devDependencies were refreshed (eslint, typescript, vitest, etc. present in devDependencies).
    • Node engine requirement remains specified as ">=24.0.0".
    • Scripts and packaging "files" list are unchanged except for metadata updates.

Total scope: 3 commits; 1 file changed (package.json).

Why this matters

  • Dependency alignment: The runtime and tooling dependency bumps ensure this package stays aligned with other @grunnverk packages and picks up recent fixes or minor improvements from those packages.
  • Packaging/versioning: The version bump lets downstream consumers and CI pipelines pick up the latest dependency alignment and metadata without any behavior changes in this package's code.

Impact on users and developers

  • Users (consumers of the published package)
    • No functional or API changes — upgrading to 1.5.5 should not change runtime behavior.
    • Installing the new release will pull the updated dependency versions. If you have strict lockfile or shrinkwrap policies, expect the usual dependency updates when you update your lockfile.
  • Developers (working on this repo)
    • Ensure your local environment satisfies Node >=24.0.0 as declared in package.json.
    • After pulling 1.5.5, run a fresh install (npm ci / npm install) to align dependencies.
    • Build and test scripts remain the same (tsc, vitest). No code changes require edits to source or tests.

Breaking changes

  • No breaking changes were detected in this release. A tooling/dependency-only change is unlikely to break runtime behavior in consumers.
  • As always, if your project pins transitive dependencies very strictly, check your lockfile after upgrading to confirm resolutions.

Upgrade notes / recommended actions

  • To upgrade: update your dependency to @grunnverk/tree-execution@1.5.5 and run your package manager’s install command to refresh the lockfile.
  • If you have CI caching or pinned lockfiles, regenerate/commit the lockfile after upgrading to avoid mismatches.
  • If you depend on any of the bumped @grunnverk packages directly, review their changelogs for any minor fixes they included.

Summary of risk

Low — release is metadata/dependency only. No source code changes to runtime logic were made in this release.

Release v1.5.4

01 Feb 00:09
226d301

Choose a tag to compare

Summary — the main story

This release primarily updates package metadata and CI/publishing workflows. Version in package.json has been promoted to 1.5.4, Node engine requirement remains >=24, some developer tooling/devDependencies aligned, and workflow files were simplified/adjusted (including removal of CodeQL config and Dependabot config). There are no API or runtime code changes to the library itself — the changes are focused on release/publishing and CI automation.

What this release fixes or changes

  • package.json

    • Version set to 1.5.4.
    • Dependencies pinned/updated to the current @grunnverk packages (@grunnverk/tree-core ^1.5.3, @grunnverk/git-tools ^1.5.14, @grunnverk/shared ^1.5.6). Dev tooling versions updated (TypeScript, Vitest and ESLint-related packages listed).
    • Node engine requirement is explicitly >=24.0.0.
    • Build/test/lint scripts and prepublish steps retained.
  • CI / workflows

    • .github/workflows/npm-publish.yml
      • Improved publish step that:
        • Reads package.json and decides publish strategy based on version string (pre-release vs production).
        • For versions containing a hyphen (pre-release), publishes under the dev tag and rewrites package.json to include a timestamp+short SHA suffix so pre-release versions are unique.
        • For production versions (no hyphen), publishes under latest but only when triggered by a GitHub release event (prevents accidental publishing from regular pushes).
        • Ensures Node 24 is used for publish jobs.
      • Net effect: safer production publishes and deterministic pre-release tagging with timestamp+SHA appended.
    • .github/workflows/test.yml
      • Test workflow updated to use Node 24 and to perform a clean install (removing node_modules and package-lock.json first) to avoid platform-specific optional dependency issues. It continues to run lint, build and tests.
    • .github/workflows/codeql.yml
      • The CodeQL workflow file has been removed in this release.
    • .github/dependabot.yml
      • Dependabot configuration removed in this release.

Why this matters

  • Safer publishing: Production releases will now only be published on GitHub release events; accidental publishes from pushes are prevented. Pre-release publishing is tagged and versioned to avoid collisions and to make dev artifacts traceable (timestamp + short SHA).
  • Reproducible CI on GitHub-hosted runners: test workflow uses a clean install to avoid platform-specific optional dependency problems and standardizes on Node 24.
  • Reduced CI surface: CodeQL workflow was removed and Dependabot config was removed — this reduces automated scanning/PR noise (if you relied on those, see “Impact on teams” below).

Impact on users and developers

  • Users of the package:

    • No runtime or API changes in library code in this release. Package behavior and public API remain the same.
    • Package version is 1.5.4; install as usual.
  • Developers and release engineers:

    • Publishing behavior changed:
      • Production (no hyphen in version) is only published when a GitHub release is created. Creating a release in GitHub will publish the package under the latest npm tag.
      • Pre-release versions (versions containing a dash, e.g., 1.5.5-dev.0) will be published under the dev tag and the workflow rewrites the package.json version to append a timestamp and SHA so the published version is unique (e.g., 1.5.5-dev.20260131210612.ab169e2).
      • The publish action uses Node 24 — ensure any local or CI tooling intended to emulate publish steps uses Node 24 for parity.
    • CI changes:
      • Tests and build run on Node 24. Local development and CI should use Node >=24 to match the engine requirement.
      • The test workflow's clean install step removes package-lock.json and node_modules before npm install to make artifact resolution consistent on GitHub runners (this may change local reproductions if you rely on lockfile behavior in CI).
    • Automation/security tools:
      • CodeQL workflow removed — if your team depends on CodeQL scans, reintroduce or migrate that workflow.
      • Dependabot config removed — automatic dependency PRs will stop unless Dependabot is reconfigured.

Breaking changes

  • No code-level breaking changes were detected. The release does not change the library API, types, or runtime behavior.
  • Operational/CI changes to be aware of:
    • Production publish gating: production publish only on GitHub release events. If you previously relied on npm publish being triggered by branch pushes, you must create a GitHub release to publish a production version.
    • Node engine is >=24.0.0. Ensure CI runners and developer machines use Node 24+ to avoid mismatches.
    • Removal of CodeQL and Dependabot means automated scanning and dependency PRs will not run unless re-enabled.

Files touched (high-level)

  • package.json — version bump to 1.5.4, dependency/devDependency updates, engine remains Node >=24.
  • .github/workflows/npm-publish.yml — revamped publish decision logic and tagging for pre-releases/production.
  • .github/workflows/test.yml — Node 24, clean install, and standard test/lint/build steps.
  • .github/workflows/codeql.yml — removed.
  • .github/dependabot.yml — removed.

Release statistics

  • Commits in this release: 15 (all by a single contributor).
  • Files changed: 5 files; ~50 insertions and ~149 deletions (mostly workflow / metadata cleanup).

If you need guidance for:

  • Re-enabling CodeQL scans or Dependabot PRs, or
  • Adjusting your release process to create GitHub releases for production publishes,
    review the updated .github/workflows/npm-publish.yml and reintroduce corresponding workflow/config files as needed.

1.5.3 — Test coverage for parallel context isolation + logger behavior, and package metadata fixes

31 Jan 07:17
561a3df

Choose a tag to compare

Main story

This release is primarily about stabilizing and validating existing behavior rather than adding new runtime features. It adds targeted tests around two areas that have been error-prone in real usage—parallel execution context isolation and logging behavior (including MCP server mode)—and it corrects package metadata/versioning issues.

What changed

Parallel execution: context isolation integration coverage

A new/updated integration test (tests/integration/parallel-context-isolation.test.ts) verifies that DynamicTaskPool creates isolated per-package execution contexts, so repository metadata (owner/name/url) is derived from each package’s own git repo rather than leaking/mixing across packages when running in parallel.

This specifically guards against the real-world failure mode where packages could be executed with the wrong repository context in parallel mode (e.g., two packages accidentally sharing the same repo identity).

Why it matters

  • Reduces regression risk for parallel workflows where tasks rely on repository-derived context (publishing, PR/remote operations, etc.).
  • Ensures context correctness even if the process working directory changes after the pool is created.

Logger: unit tests for default/custom logger behavior

Added a focused test suite for the logger utility (tests/util/logger.test.ts) covering:

  • Default logger methods exist and behave as expected.
  • info/error/warn call through to console.* when not in MCP server mode.
  • Custom loggers set via setLogger() are used consistently, persist across calls, and accept additional arguments.

Why it matters

  • Improves confidence in logging behavior used across execution flows.
  • Validates that console output suppression rules (notably around KODRDRIV_MCP_SERVER) don’t accidentally regress.

Package metadata/version housekeeping

package.json was updated to correct invalid/intermediate version strings and align the package metadata for the release.

Impact

For users

  • No new user-facing features in runtime behavior are introduced in this release range.
  • Improved reliability via stronger automated coverage for parallel execution context correctness and logging behavior.

For developers/maintainers

  • Better regression protection around parallel execution context creation and MCP-safe logging.
  • Cleaner/consistent package metadata for the 1.5.3 release.

Breaking changes

No breaking changes were detected in the changes from main to HEAD.

1.5.2 — Shell-escape tree subprocess arguments + fixes for parallel execution recovery/readiness

29 Jan 03:42
29360d0

Choose a tag to compare

Main changes

Security: prevent shell injection when tree shells out to subcommands

kodrdriv tree builds command strings that are executed via a shell for built-in commands (e.g., commit, release, publish, link, unlink, updates). In 1.5.2, arguments that can contain user/config-provided values are now safely shell-escaped before being concatenated into the subprocess command string.

What changed

  • Added src/util/shellEscape.ts with:
    • escapeShellArg(value: string): wraps values in single quotes and escapes internal ' safely.
    • buildShellCommand(command, args): helper for building escaped command strings.
  • Updated src/tree.ts to escape values passed into the built-in command subprocess, including (examples):
    • --model, --config-dir, --output-dir, --preferences-dir
    • tree package arguments (e.g., for link/unlink/updates)
    • multiple commit/release option values (e.g., --context, --from, --to, --focus, etc.)
  • Added extensive test coverage, including explicit security regression tests:
    • tests/util/shellEscape.test.ts
    • tests/util/shellEscape.security.test.ts

Why it matters

  • Prevents command injection if a value contains characters like ;, &&, |, backticks, $(...), or embedded quotes.
  • Makes tree mode safer when parameters come from config files, environment, or user input.

Parallel execution correctness: dependencies and recovery behave as expected

This release fixes issues where parallel runs could incorrectly stall or terminate early due to how “skipped” packages were treated.

What changed

  • DependencyChecker now treats skippedNoChanges packages as completed dependencies:
    • src/execution/DependencyChecker.ts
    • New/updated tests: tests/execution/DependencyChecker.test.ts
  • DynamicTaskPool checkpoint recovery now re-evaluates previously skipped packages after loading a checkpoint:
    • src/execution/DynamicTaskPool.ts
    • When resuming (especially after manual recovery actions like marking packages completed), packages previously skipped due to dependency failure can be moved back to pending if their dependencies are now satisfied.
  • Fixed a parallel execution “early exit” bug (commit message indicates incorrect termination conditions). The updated completion logic ensures the pool only finishes when pending/ready/running are truly drained.

Why it matters

  • Packages skipped because they had “no changes” (or were already published) will no longer block dependents.
  • Recovery/continue flows are more reliable: resuming from checkpoints is less likely to get stuck in an unrecoverable skipped state.

Dependency updates

  • Bumped internal dependencies to align with the @grunnverk toolchain:
    • @grunnverk/git-tools and @grunnverk/shared to ^1.5.4
  • Package version set to 1.5.2 in package.json.

Breaking changes

No breaking changes were detected in this release range.

Notes for users

  • If you run kodrdriv tree <built-in-command> with values that include spaces or special characters (e.g., model names, paths, contexts), those values will now be passed more safely and consistently to subprocesses.
  • If you previously had parallel runs stall after a dependency was “skipped with no changes,” upgrading to 1.5.2 should unblock those workflows.

1.5.1 — Parallel execution context isolation + dependency/tooling updates

28 Jan 02:30
33c0b74

Choose a tag to compare

Main story

This release fixes a real-world correctness issue in parallel tree execution: when running built-in commands (notably kodrdriv publish) across multiple packages in parallel, some packages could end up using repository information from a different package (repo/owner/remote “mixing”), depending on working-directory changes and shared process state.

Version 1.5.1 introduces a per-package execution context that is created up-front and passed through execution, ensuring each package runs with the correct repository metadata.

Fixes

Parallel execution: per-package repository isolation

  • Added PackageExecutionContext + PackageContextFactory to detect and hold repository metadata per package (remote URL, owner, repo name).
  • DynamicTaskPool now creates isolated contexts for all packages when the pool is constructed, preventing cross-contamination during parallel runs.
  • TreeExecutionAdapter validates and uses the context for each package run.
  • tree.ts passes context through to built-in command subprocesses via environment variables (e.g. KODRDRIV_CONTEXT_REPOSITORY_OWNER, ..._NAME, ..._URL), so downstream code can rely on stable, package-specific values.

Tests added/expanded to cover:

  • context creation across multiple independent git repos
  • isolation even when process.cwd() changes
  • a reproduction of the original “wrong repo used” bug scenario

Improvements

Parallel output: command-aware summary formatting

  • formatParallelResult is now command-aware and will label summaries appropriately:
    • publish-like commands use “Publish Summary” / “Published”
    • other commands use “Execution Summary” / “Completed”
  • Includes clearer totals, elapsed time formatting, and concurrency info.

Dependency / tooling changes

  • Updated package dependencies and dev tooling versions.
  • Node.js engine requirement is now >=24.0.0 (see Breaking changes / compatibility).

Breaking changes / important notes

Node.js >= 24 required

package.json now specifies:

  • engines.node: ">=24.0.0"

If you run this package under Node 20/22, you’ll need to upgrade Node to use 1.5.1.

Export / API surface changes

There were export and signature changes that may affect consumers:

  • The tree entrypoint export is now exposed as:
    • executeTree (exported from src/index.ts), instead of exporting execute directly.
  • formatParallelResult signature changed:
    • was: formatParallelResult(result: any): string
    • now: formatParallelResult(result: any, command?: string): string

If you call formatParallelResult directly, you can keep passing only result, but any wrapper types or function references that require the old arity/signature may need updating.

New public exports

  • PackageExecutionContext, PackageContextFactory
  • associated types: PackageContextOptions, RepositoryInfo

Impact

  • Users running kodrdriv tree ... --parallel (especially tree publish) should see correct repository targeting per package, eliminating misdirected repo operations caused by context bleed.
  • Developers integrating this library should review:
    • Node version requirement
    • any direct imports of execute / formatParallelResult and update accordingly.

@grunnverk/tree-execution 1.5.0

22 Jan 19:48
b67f368

Choose a tag to compare

Main story

This release improves parallel execution recovery so that a run can be resumed cleanly after manual intervention (e.g., marking packages completed), and aligns the package with the @grunnverk 1.5.x ecosystem and a newer Node.js runtime.

Fixes

Parallel recovery now unblocks previously skipped packages

A bug in recovery/continue flows could leave packages stuck in skipped (blocked due to a failed dependency), even after you repaired the dependency and used recovery commands like --mark-completed.

In 1.5.0, the recovery logic re-evaluates skipped packages and moves any newly-unblocked ones back to pending so they can be scheduled again.

Impacts:

  • RecoveryManager.markCompleted() now triggers a ready-state recomputation that can unblock dependents.
  • DynamicTaskPool.loadCheckpoint() also performs this unblocking pass when resuming from a checkpoint.

“No changes” skips are tracked explicitly in parallel checkpoints

Parallel execution now distinguishes:

  • skipped: blocked due to failed dependencies
  • skippedNoChanges: skipped because there were no code changes (e.g., version-only changes)

This state is persisted in the checkpoint and surfaced in status/progress reporting, which makes resume and recovery behavior more accurate and easier to understand.

Dependency and runtime updates

Align with @grunnverk 1.5.x dependencies

Dependencies were updated to the @grunnverk 1.5.x line (including @grunnverk/tree-core, @grunnverk/git-tools, and @grunnverk/shared).

Documentation updates

README/guide and internal design docs were refreshed to match the current behavior and terminology (including the skippedNoChanges reporting).

Breaking changes

Node.js engine requirement is now >= 24.0.0

package.json now specifies:

  • "engines": { "node": ">=24.0.0" }

If you run this package on Node 20/22 (or older), you will need to upgrade Node to use 1.5.0.

Notes for users

  • If you previously had a parallel run that got “stuck” after marking a dependency completed, retrying with --continue should now correctly pick up newly-unblocked packages.
  • Status output for parallel runs will now report “Skipped (no changes)” separately from “Skipped due to dependencies,” which helps determine whether recovery action is actually needed.

1.0.0 — Stable tree execution with safer publish automation, improved parallel adapter, and MCP-safe logging

21 Jan 15:04
26d787b

Choose a tag to compare

Main story

This 1.0.0 release hardens multi-package execution for real-world monorepo workflows, with a particular focus on publish orchestration (dependency updates, timeouts, skip semantics, and resumability), plus better behavior in MCP server contexts where stdout must remain protocol-safe.

What changed

Publish & tree orchestration reliability

  • Scoped dependency updates before publish: tree publish can now run dependency updates for configured npm scopes (or default to the package’s own scope) before publishing, without failing the publish if updates fail (warn-only behavior).
    • Config: publish.scopedDependencyUpdates
      • undefined: defaults to package scope (for scoped packages)
      • []: explicitly disables scoped updates
      • ['@scope1', '@scope2']: updates those scopes
  • Inter-project dependency propagation after earlier publishes: during tree publish, previously published package versions are tracked and can be applied to dependents’ dependencies/devDependencies/peerDependencies.
    • Prerelease versions are not auto-propagated (versions containing - are skipped) to avoid inadvertently pinning consumers to prerelease builds.
  • Skip-aware publish tracking: if a publish subprocess reports a skip marker (KODRDRIV_PUBLISH_SKIPPED), tree execution will:
    • treat the package as “skipped (no code changes)”
    • not record a published version
    • not propagate dependency updates based on that package
  • More robust long-running command handling:
    • Built-in publish and commit executions now have explicit timeouts (publish: 30 minutes; commit: 10 minutes; other commands: 5 minutes).
    • When auto-committing dependency updates, a separate 5-minute timeout and periodic “still generating commit message” progress logging is included.
  • Non-interactive safety for tree commit: when shelling out to kodrdriv commit, --sendit is automatically added (unless dry-run) to avoid hangs from interactive prompts.

Parallel execution adapter improvements

  • TreeExecutionAdapter now:
    • Tracks started/completed counts for clearer progress behavior.
    • Supports an optional tree.onPackageFocus(packageName, index, total) callback, with errors logged but not fatal.
    • Preserves “skipped (no changes)” reporting via skippedNoChanges.

MCP-safe logging (important for tool/server integrations)

  • The default logger now suppresses console output when KODRDRIV_MCP_SERVER=true.
    • This prevents accidental stdout/stderr output from breaking JSON-RPC/MCP protocol streams.
    • Outside MCP mode, logging continues to use console output as before.

Configuration surface area expanded

  • TreeExecutionConfig gained/expanded several tree-execution options related to orchestration and recovery, including:
    • tree.status, tree.promote, tree.auditBranches, tree.statusParallel, tree.validateState
    • tree.parallel, tree.maxConcurrency, tree.retry (attempts/delays/backoff patterns)
    • recovery options like markCompleted, skipPackages, retryFailed, skipFailed, resetPackage
    • tree.onPackageFocus callback for progress/integration hooks

Docs and package metadata

  • README received minor updates.
  • Dependencies were aligned to stable releases:
    • @eldrforge/tree-core and @eldrforge/git-tools now target ^1.0.0.
  • package.json sets engines.node to >=24.0.0.

Impact

For users running kodrdriv tree ...

  • Publish runs should be more resilient and less likely to:
    • incorrectly propagate prerelease versions
    • record versions for packages that were skipped
    • hang indefinitely during commit/publish subprocess steps
  • Better progress output and recovery affordances during parallel execution.

For integrators embedding this library

  • MCP/server scenarios are safer by default: no accidental console output when KODRDRIV_MCP_SERVER=true.
  • Additional configuration hooks (notably tree.onPackageFocus) enable richer UI/progress integrations.

Breaking changes / important considerations

  • Node.js requirement: engines.node is now >=24.0.0. If you were running on Node 18/20/22, you’ll need to upgrade Node to consume this version.
  • Logging behavior in MCP mode: if you relied on console output while KODRDRIV_MCP_SERVER=true, logs will now be suppressed unless you provide your own logger via setLogger().

Notes on compatibility

  • Automated scanning did not flag other obvious API-breaking changes, but the tree/publish execution behavior is materially more strict around prerelease propagation and skip semantics, which may affect workflows that previously relied on those side effects.