Next/v0.5.0 - #22
Conversation
Name the resolved mesh-root and workspace paths, explain that relative --mesh-root is cwd-anchored, and point at omitting the flag to place the mesh at the workspace root. Update the option help text and the e2e rejection assertion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stic Add wd.library-packaging planning note (JSR/npm library exports, the accord JSR resource-loading audit, downstream smoke test, CI wiring) as the deferred v0.4.0 follow-up, and board the Stagecraft named-head auto-version friendlier-error request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Record the registry decision (npm-only via dnt; JSR deferred because it does not polyfill Deno globals), the fs-purity guard scope (no Deno.Command/network in src/api/**), the defaults-embedding fix, and the module-graph finding that git subprocess is imported-but-not-called on the versionPayloads path via local_path_policy.ts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…f local_path_policy - src/api/fs_purity_test.ts walks the runtime (code) module graph of src/api/mod.ts via deno info and fails on any subprocess or network API in first-party modules; statically-visible dynamic imports are the sanctioned seam for CLI-only capability - repository-source git resolution moves to repository_source_git.ts, reached through repository_source.ts, which loads it lazily at the moment a repository/floating source is resolved; versionPayloads refuses such sources up front, so the library graph stays subprocess-free under static analysis - tryRunGit feature-detects Deno.Command via globalThis so the dnt/Node build neither type-checks nor links against a subprocess API its shim does not provide; without it, git resolution degrades to no-match instead of crashing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ic-API types - scripts/embed-defaults.ts generates src/runtime/config/generated/weave_defaults.ts from the two defaults documents the runtime loads (application.ttl, config-resolution.ttl); a byte-identical drift test guards the embedding - effective_config.ts serves embedded content when no defaultsRoot override is given, removing the last runtime import.meta.url resource read so the module graph works off a local checkout; explicit defaultsRoot overrides still read files - annotate the six public-API symbols the deno publish dry-run flagged as missing-explicit-type (turtle prefix declarations, builtin presentation profiles) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…de contract smoke - deno task build:npm-lib builds the library package from src/api/mod.ts with dnt (dual ESM/CJS, ES2022, @types/n3 for consumer type traversal) - deno task smoke:npm-lib packs the build, installs the tarball into a temp consumer outside the source tree, runs a real versionPayloads batch under Node, and asserts outcomes and mesh trees are byte-identical to the source-import path; the shared payload-mesh fixture moves to tests/support/payload_mesh_fixture.ts - ci.yml gains an npm-lib job; release-manual.yml builds, smokes, uploads, and (per npm_publish_mode) publishes the library alongside the existing wrapper/platform flow, with all publish jobs gated on both smokes; runbook documents the new steps and the trusted-publisher prerequisite for the new package name Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- bump root version to 0.5.0 (new published artifact: @semantic-flow/weave-lib) - write release-notes.v0.5.0 - point wd.programmatic-version-api consumers at the packaged library, keeping the pinned-source import documented - record library-packaging implementation status and decisions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe change adds the Changesnpm library distribution and validation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant BuildNpmLib
participant SmokeNpmLib
participant ReleaseWorkflow
CI->>BuildNpmLib: deno task build:npm-lib
BuildNpmLib->>SmokeNpmLib: produce dist/npm-lib
SmokeNpmLib->>SmokeNpmLib: pack and install tarball
SmokeNpmLib->>SmokeNpmLib: compare Node and Deno results
ReleaseWorkflow->>BuildNpmLib: build and upload weave-npm-lib
ReleaseWorkflow->>ReleaseWorkflow: npm publish with tag or dry-run
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
scripts/smoke-npm-lib.ts (1)
256-262: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer
@std/encoding/base64over a hand-rolled encoder.
encodeBase64here reimplements what@std/encoding/base64'sencodeBase64already provides forUint8Arrayinput.♻️ Proposed refactor
-import { fromFileUrl, join } from "`@std/path`"; +import { fromFileUrl, join } from "`@std/path`"; +import { encodeBase64 } from "`@std/encoding/base64`";-function encodeBase64(bytes: Uint8Array): string { - let binary = ""; - for (const byte of bytes) { - binary += String.fromCharCode(byte); - } - return btoa(binary); -}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/smoke-npm-lib.ts` around lines 256 - 262, Replace the hand-rolled encodeBase64 implementation with the existing encodeBase64 export from `@std/encoding/base64`, passing the Uint8Array directly. Remove the local binary-construction loop and update imports and call sites as needed while preserving the current encoded output.scripts/build-npm-lib.ts (1)
144-149: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate
requireArgumentValuehelper across the two new npm-lib scripts. Both scripts define the identical argument-validation helper (and near-identical--flag/--flag=valueparsing scaffolding), which will drift if one copy is updated without the other.
scripts/build-npm-lib.ts#L144-L149: extractrequireArgumentValue(and ideally the shared parseArgs pattern) into a smallscripts/lib/cli_args.tshelper and import it here.scripts/smoke-npm-lib.ts#L264-L269: import the same shared helper instead of redefining it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/build-npm-lib.ts` around lines 144 - 149, Extract the duplicated requireArgumentValue helper, and shared --flag/--flag=value parsing where practical, into scripts/lib/cli_args.ts. Update scripts/build-npm-lib.ts lines 144-149 and scripts/smoke-npm-lib.ts lines 264-269 to import and reuse the shared helper, removing their local definitions while preserving existing argument-validation behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 16-17: Update the actions/checkout step in the CI workflow to set
persist-credentials to false, ensuring the checkout does not retain the
GITHUB_TOKEN in local git configuration while leaving the existing checkout
behavior unchanged.
In @.github/workflows/release-manual.yml:
- Line 360: Update the release workflow’s publish argument construction so the
npm_tag input is passed through an environment variable and quoted at execution
time, rather than interpolated into the Bash array assignment. Add the required
id-token write permission and enable GitHub Releases provenance for npm
publishing, while preserving the selected tag behavior.
In `@documentation/notes/wd.todo.md`:
- Line 51: Update the unchecked packaging entry in the notes backlog to reflect
that the task is completed, or remove it if completion history is recorded
elsewhere. Align its version/status with v0.5.0 and the completed handoff
documented in wd.library-packaging, and ensure it no longer appears as active
deferred work.
In `@src/runtime/operational/repository_source_git.ts`:
- Around line 169-184: Update tryRunGit to catch subprocess construction and
output failures, including missing-git and permission-denied errors, and return
undefined for those failures. Preserve the existing undefined result for
unsuccessful command output so resolveRepositorySourceFloatingLocalPath can
continue its intended no-match fallback.
---
Nitpick comments:
In `@scripts/build-npm-lib.ts`:
- Around line 144-149: Extract the duplicated requireArgumentValue helper, and
shared --flag/--flag=value parsing where practical, into
scripts/lib/cli_args.ts. Update scripts/build-npm-lib.ts lines 144-149 and
scripts/smoke-npm-lib.ts lines 264-269 to import and reuse the shared helper,
removing their local definitions while preserving existing argument-validation
behavior.
In `@scripts/smoke-npm-lib.ts`:
- Around line 256-262: Replace the hand-rolled encodeBase64 implementation with
the existing encodeBase64 export from `@std/encoding/base64`, passing the
Uint8Array directly. Remove the local binary-construction loop and update
imports and call sites as needed while preserving the current encoded output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 28c9057b-54fa-4819-a386-886cf9ed6f26
⛔ Files ignored due to path filters (3)
deno.lockis excluded by!**/*.locksrc/runtime/config/generated/weave_defaults.tsis excluded by!**/generated/**src/runtime/config/generated/weave_defaults_test.tsis excluded by!**/generated/**
📒 Files selected for processing (27)
.github/workflows/ci.yml.github/workflows/release-manual.ymldeno.jsondocumentation/notes/release-notes.v0.5.0.mddocumentation/notes/wd.library-packaging.mddocumentation/notes/wd.programmatic-version-api.mddocumentation/notes/wd.release-runbook.mddocumentation/notes/wd.todo.mdscripts/build-npm-lib.tsscripts/embed-defaults.tsscripts/smoke-npm-lib.tssrc/api/fs_purity_test.tssrc/cli/run.tssrc/core/rdf/namespaces.tssrc/runtime/artifact_resolution/resolver.tssrc/runtime/config/effective_config.tssrc/runtime/extract/extract.tssrc/runtime/operational/local_path_policy.tssrc/runtime/operational/local_path_policy_test.tssrc/runtime/operational/repository_source.tssrc/runtime/operational/repository_source_git.tssrc/runtime/weave/artifact_loaders.tssrc/runtime/weave/raw_source_panels.tssrc/runtime/weave/version_execution.tstests/e2e/mesh_create_cli_test.tstests/integration/version_payloads_test.tstests/support/payload_mesh_fixture.ts
…weave-lib npm cannot configure a trusted publisher for a not-yet-existing package and cannot do an initial publish over OIDC (npm/cli#8544), so the first @semantic-flow/weave-lib publish is manual with classic auth, followed by trusted-publisher setup and the standard skip-mode repair rerun. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- ci/release workflows: set persist-credentials: false on the checkouts of the new npm-lib jobs, which run third-party npm lifecycle code - release-manual: pass npm_tag through an env var in both publish jobs instead of interpolating the workflow_dispatch string into bash source (zizmor template-injection) - repository_source_git: treat a missing git binary or denied run permission like an absent Deno.Command — tryRunGit returns undefined and resolution degrades to the typed no-match LocalPathAccessError instead of crashing with a raw runtime error; regression test runs resolution under an empty PATH - wd.todo: mark the library-packaging backlog entry done (v0.5.0, @semantic-flow/weave-lib), correcting the stale next/v0.4.1 reference Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary by CodeRabbit
New Features
@semantic-flow/weave-libnpm package with ESM/CommonJS support and TypeScript declarations for programmatic API access.Bug Fixes
weave mesh creatediagnostics when a mesh path is outside the workspace, including clearer guidance.Documentation