Skip to content

fix(companions): read continuations and escapes as BuildKit does; list changed paths as they are - #844

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
fix/companion-version-r96
Oct 26, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
fix/companion-version-r96

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Follow-up to #838: the minor findings from review r96.

Change

  • A blank line inside a continuation (COPY a \ / blank / b /dst/) no longer ends the instruction. BuildKit skips it, so b is an image input too.
  • # escape=: the parser directive among the leading lines names the continuation character. With # escape=`, a trailing \ (a Windows path) is an ordinary character. A directive after the first instruction is an ordinary comment.
  • Non-ASCII paths: internal/companionbump lists changed files with git diff --name-only --no-renames -z. Without -z, git quotes données plugin.py as "donn\303\251es plugin.py", which matches no input.
  • Docs: the branch-protection runbook now describes the live ruleset. Companion version became required on 2026-10-26, added with a narrow edit (GET the ruleset, append that one context, PUT it back) rather than the runbook's full payload, which would also flip strict mode, add pnpm source evidence and drop require_extra_approval_for_unattributed_changes. A fresh GET after the PUT shows: checks Build, Proto, Registry cache ×4, Companion version, strict: false, require_extra_approval_for_unattributed_changes: true. Everything else matched the earlier GET.

Evidence

Each new test fails on the code before it:

go test ./companions/ ./internal/companionbump ./internal/ciguard pass. golangci-lint adds no new findings. go run ./internal/companionbump origin/main passes: no image input changed.

Classification

Fix, in the check #838 added. The scratch-repository git helpers are now shared by the rename test and the new path test.

🤖 Generated with Claude Code

…t changed paths as they are

Review r96 on #838:
- A blank line inside a continuation no longer ends the instruction;
  BuildKit skips it, so the sources after it are inputs too.
- The `# escape=` parser directive names the continuation character
  (only among the leading directive lines).
- The version check lists changed paths with `git diff -z`: git quotes
  a path with a space or a non-ASCII byte, and the quoted spelling
  matched no input.
- The branch-protection runbook states the live ruleset: Companion
  version is required since 2026-10-26, added by appending that one
  context rather than by applying the runbook's payload.

Each new test fails on the code before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte merged commit 3c777b7 into main Oct 26, 2026
17 checks passed
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