fix(build): skip rerun-if-changed for .files() in Buf mode#59
Open
hobostay wants to merge 1 commit intoanthropics:mainfrom
Open
fix(build): skip rerun-if-changed for .files() in Buf mode#59hobostay wants to merge 1 commit intoanthropics:mainfrom
hobostay wants to merge 1 commit intoanthropics:mainfrom
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
In Buf mode, `.files()` holds proto-relative names (e.g. "my/service.proto"), not filesystem paths. Emitting `cargo:rerun-if-changed` for these points cargo at non-existent files, forcing a rebuild on every invocation. This is the same issue that was fixed for Precompiled mode in anthropics#56, but Buf mode was missed in that fix.
27e9444 to
e79f695
Compare
Collaborator
|
@hobostay you need to post "I have read the CLA Document and I hereby sign the CLA" here too - I know you did this for the buffa repo, but the CLA records are separately managed in each repo. |
iainmcgin
approved these changes
Apr 30, 2026
iainmcgin
added a commit
that referenced
this pull request
Apr 30, 2026
…r trailers) (#73) Bumps the CLA assistant action from `eeb7f3f` (v2.7.1) to `1ecf0d2f`. ## What's new in the action - **Impersonation guard** — new `require-opener-as-author` input (default `true`): fails the check if the PR opener is not recorded as an author or `Co-authored-by` of any commit in the PR. Guards against an attacker opening a PR whose commits are attributed to a trusted identity. Emits an `opener_not_in_commits` output regardless of pass/fail. Runs before the allowlist filter, so allowlisted maintainers are not exempt. - **PR opener and `Co-authored-by:` trailers join the committer set** — previously only `commit.author` was checked. The PR submitter and any co-author trailers must now also sign (or be allowlisted). Noreply-form trailer emails (`<id>+<login>@users.noreply.github.com`) are parsed directly to login/id. - **Actionable unlinked-email guidance** — when a commit author's email is not linked to any GitHub user, the bot now posts a `> [!WARNING]` block listing each unlinked email with concrete remediation (link at github.com/settings/emails, or rewrite commands). - Dead-404-path bugfix (signatures-file bootstrap now works first-time), broken-markdown fix in the signed list, pagination for comments/runs/commits, TypeScript 6, knip/publint/actionlint. - Removed `signed-empty-commit-message` input (we don't use it). ## Config Kept `require-opener-as-author` at the default `true`. No new inputs wired. Allowlist preserved verbatim. ## Operational impact - **Author-rewrite for unlinked-email contributors** (e.g. the recent author-rewrite on PR #59) — still works: the contributor is the PR opener and appears via the `Co-authored-by:` trailer, so no opener mismatch. They are now correctly required to sign. - **Signed-squash for unsigned fork commits** — the squash commit message **must include** `Co-authored-by: <login> <id+login@users.noreply.github.com>` for the PR opener, or the impersonation guard will fail the check. ## Note `pull_request_target` runs the workflow from the **base** branch, so this PR's own CLA check still uses the old `eeb7f3f` pin. The new action is first exercised on the next PR opened/synced after this merges. Fixes #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo:rerun-if-changedfor.files()entries when usingConfig::use_buf(), since those entries are proto-relative names (not filesystem paths)Problem
In Buf mode,
.files()holds proto-relative names like"my/service.proto", not filesystem paths. Emittingcargo:rerun-if-changed=my/service.protopoints cargo at a non-existent file, which forces a rebuild on every invocation.This is the same issue that was fixed for
Precompiledmode in #56, butBufmode was missed in that fix. The comment onDescriptorSource::Precompiledalready explains the rationale:The same applies to
Bufmode — the docs onConfig::use_buf()say:Test plan
cargo test -p connectrpc-build)Precompiledmode🤖 Generated with Claude Code