Skip to content

feat: flip --keep_going default to false#400

Open
tinder-maxwellelliott wants to merge 2 commits into
masterfrom
claude/exciting-driscoll-b73cbe
Open

feat: flip --keep_going default to false#400
tinder-maxwellelliott wants to merge 2 commits into
masterfrom
claude/exciting-driscoll-b73cbe

Conversation

@tinder-maxwellelliott

Copy link
Copy Markdown
Collaborator

What

Flip the default for --keep_going from true to false across all commands that expose it:

  • generate-hashes (and warmup, which inherits the option via ScopeType.INHERIT)
  • fingerprint
  • serve

fallbackValue stays "true", so a bare -k / --keep_going still enables it. The old behavior remains available by explicitly passing --keep_going.

Why

With --keep_going enabled, bazel query tolerates failures in the build graph and bazel-diff treats a partial query (exit code 3) as success. When a repository rule fails to resolve — e.g. a transient network error fetching a remote dependency — the package that references it silently disappears from the query results, and bazel-diff emits a hash set that is missing those targets with no error. That makes hashes non-deterministic across runs (a target present when a fetch succeeds vanishes when it flakes). This is the failure mode captured in the #398 reproducer.

Defaulting to false makes the common case fail loudly on configuration/resolution issues, keeping hashes deterministic.

Changes

⚠️ Behavior change

This changes a user-facing default. Runs that previously relied on the implicit --keep_going will now fail on partial queries instead of silently producing truncated hashes; those callers must pass --keep_going explicitly to keep the old behavior. Worth a release-note callout.

Testing

🤖 Generated with Claude Code

tinder-maxwellelliott and others added 2 commits July 1, 2026 14:17
`bazel-diff`'s `--keep_going` flag defaulted to `true` across
generate-hashes (and the inheriting warmup), fingerprint, and serve.
With keep_going enabled, `bazel query` tolerates failures in the build
graph and bazel-diff treats a partial query (exit code 3) as success --
so when a repository rule fails to resolve (e.g. a transient network
error fetching a remote dep), the affected package silently disappears
from the results and bazel-diff emits a truncated hash set with no
error. This makes hashes non-deterministic across runs (see #398).

Flip the default to `false` so the common case fails loudly on
configuration/resolution issues and keeps hashes deterministic. Users
who want the old tolerant behavior can still opt in with `--keep_going`
(the bare flag still resolves to true via fallbackValue).

- Flip defaultValue "true" -> "false" and field initializers in
  GenerateHashesCommand, FingerprintCommand, and ServeCommand.
- Rewrite the help text / README to frame keep_going as the risky
  opt-in and the default as fail-loud.
- Update the #398 reproducer e2e test: the default path now asserts
  fail-loud (exit 1); the silent-drop behavior is demonstrated behind
  an explicit --keep_going.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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