Skip to content

Next/v0.5.1 - #23

Merged
djradon merged 6 commits into
mainfrom
next/v0.5.1
Jul 29, 2026
Merged

Next/v0.5.1#23
djradon merged 6 commits into
mainfrom
next/v0.5.1

Conversation

@djradon

@djradon djradon commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added dry-run forecasting for versionPayloads, including planned outcomes and affected paths without writing changes.
    • Added machine-readable build information via weave --version --json.
    • Published the programmatic npm library alongside the CLI with aligned versioning.
  • Documentation

    • Expanded guidance for dry runs, cooperative locking, write-failure recovery, and release verification.
  • Release

    • Updated the release to version 0.5.1 with improved binary metadata validation.

djradon and others added 5 commits July 28, 2026 21:15
…an review folded in

Dispositions: implement dryRun (executed discriminant, single write-manifest
source of truth), weave --version --json (pre-cliffy fast path, CLI binary
stamping only), document locking pattern (.weave/lock), conservative
plan-conflict repair, behavioral-changelog rule, README version-line note;
correct the reviewer's missing-tag claim (v0.4.0 tag exists at 37f4b8f and
contains 23f50af); defer programmatic validateMesh to its own slice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iscriminant

- one ordered combined-write manifest now feeds preflight, the writer,
  and the dry-run forecast, so forecast and effect cannot drift
- dryRun: true runs identical admit/load/plan behavior (all refusals
  included), stops after preflight, and returns executed: false with
  would-be outcomes and path lists; real runs report executed: true
- integration tests: forecast/actual equivalence, no-mutation byte
  checks, per-stage refusal parity (admit/load/preflight), overwrite
  forecasts, no-op forecasts, dryRun admission
- the off-tree npm smoke gains a dry-run leg proving the packaged Node
  build forecasts identically to the source import
- wd.programmatic-version-api amended with the dry-run contract

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- exact --version --json (either order, -V accepted) is handled before
  cliffy parses, since cliffy 1 rejects combining its version option;
  everything else falls through unchanged and the plain 'weave <version>'
  line is now covered by a byte-stability test
- src/generated/build_info.ts ships checked-in nulls; release builds
  stamp commit/built via build:binaries --commit/--built with the
  original bytes restored in finally, so the tree never stays dirty
- the release workflow passes github.sha and its binary smoke asserts
  the reported commit equals the workflow SHA; ordinary CI compiles a
  Linux binary, verifies the stamp, and checks the tree stays clean

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- bump root version; release notes for the consumer-feedback slice,
  including the retroactive v0.4.0 disclosure (raw-source inline limit
  1 MiB -> 4 MiB in 23f50af)
- wu.api-reference: dry-run usage, recommended .weave/lock advisory
  locking pattern, conservative write-failure repair procedure, release
  verification guidance
- wu.cli-reference: --version forms; runbook: behavioral-changelog rule;
  bump-version stub nudges naming behavioral changes
- both npm READMEs state the weave/weave-lib shared version line
- wd.todo: programmatic validateMesh recorded as the v0.6.0 candidate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Only weave-lib@0.5.0 ever reached the registry (the one-time manual
first publish); the wrapper/platform packages, tag, and GitHub Release
for 0.5.0 were never cut. Folding means one Release Manual run publishes
everything at 0.5.1 through trusted publishing with no expected-failure
jobs. release-notes.v0.5.1 now carries the combined library-packaging +
consumer-feedback content; release-notes.v0.5.0 is deleted; docs and
task notes updated; weave-lib@0.5.0 gets deprecated after the release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@djradon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a7a03258-1d07-417f-9077-8f5fbe0f7238

📥 Commits

Reviewing files that changed from the base of the PR and between a48cc83 and 44b32d2.

