Skip to content

chore(release): register brepjs-voxel-wasm + boundary enforcement test#1238

Merged
andymai merged 1 commit into
mainfrom
chore/voxel-infra-gaps
Jun 6, 2026
Merged

chore(release): register brepjs-voxel-wasm + boundary enforcement test#1238
andymai merged 1 commit into
mainfrom
chore/voxel-infra-gaps

Conversation

@andymai
Copy link
Copy Markdown
Owner

@andymai andymai commented Jun 6, 2026

What

Closes the release/CI plumbing gap for the voxel domain. The voxel packages already landed on main, but their release-please wiring did not.

  • release-please: register brepjs-voxel-wasm as a release component (manifest entry at 0.1.0 + config entry) so the published package gets versioned. Exclude the experimental brepjs-voxel domain from the root brepjs package so its changes don't bump the library version.
  • Layer boundaries: make the scan root overridable via BOUNDARY_SRC_DIR (default src) so the enforcement script can run against throwaway fixtures, and add negative tests proving upward imports are actually rejected (ADR-0013 §9 — "add negative tests proving enforcement is live").

Why

Without the release-please registration, the published brepjs-voxel-wasm package wouldn't receive version bumps or releases. The boundary script previously only emitted a friendly "passed" line — a silent escape (e.g. a layer dir missing from get_layer) would pass unnoticed; the new tests guard against that.

Notes

The boundary-script change was re-derived onto main's current realpath --relative-to="$SRC_DIR" resolver (an earlier rewrite replaced the python3-normpath path the original patch targeted). Only the literal src/ strips were touched; main's resolver already honored $SRC_DIR.

Test plan

  • bash scripts/check-layer-boundaries.sh passes against real src/
  • npx vitest run tests/layerBoundaries.test.ts — 7/7 (4 forbidden-import rejections, 3 allowed-import passes)
  • Prettier clean on both JSON config files
  • Pre-push full test:ci + knip passed

Wire brepjs-voxel-wasm into release-please (manifest entry + component) so
the published package gets versioned, and exclude the experimental
brepjs-voxel domain from the root brepjs package.

Make the layer-boundary scan root overridable via BOUNDARY_SRC_DIR so the
enforcement can be exercised against throwaway fixtures, and add negative
tests proving upward imports (voxel L2 -> lattice/sketching L3, core L1 ->
voxel L2) are actually rejected (ADR-0013 sec 9).
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
brepjs Ready Ready Preview, Comment Jun 6, 2026 4:41am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Benchmark Results

Benchmark main PR Change
gridfinity-bin-v2 109.49 ms 101.53 ms -7.3%

All benchmarks within tolerance.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

size-limit report 📦

Path Size
total (all JS) 294.62 KB (0%)
brepjs 42.73 KB (0%)
brepjs/core 883 B (0%)
brepjs/result 327 B (0%)
brepjs/vectors 351 B (0%)
brepjs/topology 1.21 KB (0%)
brepjs/operations 385 B (0%)
brepjs/2d 3.08 KB (0%)
brepjs/sketching 730 B (0%)
brepjs/query 131 B (0%)
brepjs/measurement 153 B (0%)
brepjs/io 240 B (0%)
brepjs/worker 235 B (0%)
brepjs/quick 263 B (0%)

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 6, 2026

Greptile Summary

This PR wires up release-please CI plumbing for the brepjs-voxel-wasm package and hardens the layer-boundary enforcement script with negative tests. Both changes are self-contained and consistent with the existing patterns in the repository.

  • Release config: registers packages/brepjs-voxel-wasm as a versioned release component at 0.1.0 and excludes the experimental packages/brepjs-voxel domain from root version bumps — matching how other sub-packages (brepjs-verify, brepjs-viewer) are already handled.
  • Boundary script: makes SRC_DIR overridable via BOUNDARY_SRC_DIR (default src); the variable is correctly propagated into get_src_dir and the fallback python3/normpath resolver. The --staged branch intentionally retains the hardcoded src/**/*.ts filter since pre-commit hooks always run against the real source tree.
  • Tests: 7 Vitest cases (4 forbidden-import rejections, 3 allowed-import passes) use mkdtempSync + BOUNDARY_SRC_DIR to run the real script against throwaway fixtures; afterEach cleanup via rmSync is correct.

Confidence Score: 5/5

Safe to merge — changes are narrowly scoped to CI config and a test harness with no impact on runtime code.

All four changed files are either JSON config or non-runtime scripts/tests. The release-please additions follow the existing package pattern exactly. The shell script change is a minimal two-site substitution with correct variable quoting. The new test file exercises the real script against isolated temp fixtures and cleans up after itself reliably.

No files require special attention.

Important Files Changed

Filename Overview
.release-please-manifest.json Adds packages/brepjs-voxel-wasm at initial version 0.1.0 — straightforward manifest registration.
release-please-config.json Adds packages/brepjs-voxel-wasm as a node release component; excludes experimental packages/brepjs-voxel from the root package — consistent with how existing packages are handled.
scripts/check-layer-boundaries.sh Makes SRC_DIR overridable via BOUNDARY_SRC_DIR env var; correctly propagates the variable to get_src_dir and the fallback python resolver. The --staged branch still hardcodes src/**/*.ts but that's intentional.
tests/layerBoundaries.test.ts New Vitest file with 7 tests (4 forbidden-import rejections, 3 allowed-import passes) using throwaway temp fixtures and BOUNDARY_SRC_DIR. Logic and cleanup are correct.

Reviews (1): Last reviewed commit: "chore(release): register brepjs-voxel-wa..." | Re-trigger Greptile

@andymai andymai merged commit fa8dd41 into main Jun 6, 2026
29 checks passed
@andymai andymai deleted the chore/voxel-infra-gaps branch June 6, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant