beads/.github
Julian Knutsen 17127ee544
fix(ci-policy): close review leftovers from #7485/#7486 (#7491)
* fix(ci-policy): close review leftovers from #7485/#7486

Follow-ups from maintainer review on the host-tool exec/shell policy
tests and the bazel.yml integration gate:

- host_tool_shell_policy_test.go: recognize indented function headers
  and `function name {` forms when finding a function's closing brace,
  so scripts/test.sh's indented cleanup_shared_server() no longer
  mis-attributes its trailing lines to the wrong function; classify
  same-line `command -v gofmt && gofmt` (and `go`) as the guarded
  presence-check idiom instead of flagging it.
- host_tool_exec_policy_test.go: make condPolarity reject mixed-polarity
  && / || compounds (one recognized side, one not) instead of guessing
  at the recognized side's polarity, which was unsound in both
  directions; add pinning tests documenting the exec-before-gate and
  function-value-helper cases as known, safety-conservative limitations
  rather than bugs. Fixing this exposed a real ungated fallback in
  cmd/bd/scripttest_test.go (a `go build` that could still run under
  Bazel on a prebuilt-binary basename mismatch); fixed by symlinking the
  prebuilt binary under the expected name instead of rebuilding it.
- bazel.yml: bazel-server-storage now honors the `integration` input
  like bazel-integration/bazel-cmd-dolt do, so an explicit "off" skips
  it too (latent today: no caller passes "off"). Updated
  ci_workflow_test.go's policy tests to match.

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

* fix(ci-policy): close should-fix B (go command -v guard evasion) on #7491

shellCommandVGuard previously excused go the same as gofmt, but under an
exit-127 host-tool stub `command -v` finds the stub and the guarded exec
still runs, and on a worker genuinely lacking go the exec was silently
skipped -- the worker-dependent behavior this policy exists to ban. Drop
go from the guard entirely, require the guarded exec to sit directly after
the guard's own `&&` (no intervening `;`, `||`, `|`, or leading `!`), and
require an exact gofmt match so a same-prefixed sibling like `gofmt-foo`/
`go-junit-report` can't borrow the guard. Add every should-fix B shape as
a fixture that must still be flagged, plus the generalized gofmt-side
cases (leading `!`, exact-name, post-`;` exec).

Also: correct host_tool_exec_policy_test.go's doc claim that a
function-value helper call site is "not a soundness hole" -- mixed with
one gated direct call site, the invisible function-value call site's
ungated-ness is silently lost and the combined verdict flips to gated;
pinned as review M22. And recognize a function closed by `} >&2` as
ended, so abort-style safety computed inside it does not leak into the
rest of the file (no scoped script has this shape today, but a bare `}`
equality check would silently miss it the moment one does).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 01:22:48 +00:00
..
actions/setup-bazel ci(bazel): mode-cache readers use the remote repo contents cache via rbe-cache (#7476) 2026-10-10 17:42:12 +00:00
images Prepare for public launch: comprehensive examples, docs, and tooling 2025-10-12 11:25:29 -07:00
ISSUE_TEMPLATE docs(contributing): recommend issues when they add context instead of requiring one per PR (#7323) 2026-10-06 23:29:09 +00:00
pages-redirect docs: redirect legacy GitHub Pages site to Mintlify (#4759) 2026-07-13 14:19:13 -07:00
scripts fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478) 2026-10-10 19:24:21 +00:00
workflows fix(ci-policy): close review leftovers from #7485/#7486 (#7491) 2026-10-11 01:22:48 +00:00
allowed-actions.json ci: pin the Actions allow-list for the selected-and-SHA-pinned policy (R3) (#7175) 2026-10-04 01:03:40 -07:00
bazel-farm-allowlist.txt ci(bazel): fork PRs execute on rbe-west's fork pool (fork-ro/fork-rw), cache fallback (#7136) 2026-10-03 12:10:14 -07:00
CODEOWNERS chore: purge deleted docs-pipeline references from release tooling, CI, and repo plumbing 2026-07-12 11:07:26 -07:00
copilot-instructions.md docs(agents): contributor-only agent instructions and documented-issue intake (#7223) 2026-10-05 08:43:53 +00:00
dependabot.yml ci(dependabot): group version bumps per ecosystem (#5038) 2026-07-25 16:06:16 -07:00
PULL_REQUEST_TEMPLATE.md docs(bazel): make bazel test the primary build and test path (ga-96smfk.23) (#7348) 2026-10-07 07:46:02 +00:00