📒 Files selected for processing (6)
  • documentation/notes/release-notes.v0.5.1.md
  • documentation/notes/wd.consumer-feedback-0.5.1.md
  • documentation/notes/wd.consumer-feedback-0.5.1.source.md
  • documentation/notes/wd.library-packaging.md
  • documentation/notes/wd.todo.md
  • scripts/release/npm.ts
📝 Walkthrough

Walkthrough

This release updates versionPayloads with dry-run forecasting and combined write manifests, adds stamped binary and JSON version metadata, updates npm smoke and workflow verification, bumps the package to v0.5.1, and documents the API, release, packaging, and compatibility changes.

Changes

Version 0.5.1 release slice

Layer / File(s) Summary
Dry-run planning and manifest execution
src/api/version_payloads.ts, tests/integration/*, scripts/smoke-npm-lib.ts, documentation/notes/wd.programmatic-version-api.md, documentation/notes/wu.api-reference.md
versionPayloads accepts dryRun, returns executed, derives forecasts from a combined manifest, skips writes during dry runs, and validates parity across API and npm paths.
Stamped binaries and JSON version output
scripts/build-binaries.ts, src/cli/run.ts, .github/workflows/*, tests/scripts/*, tests/e2e/*, deno.json
Binary builds accept and restore stamped commit/timestamp metadata; --version --json exposes it; workflows and tests verify the resulting values.
Release contracts and package documentation
documentation/notes/*, scripts/build-npm-lib.ts, scripts/release/npm.ts, scripts/bump-version.ts
v0.5.1 release notes and supporting documentation describe dry runs, version identification, package alignment, publishing history, and behavioral-change reporting.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • semantic-flow/weave#13: Related binary build and release-pipeline work involving build metadata stamping and validation.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title matches the release branch name but is too vague to describe the actual changes in the pull request. Use a concise title that names the main change, such as adding v0.5.1 release stamping, dry-run support, and CLI/version updates.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch next/v0.5.1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@djradon

djradon commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Context for this PR (from wd.consumer-feedback-0.5.1, Codex-reviewed):

  • Responds to the 2026-07-28 Stagecraft consumer review and folds the unreleased v0.5.0 into v0.5.1 — only weave-lib@0.5.0 ever reached the registry (the one-time manual first publish); release notes are combined into release-notes.v0.5.1.
  • versionPayloads({ dryRun: true }): full admit/load/plan with identical refusals, zero writes, forecast result with a required executed: boolean discriminant; preflight, writer, and forecast share one ordered write manifest so they cannot drift.
  • weave --version --json{version, commit, built} via a pre-cliffy fast path; the plain weave <version> line is unchanged and byte-stability-tested. Release builds stamp the commit with restore-in-finally; workflows assert it equals the workflow SHA; ordinary CI gains a Linux compile smoke.
  • Docs: .weave/lock advisory locking pattern, conservative write-failure repair procedure, release verification, behavioral-changelog rule, weave/weave-lib version-line statement in both READMEs.

Release path after merge: Release Manual rehearsal (dry-run + draft), then publish + publish — no expected-failure jobs — then:

npm deprecate @semantic-flow/weave-lib@0.5.0 "Pre-release publish with no matching CLI release; use 0.5.1+."

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.00000% with 27 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
scripts/build-binaries.ts 76.81% 14 Missing and 2 partials ⚠️
src/api/version_payloads.ts 87.64% 9 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
documentation/notes/wd.release-runbook.md (1)

94-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid hard-wrapping the new Markdown paragraph.

Keep the historical prose as an unwrapped paragraph; only the shell command should remain formatted as a code block. As per coding guidelines, **/*.md: Avoid hard-wrapping markdown files to keep them easier to edit.

🤖 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 `@documentation/notes/wd.release-runbook.md` around lines 94 - 102, In the
“First weave-lib publish (historical record)” section, keep the historical prose
as one unwrapped Markdown paragraph and remove any hard line wrapping within it.
Preserve the npm deprecate command as the existing fenced code block and leave
the surrounding content unchanged.

