Skip to content

chore: sync uutils/coreutils argument surfaces and vendored modules - #2161

Merged
chaliy merged 2 commits into
mainfrom
chore/coreutils-args-drift
Jul 13, 2026
Merged

chaliy merged 2 commits into
mainfrom
chore/coreutils-args-drift

Conversation

@chaliy

@chaliy chaliy commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Automated regeneration of argument surfaces and vendored modules
ported from uutils/coreutils.

Source revision: 8613dffab (was 6579cc2)
Utilities: cat ls mktemp od readlink realpath shuf stat tac tee truncate
Vendored modules: format
Trigger: .github/workflows/coreutils-args-drift.yml

This PR bumps UUTILS_REVISION in
crates/bashkit/src/builtins/generated/mod.rs, the matching
<util>_args.rs files, and any vendored module trees
atomically — args codegen, module-vendor mode, and the
body-drift harness all stay aligned to the same rev.

Review the diff to confirm whether upstream:

  • Added flags we should now expose
  • Removed/renamed flags we should drop or migrate
  • Reworded help text in user-visible ways
  • Changed body code in vendored modules (e.g. format/)

Squash-merge as a human so the merge commit is attributed
correctly per AGENTS.md. Intermediate bot commits in this PR
are discarded by squash.

Design: knowledge/runtimes/coreutils-args-port.md.

… modules

Regenerated by `bashkit-coreutils-port` against uutils/coreutils@4988134fa.

Utilities: cat ls mktemp od readlink realpath shuf stat tac tee truncate

Vendored modules: format
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 13, 2026 •

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 0914be7 Commit Preview URL

Branch Preview URL
Jul 13 2026, 09:52 AM

The uutils HEAD sync pulled two changes that the drift pipeline did not
yet handle:

- format/human.rs now carries `#[cfg(feature = "i18n-decimal")]`. bashkit
  has no i18n surface (the port tool hard-errors on Fluent/translate), so
  the feature is never defined and the gated branch is compiled out.
  Declare it via a [lints.rust] check-cfg so `unexpected_cfgs` (denied by
  -D warnings) stops flagging the vendored code.

- module-mode output (format/, num_parser.rs, extendedbigdecimal.rs) was
  never run through rustfmt; the args step only formats top-level
  generated/*.rs. Add a fmt step over the whole generated/ tree so future
  drift runs stay rustfmt-clean, and format the current output.

Verified locally: cargo build -p bashkit (RUSTFLAGS=-D warnings), cargo
clippy -p bashkit --lib, and cargo fmt --check all pass.
@chaliy chaliy changed the title chore: sync uutils/coreutils argument surfaces and vendored modules chore: sync uutils/coreutils argument surfaces and integrate new i18n-decimal gate Jul 13, 2026
@chaliy
chaliy merged commit 0a83297 into main Jul 13, 2026
37 checks passed
@chaliy
chaliy deleted the chore/coreutils-args-drift branch July 13, 2026 10:03
@github-actions github-actions Bot changed the title chore: sync uutils/coreutils argument surfaces and integrate new i18n-decimal gate chore: sync uutils/coreutils argument surfaces and vendored modules Jul 20, 2026
chaliy added a commit that referenced this pull request Oct 17, 2026
…ed (#2745)

`gh pr view <branch>` resolves a pull request for that branch in any state.
Once the drift PR was closed unmerged it kept matching, so every later weekly
run force-pushed the branch and edited that closed PR instead of opening a new
one: the run reported success and the drift never surfaced. #2161 was closed in
July 2026 and silently absorbed every run after it, including today's dispatch,
which regenerated 20 generated files and opened nothing.

Look up open PRs only (`gh pr list --head <branch> --state open`) and create one
otherwise.

Regression test executes the workflow step with stubbed `gh`/`git`: with only a
closed PR matching, the step must call `pr create`, not `pr edit`; with one open,
it must still update in place.
chaliy added a commit that referenced this pull request Oct 20, 2026
…em (#2760)

The weekly Coreutils Args Drift run regenerated the drift, force-pushed it to
`chore/coreutils-args-drift`, then died on `gh pr create` with "GitHub Actions
is not permitted to create or approve pull requests" (run 39234801977). The run
went red after all regeneration and tests were green, and no PR ever opened, so
the drift stayed invisible — the same silent-absorption mode the open-PR-only
lookup was added to prevent (#2161), through a different door.

The job token can push (it only needs `contents: write`) but cannot open a pull
request while "Allow GitHub Actions to create and approve pull requests" is off,
which is the setting worth keeping since the same switch also governs approvals.
So the step is split in two: the branch goes up on `github.token`, and the PR is
opened with a PAT read from Doppler's `GITHUB_TOKEN`, gated on `DOPPLER_TOKEN`
and masked before it crosses a step boundary — the pattern `ci.yml` already uses
for privileged CI credentials.

With no PAT the PR step fails naming the branch instead of skipping the PR: the
drift is pushed by then, so a green run without a PR would reintroduce silent
absorption.

The secret stays on the right side of this workflow's existing boundary. The
`regenerate` job is the only one that builds or executes third-party uutils
code, and it has no Doppler step and no secret access; `open-pr` holds the PAT
and never checks out, builds or runs uutils. The workflow is `schedule` +
`workflow_dispatch` only, so no pull-request trigger can reach the secret. That
contract is now written down in knowledge/runtimes/coreutils-args-port.md.

Regression tests pin both halves: a missing PAT is a red run that touches no PR,
and the push keeps the job token while only the PR step gets the PAT.

Note for follow-up: this depends on Doppler holding a `GITHUB_TOKEN` with
`pull-requests: write` on this repository, which could not be verified from the
sandbox. A `workflow_dispatch` run confirms it end to end; if the key is absent
the run now says so explicitly.
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