Skip to content

chore(builtins): pin uutils revision as single source of truth#1537

Merged
chaliy merged 1 commit intomainfrom
fix/issue-1530-uutils-pin
May 5, 2026
Merged

chore(builtins): pin uutils revision as single source of truth#1537
chaliy merged 1 commit intomainfrom
fix/issue-1530-uutils-pin

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 5, 2026

Summary

Closes the source-of-truth uutils revision pin acceptance item
from #1530. Adds pub const UUTILS_REVISION: &str = "<rev>" in
crates/bashkit/src/builtins/generated/mod.rs as the single rev
shared across:

  1. The bashkit-coreutils-port codegen tool (drift workflow checks
    out uutils at this rev before regenerating <util>_args.rs).
  2. The coreutils_differential_tests body-drift harness (drift
    workflow builds the coreutils multicall from the same rev).
  3. just regen-coreutils-args (reads the pin and checks out the
    local uutils clone at it before regenerating).

Why

Before this PR, the args drift workflow used uutils@HEAD and the
new body-drift harness used a separately-installed coreutils binary
with no version coordination. Reviewing an auto-PR meant guessing
which uutils rev a given divergence applied to. With the pin, the
two checks always run against the same upstream state.

Static invariant

builtins::tests::generated_args_headers_match_pinned_uutils_revision
walks generated/*_args.rs and asserts every header references the
pinned rev. A manual partial regeneration that forgets to bump (or
mis-bumps) the pin fails in CI before review.

Drift workflow

Now runs against upstream HEAD and atomically bumps UUTILS_REVISION
together with the regenerated files in one PR — args codegen and
body-drift gate never diverge across an auto-PR boundary. The PR body
shows the old-vs-new pinned rev so reviewers see the bump.

Pre-bump rev for cat/tac

Was c23dc67 (POC). Regenerated at the current pinned rev 39364b6;
only header lines change — no semantic drift in the generated output.

Test plan

  • cargo test -p bashkit --lib builtins::tests — green; new
    generated_args_headers_match_pinned_uutils_revision test
    passes.
  • cargo clippy -p bashkit --all-targets --all-features -- -D warnings — green.
  • cargo fmt --check — green.

Scope

Part of #1530. The remaining acceptance item (per-flag diff
coverage for tac flipping from diff_reason rows to real assertions
as tac -b/-r/-s are implemented) follows when those flags land.


Generated by Claude Code

Adds `UUTILS_REVISION: &str = "<rev>"` in
`crates/bashkit/src/builtins/generated/mod.rs` as the single source of
truth for the uutils version that:

- The codegen tool (drift workflow checks out uutils@UUTILS_REVISION
  before regenerating <util>_args.rs).
- The body-drift harness (drift workflow builds the coreutils
  multicall from the same rev).
- `just regen-coreutils-args` (reads the pin and checks out the local
  uutils clone at it before regenerating).

Static invariant test in builtins/mod.rs walks generated/*_args.rs
and asserts every header references the pinned rev. Manual partial
regenerations that forget to bump (or mis-bump) the pin fail in CI
before review.

Drift workflow now runs against upstream HEAD and atomically bumps
UUTILS_REVISION together with the regenerated files in one PR — args
codegen and body-drift gate never diverge across an auto-PR boundary.
The PR body shows the old-vs-new pinned rev so reviewers see the bump.

Justfile `regen-coreutils-args` reads the pin and discovers utils
from the manifest (every `pub mod <util>_args;` line), so adding a new
util is one edit in `generated/mod.rs`.

Pre-bump rev for cat/tac was `c23dc67` (POC). Regenerated at the
current pinned rev `39364b6`; only header lines change — no semantic
drift in the generated output.

Spec: coreutils-args-port.md gains "Source-of-truth uutils revision
pin" subsection and the CI-guard description tracks the new flow.

Closes the source-of-truth pin acceptance item from #1530.

Part of #1530.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 072a86a Commit Preview URL

Branch Preview URL
May 05 2026, 08:27 PM

@chaliy chaliy merged commit 3a3e0a7 into main May 5, 2026
34 checks passed
@chaliy chaliy deleted the fix/issue-1530-uutils-pin branch May 5, 2026 20:40
chaliy added a commit that referenced this pull request May 6, 2026
Minor release `0.4.1` → `0.5.0`. Two new builtins (`shuf`, `truncate`),
a coreutils-codegen pipeline that ports uutils' `uu_app()` clap
definitions for `cat`/`tac`/`truncate`/`shuf`/`readlink`, and `tool_def`
flag-syntax improvements.

## Highlights

- **Coreutils argument surface via codegen** — Ports uutils' `uu_app()`
clap definitions into bashkit so builtins share the real coreutils
argument shape; `cat`, `tac`, `truncate`, `shuf`, and `readlink` now
flow through this surface, with a coreutils differential testing harness
to catch parity drift. Pipeline reads a single pinned uutils revision so
generated builtins, the differential harness, and CI all agree on the
upstream source of truth (#1529, #1535, #1536, #1537, #1538, #1542).
- **Site updates** — Bashkit agent skill is now published on the site,
alongside rustdoc guides and content signal declarations for
discoverability.

## What's Changed

* refactor(builtins): migrate readlink to codegen-ported argument
surface (#1542)
* chore(site): publish bashkit agent skill (#1541)
* chore(site): declare content signals
* docs(site): publish rustdoc guides
* feat(builtins): add shuf via codegen with helper-fn inlining (#1538)
* chore(builtins): pin uutils revision as single source of truth (#1537)
* feat(builtins): add truncate via codegen-ported argument surface
(#1536)
* test(builtins): add coreutils differential testing harness (#1535)
* feat(builtins): port uutils argument surfaces via codegen (POC: cat,
tac) (#1529)
* feat(tool_def): accept --flag key=value... syntax for object/array
flags (#1528)
* fix(tool_def): coerce stringified JSON for array/object flag schemas
(#1527)

## Publish-readiness report

Per the updated `specs/release-process.md`:

- [x] `cargo fmt --check` clean
- [x] `cargo clippy --all-targets --all-features -- -D warnings` clean
- [x] `cargo build` clean
- [x] Versions synced across `Cargo.toml`,
`crates/bashkit-cli/Cargo.toml`, `crates/bashkit-js/package.json`,
`package-lock.json`, `Cargo.lock`
- [x] `cargo publish --dry-run -p bashkit --allow-dirty` (after CI's
monty-strip): **success**
- [x] `cargo publish --dry-run -p bashkit-cli`: blocked only on ordering
(`bashkit 0.5.0` not yet on crates.io) — resolves at real publish time
when `publish-bashkit` runs first per `publish.yml`'s `needs:` chain.
- [x] New `0.5.0` > latest published versions on crates.io / PyPI / npm
(`0.4.1`).

## Companion change

This branch also includes `chore(specs): document publish verification
and post-merge monitoring`, codifying the verify-before-tag and
watch-after-merge flow that this release follows.

On merge, `release.yml` will create the GitHub Release `v0.5.0` and
dispatch publish workflows for crates.io, PyPI, npm, and Homebrew.

**Full Changelog**:
v0.4.1...v0.5.0

---
_Generated by [Claude
Code](https://claude.ai/code/session_01SvuLdA8pMAmP4woG2HqxKw)_
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