Source: Coding guidelines

src/api/version_payloads.ts (2)

610-659: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: redundant throw/catch in the created-entries existence check.

Lines 633-640 throw weave target already exists inside the very try that guards Deno.stat, so it's immediately caught by the adjacent catch and rethrown (since it isn't Deno.errors.NotFound). Functionally correct, but the control flow reads like the error is meant to escape the catch — worth a quick rewrite (e.g. check existence with a boolean instead of throwing inside the try) for clarity.

🤖 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 `@src/api/version_payloads.ts` around lines 610 - 659, Rewrite the
created-entry existence check in preflightCombinedPlan so the Deno.stat result
is evaluated without throwing the “weave target already exists” error inside the
try block. Continue on Deno.errors.NotFound, propagate other stat errors, and
throw the existing conflict error only after a successful stat.

371-394: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Forecast/effect categorization is duplicated, not shared.

The dry-run branch derives createdPaths/updatedPaths via manifest.filter((entry) => entry.created) here, while the real write path (Lines 686-691 in writeCombinedPlan) re-derives the same split independently during the write loop. The header comment on the manifest type (Lines 561-562) states the whole point is that "forecast and effect cannot drift" — but that guarantee currently rests on two hand-written filters staying in sync, not on shared code. A future edit to one classification without the other would silently break dry-run/real parity without a type error.

Consider extracting a single helper, e.g. partitionManifest(manifest) => { createdPaths, updatedPaths }, and having both the dry-run branch and writeCombinedPlan's bookkeeping build off it.

♻️ Suggested extraction
+function manifestPathsByCreated(
+  manifest: readonly CombinedWriteManifestEntry[],
+): { createdPaths: string[]; updatedPaths: string[] } {
+  return {
+    createdPaths: manifest.filter((e) => e.created).map((e) => e.path),
+    updatedPaths: manifest.filter((e) => !e.created).map((e) => e.path),
+  };
+}
+
 if (admitted.dryRun) {
-    return {
-      meshBase: prepared.meshState.meshBase,
-      executed: false,
-      outcomes,
-      createdPaths: manifest.filter((entry) => entry.created)
-        .map((entry) => entry.path),
-      updatedPaths: manifest.filter((entry) => !entry.created)
-        .map((entry) => entry.path),
-    };
+    const { createdPaths, updatedPaths } = manifestPathsByCreated(manifest);
+    return {
+      meshBase: prepared.meshState.meshBase,
+      executed: false,
+      outcomes,
+      createdPaths,
+      updatedPaths,
+    };
 }
🤖 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 `@src/api/version_payloads.ts` around lines 371 - 394, Extract the manifest
classification used by the dry-run branch and writeCombinedPlan into one shared
partitionManifest helper returning createdPaths and updatedPaths. Replace the
dry-run filters and writeCombinedPlan’s independent bookkeeping with this helper
so both forecast and effect always use the same classification.
🤖 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 `@documentation/notes/release-notes.v0.5.1.md`:
- Around line 39-41: Reconcile the v0.5.0/v0.5.1 release-status documentation:
in documentation/notes/release-notes.v0.5.1.md lines 39-41, use future tense for
weave-lib deprecation unless it has been verified; update the remaining v0.5.0
release-plan references in documentation/notes/wd.library-packaging.md lines
24-26; and align the completed library entry, unchecked distribution task, and
open post-release deprecation task in documentation/notes/wd.todo.md lines
51-52.

In `@documentation/notes/wd.consumer-feedback-0.5.1.md`:
- Line 11: Update the v0.5.1 review note to remove the host-specific
~/Downloads/weave0.5.1consumerreview.md reference; store the source review in
the repository or replace it with a durable repository reference that other
maintainers and CI can access.
- Around line 83-90: Update the v0.5.1 implementation checklist so shipped work
is no longer shown as pending: mark the completed dry-run, build stamping, JSON
version, and documentation items as done, or relabel the section explicitly as
historical. Keep any genuinely outstanding tasks unchecked and preserve the
existing release-notes completion entry.

