Skip to content

fix(verus): the new gate failed its first run — bazel //... walked an agent worktree - #367

Merged
avrabe merged 1 commit into
mainfrom
fix/verus-query-scope-v2
Aug 26, 2026
Merged

fix(verus): the new gate failed its first run — bazel //... walked an agent worktree#367
avrabe merged 1 commit into
mainfrom
fix/verus-query-scope-v2

Conversation

@avrabe

@avrabe avrabe commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Verify-Filter: (has-tag "verus")

verus.yml (#366) ran once and failed. Diagnosing it is the point: the workflow existed for about an hour and immediately surfaced two real problems, one of them repo-wide.

Root cause — not the proofs

The query never got as far as them:

ERROR: error loading package ".claude/worktrees/rules_verus":
       Label "//verus:defs.bzl" ...

//... walks agent worktrees under .claude, which contain sibling repos (rules_verus, rules_lean) whose BUILD files are not part of this module. Bazel tries to load them and dies.

My empty-set guard then fired correctly"no verus_test targets found" — so the workflow failed loudly instead of passing green having verified nothing. The guard did its job; the query was wrong.

Two fixes, because one is bigger than this workflow

1 · .bazelignore with .claude. Any workflow using //... hits this same wall; scoping each query around it treats the symptom. The repo had no .bazelignore at all.

Verified: kind("verus_test rule", //...) goes from ERROR → 19 targets.

2 · Scope the query to //:* anyway. Every verus_test is declared in the root BUILD.bazel, so the narrower query is both correct and immune to whatever else appears in the tree later. Measured — both forms now return 19.

Also: the step name lied

It was still "Kernel-check every Lean proof". verus.yml was generated from lean.yml; I renamed the workflow, the job and the command but not the step label — so the failing step in the UI claimed to be checking Lean proofs while running a Verus query.

Same class as the "invoked 2+ times" log that stated a threshold the code didn’t implement. Renamed to "Run every Verus proof".

What this run bought

An entire proof track had been silent for its whole existence, and within one run of enforcing it we learned the Bazel query surface was broken repo-wide. That is what the unenforced track was hiding — not necessarily failing proofs.

🤖 Generated with Claude Code

… agent worktree

verus.yml (#366) ran once and FAILED. Diagnosing it is the point: the workflow
existed for about an hour and immediately surfaced two real problems, one of
them repo-wide.

ROOT CAUSE — not the proofs. `bazel query 'kind("verus_test rule", //...)'`
never got as far as the proofs:

  ERROR: error loading package '.claude/worktrees/rules_verus':
         Label '//verus:defs.bzl' ...

`//...` walks agent worktrees under .claude, which contain SIBLING repos
(rules_verus, rules_lean) whose BUILD files are not part of this module. Bazel
tries to load them and dies. My empty-set guard then fired correctly — "no
verus_test targets found" — so the workflow failed loudly rather than passing
green having verified nothing. The guard did its job; the query was wrong.

TWO FIXES, because one of them is bigger than this workflow:

1. .bazelignore with `.claude`. ANY workflow using `//...` hits this same wall;
   scoping each query around it treats the symptom. The repo had no
   .bazelignore at all. Verified: `kind("verus_test rule", //...)` goes from
   ERROR to 19 targets.

2. Scope the query to `//:*` anyway. Every verus_test is declared in the root
   BUILD.bazel, so the narrower query is both correct and immune to whatever
   else appears in the tree later. Belt and braces — measured, both forms now
   return 19.

ALSO: the step was still named "Kernel-check every Lean proof". verus.yml was
generated from lean.yml and I renamed the workflow, the job and the command but
not the step label — so the failing step in the UI claimed to be checking Lean
proofs while running a Verus query. Same class as the "invoked 2+ times" log
that stated a threshold the code did not implement. Renamed to "Run every Verus
proof".

Worth recording what this run bought: an entire proof track had been silent for
its whole existence, and within one run of enforcing it we learned the Bazel
query surface was broken repo-wide. That is what the track being unenforced was
hiding — not necessarily failing proofs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
@avrabe
avrabe enabled auto-merge (squash) August 26, 2026 19:49
@avrabe
avrabe merged commit 32528a5 into main Aug 26, 2026
11 checks passed
@avrabe
avrabe deleted the fix/verus-query-scope-v2 branch August 26, 2026 21:53
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