Skip to content

Boundra v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 02:09
· 16 commits to main since this release
639f8f7

Boundra v0.4.0

Release Summary

Boundra v0.4.0 makes development diagnostics reusable beyond the built-in Vite integration while improving the accuracy and configurability of domain boundary enforcement.

The development error view is now available through the framework-neutral boundra/ui export, so Next.js and other browser hosts can render the same normalized runtime and boundary diagnostics without depending on the Vite adapter.

This release also replaces BR-003's stack-specific dependency checks with a configurable capability policy while preserving the previous behavior by default, and adds a fixture-driven parser correctness suite to reduce both false positives and missed imports.

Highlights

  • Added a reusable browser development error view through boundra/ui.
  • Reused the same diagnostic renderer across the Vite adapter and custom browser integrations.
  • Added APIs to report, replace, clear, and dispose runtime and boundary diagnostics.
  • Added optional editor navigation for hosts outside the Vite integration.
  • Made BR-003 capability classification configurable for external dependencies, workspace packages, and application paths.
  • Added configurable shared-layer denied capabilities while keeping the existing UI, database, and runtime restrictions as defaults.
  • Improved Svelte import scanning by preserving script blocks while masking markup.
  • Improved detection of multiple require() and dynamic import() calls on the same line.
  • Reduced parser false positives around comments, strings, method-like calls, non-literal imports, escaped paths, and UTF-8 source text.
  • Added a fixture-driven parser correctness corpus that validates exact source file, line, and import-path results.

Installation

Install or update Boundra on Node.js 20 or later:

pnpm add boundra@0.4.0 zod
pnpm exec boundra check-boundaries

Vite applications can continue using the existing integration:

import { boundra } from "boundra/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [boundra()],
});

Next.js and other browser hosts can create the development error view directly:

import { createBoundraErrorView } from "boundra/ui";

const view = createBoundraErrorView();
view.reportRuntime(error.toJSON());

The native CLI can also be installed from the tagged Rust source:

cargo install --git https://github.com/qtaghdi/boundra --tag v0.4.0 boundra-cli

Breaking Changes

None.

Existing Vite integration, runtime error JSON, CLI commands, boundary diagnostic output, and default BR-003 behavior remain compatible. Projects that do not configure checkBoundaries.capabilities or checkBoundaries.policy continue to use the previous built-in classifications.

Known Limitations

  • Automatic capture of unhandled browser BoundraRuntimeError values is currently provided by the Vite adapter. Other browser hosts must explicitly forward normalized diagnostics to boundra/ui.
  • Next.js integrations must keep the error view in a Client Component and should pass only normalized error.toJSON() data across server/client boundaries.
  • Automatic editor navigation is configured by the Vite development server. Other hosts must provide their own openInEditor callback.
  • The error view intentionally renders only normalized diagnostic fields and does not expose raw contract inputs, results, schema-provider errors, or causes.
  • The parser correctness corpus covers Boundra's supported import-extraction surface, but broader differential validation against a full AST parser remains future work.

Verification

  • Rust workspace tests and Clippy with warnings treated as errors
  • parser correctness corpus and configurable BR-003 integration tests
  • TypeScript workspace and example type checks
  • runtime, UI, and Vite tests
  • clean-room package verification including the boundra/ui export
  • npm package build and pack verification
  • Node.js 20, 22, and 24 runtime verification
  • Linux x64, macOS x64/arm64, and Windows x64 native CLI release builds