In `@scripts/release/npm.ts`:
- Around line 209-212: Update the generated README text in the release logic to
reference the scoped package identifier `@semantic-flow/weave-lib`@${version}
instead of weave-lib@${version}, preserving the existing version interpolation
and surrounding explanation.

---

Nitpick comments:
In `@documentation/notes/wd.release-runbook.md`:
- Around line 94-102: In the “First weave-lib publish (historical record)”
section, keep the historical prose as one unwrapped Markdown paragraph and
remove any hard line wrapping within it. Preserve the npm deprecate command as
the existing fenced code block and leave the surrounding content unchanged.

In `@src/api/version_payloads.ts`:
- Around line 610-659: Rewrite the created-entry existence check in
preflightCombinedPlan so the Deno.stat result is evaluated without throwing the
“weave target already exists” error inside the try block. Continue on
Deno.errors.NotFound, propagate other stat errors, and throw the existing
conflict error only after a successful stat.
- Around line 371-394: Extract the manifest classification used by the dry-run
branch and writeCombinedPlan into one shared partitionManifest helper returning
createdPaths and updatedPaths. Replace the dry-run filters and
writeCombinedPlan’s independent bookkeeping with this helper so both forecast
and effect always use the same classification.
🪄 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: 559a83c4-8562-442d-b82b-f55666a99d91

📥 Commits

Reviewing files that changed from the base of the PR and between fcabe77 and a48cc83.

⛔ Files ignored due to path filters (1)
  • src/generated/build_info.ts is excluded by !**/generated/**
📒 Files selected for processing (23)
  • .github/workflows/ci.yml
  • .github/workflows/release-manual.yml
  • deno.json
  • documentation/notes/release-notes.v0.5.0.md
  • documentation/notes/release-notes.v0.5.1.md
  • documentation/notes/wd.consumer-feedback-0.5.1.md
  • documentation/notes/wd.library-packaging.md
  • documentation/notes/wd.programmatic-version-api.md
  • documentation/notes/wd.release-runbook.md
  • documentation/notes/wd.todo.md
  • documentation/notes/wu.api-reference.md
  • documentation/notes/wu.cli-reference.md
  • scripts/build-binaries.ts
  • scripts/build-npm-lib.ts
  • scripts/bump-version.ts
  • scripts/release/npm.ts
  • scripts/smoke-npm-lib.ts
  • src/api/version_payloads.ts
  • src/cli/run.ts
  • tests/e2e/weave_cli_test.ts
  • tests/integration/version_payloads_test.ts
  • tests/scripts/build_binaries_test.ts
  • tests/scripts/release_metadata_test.ts
💤 Files with no reviewable changes (1)
  • documentation/notes/release-notes.v0.5.0.md

Comment thread documentation/notes/release-notes.v0.5.1.md
Comment thread documentation/notes/wd.consumer-feedback-0.5.1.md Outdated
Comment thread documentation/notes/wd.consumer-feedback-0.5.1.md Outdated
Comment thread scripts/release/npm.ts Outdated
- archive the Stagecraft review verbatim in-repo
  (wd.consumer-feedback-0.5.1.source) and drop the host-local Downloads
  reference
- reconcile release-status tense across release-notes.v0.5.1,
  wd.library-packaging, and wd.todo: weave-lib@0.5.0 deprecation is the
  final release step, not already done; also close the stale unchecked
  library-distribution backlog entry that duplicated the shipped work
- mark the completed v0.5.1 implementation checklist items done (the
  Stagecraft reply remains the one open item)
- wrapper README: use the full scoped @semantic-flow/weave-lib name

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@djradon
djradon merged commit f7b8262 into main Jul 29, 2026
7 checks passed
@djradon
djradon deleted the next/v0.5.1 branch July 29, 2026 17:26
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