Skip to content

Commit d76ae86

Browse files
committed
Merge remote-tracking branch 'origin/develop' into HEAD
2 parents 623de1f + 52be83e commit d76ae86

73 files changed

Lines changed: 3855 additions & 619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ai/wheels/wheels-bot.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| Triage | issue opened/reopened | Opus | Comment classifying as `bug` / `framework-design` / `other` (+ confidence on `bug` path). Reads code with the allowlisted tools to resolve uncertainty before rating. |
1010
| Research | bot triage emits `framework-design` marker | Opus | Comment comparing Rails / Laravel / Django / Phoenix / Spring Boot / +1 and recommending a Wheels-idiomatic path (+ confidence). |
1111
| Propose Fix | bot triage emits `triage-confidence:high\|medium` OR research emits `research-confidence:high\|medium` (or `workflow_dispatch`). A pre-gate skips the run when a `peter/issue-<N>-*` branch or an open non-bot PR already targets the issue (campaign guard). | Opus | TDD-mandatory draft PR on branch `fix/bot-<issue>-<slug>`. Spec-then-implementation, both required by `bot-tdd-gate.yml`. |
12-
| Reviewer | PR opened / synchronized / ready_for_review (`bot-review.yml`; fork PRs via maintainer-labeled `bot-review-fork.yml`) | Fable | Single PR review with line comments, verdict, and `wheels-bot:review-a:<pr>:<sha>` marker (legacy marker name retained). The prompt includes a self-adversarial pass — refute each finding against the actual code before posting — replacing the retired Reviewer B critique loop. |
12+
| Reviewer | PR opened / synchronized / ready_for_review (`bot-review.yml`; fork PRs via maintainer-labeled `bot-review-fork.yml`) | Fable | Single PR review with line comments, verdict, and `wheels-bot:review-a:<pr>:<sha>` marker (legacy marker name retained). The prompt includes a self-adversarial pass — refute each finding against the actual code before posting — replacing the retired Reviewer B critique loop. Supersession (#3048): when a still-active wheels-bot `CHANGES_REQUESTED` exists and the re-review has zero blocking findings, the verdict is submitted as APPROVE (nits in the body) so the stale block clears without manual dismissal; fork PRs stay comment-only — the bot never approves a fork PR. |
1313
| Address Review | **opt-in**: maintainer applies the `bot-address-review` label or dispatches `bot-address-review.yml` | Opus | Applies the most recent wheels-bot review's findings on the current head SHA, pushes to the PR branch, comments with `wheels-bot:address-review:<pr>:<sha>:<round>`. |
1414

1515
**Model policy:** judging gate = fable, coding stages = opus, janitorial = sonnet (auto-close, write-docs, update-docs stay on Sonnet).

‎.claude/commands/review-pr.md‎

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ below. Highlights for this command:
3737
consolidation — the skip-check gate and the workflow guard both grep for
3838
it.)
3939

40+
While you have this JSON, also note whether any wheels-bot review
41+
(`author.login` is `wheels-bot` — `gh pr view` output drops the `[bot]`
42+
suffix) has state `CHANGES_REQUESTED`. Step 5's supersede-to-approve
43+
rule keys off this. A review a human already dismissed reports
44+
`DISMISSED`, not `CHANGES_REQUESTED`, so matching the latter finds only
45+
a still-active merge block. (Such a review is necessarily on an earlier
46+
commit — a wheels-bot review on the current head would have carried the
47+
marker and ended this session above.)
48+
4049
2. **Gather context.** Read in this order, then build a mental model:
4150
- `gh pr view <pr-number>` — title, body, author, base, head, labels
4251
- `gh pr diff <pr-number>` — the full diff
@@ -136,8 +145,9 @@ below. Highlights for this command:
136145
severity: a correctness/security/cross-engine finding is incompatible
137146
with `approve`; a clean diff is incompatible with `request changes`.
138147

139-
5. **Write the review.** Use `gh pr review <pr-number> --comment` for the
140-
summary plus `gh api` to attach line comments — or use a single
148+
5. **Write the review.** Use `gh pr review <pr-number>` (with the verdict
149+
flag chosen below — `--approve` / `--request-changes` / `--comment`) for
150+
the summary plus `gh api` to attach line comments — or use a single
141151
`gh pr review` invocation with `--body` containing line-anchored Markdown
142152
if line comments are not feasible.
143153

@@ -167,10 +177,54 @@ below. Highlights for this command:
167177
Submit verdict:
168178
- `--request-changes` if any **Correctness**, **Cross-engine**, or
169179
**Security** finding fires, OR if commitlint / TDD violations are
170-
present
171-
- `--comment` if only minor convention / docs nits
172-
- `--approve` only when the diff is genuinely clean — bias toward
173-
`--comment` if uncertain. Do not approve as a courtesy.
180+
present. This rule wins on every pass: a re-review that still has a
181+
blocking finding uses `--request-changes` no matter what any earlier
182+
round said.
183+
- **Supersede-to-approve rule (issue #3048).** GitHub keeps a
184+
reviewer's `CHANGES_REQUESTED` active until the *same* reviewer
185+
approves or the review is dismissed — a comment-state re-review does
186+
NOT clear it. Posting `--comment` after an earlier wheels-bot
187+
`--request-changes` therefore leaves the PR merge-blocked until a
188+
human manually dismisses the stale review (this wedged #3043 and
189+
#3044). So when BOTH of these hold:
190+
(a) no blocking finding fires — nothing under Correctness /
191+
Cross-engine / Security and no commitlint / TDD violation
192+
(minor convention / docs nits are fine; keep them in the
193+
body), AND
194+
(b) step 1's review read found a wheels-bot review with state
195+
`CHANGES_REQUESTED` (still active — dismissed ones report
196+
`DISMISSED`),
197+
you MUST submit with `--approve`; `--comment` is not an option here.
198+
In the body, list each previously-blocking finding and the evidence
199+
it is resolved (file + line of the fix). That audit trail is
200+
mandatory — it is what a human reads to trust the upgrade, and it
201+
keeps the body comfortably above the guard's 200-character floor.
202+
Two exceptions:
203+
- **Fork PRs never get `--approve`.** Check
204+
`gh pr view <pr-number> --json isCrossRepository` — when `true`,
205+
submit `--comment` stating that all blocking findings are
206+
resolved and that a maintainer must dismiss the stale
207+
`CHANGES_REQUESTED` review to unblock the PR. Rationale: a bot
208+
approval can satisfy a required-approving-review branch rule,
209+
and an outside contribution must never become mergeable on the
210+
bot's say-so alone. A maintainer is already in the loop on fork
211+
PRs (the `bot-review` label that triggered this review is
212+
maintainer-applied), so the manual dismissal is an acceptable
213+
cost there.
214+
- **422 fallback.** If GitHub rejects the `--approve` submission
215+
(HTTP 422 — e.g. the PR author is wheels-bot itself; GitHub
216+
forbids authors approving their own PRs), resubmit the same
217+
body once with `--comment`. A rejected call creates no review,
218+
so the resubmission is still the session's single visible
219+
review and does not violate the one-review-per-session rule.
220+
- Otherwise (first pass, or no still-active wheels-bot
221+
`CHANGES_REQUESTED`): `--comment` if only minor convention / docs
222+
nits; `--approve` only when the diff is genuinely clean — bias
223+
toward `--comment` if uncertain. Do not approve as a courtesy. The
224+
conservative first-pass default is deliberate and unchanged: a
225+
first-pass `--comment` blocks nothing, so it costs nothing — the
226+
supersede rule above exists only because a comment cannot clear an
227+
active `CHANGES_REQUESTED`.
174228

175229
6. **Self-check before submitting.**
176230
- Have you cited specific files + lines for every finding? (No vague
@@ -181,6 +235,10 @@ below. Highlights for this command:
181235
above a list of correctness issues.)
182236
- Did you cite at least one piece of evidence (a quoted line, a
183237
`.ai/wheels/` reference) for each non-trivial claim?
238+
- If step 1 found a still-active wheels-bot `CHANGES_REQUESTED` and you
239+
have zero blocking findings: is your event `--approve` (or the
240+
documented fork / 422 fallback)? A `--comment` here re-wedges the PR
241+
behind the stale block (issue #3048).
184242
- Is the marker present?
185243

186244
If any check fails, redo the review body before submitting.

‎.github/workflows/docs-verify.yml‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
pull_request:
55
branches: [develop]
66
paths:
7-
- 'web/sites/guides/src/content/docs/v4-0-0-snapshot/**'
7+
- 'web/sites/guides/src/content/docs/v4-0-0/**'
88
- 'web/sites/guides/scripts/verify-docs/**'
99
- 'web/sites/guides/package.json'
10-
- 'web/sites/guides/src/sidebars/v4-0-0-snapshot.json'
10+
- 'web/sites/guides/src/sidebars/v4-0-0.json'
1111
- '.github/workflows/docs-verify.yml'
1212

1313
jobs:
@@ -45,8 +45,17 @@ jobs:
4545
uses: Homebrew/actions/setup-homebrew@master
4646

4747
- name: Install Wheels CLI
48+
env:
49+
# Homebrew 5.x's Linux sandbox needs a rootless bwrap, which
50+
# ubuntu-latest runners don't provide (and 24.04's unprivileged
51+
# userns restrictions make it unreliable even when installed).
52+
# The ephemeral runner is already isolation enough for CI.
53+
HOMEBREW_NO_SANDBOX_LINUX: "1"
4854
run: |
4955
brew tap wheels-dev/wheels || true
56+
# Homebrew 5.1+ refuses to load formulae from untrusted third-party
57+
# taps; trust must be granted explicitly (no-op on older brew).
58+
brew trust wheels-dev/wheels || true
5059
brew install wheels
5160
5261
- name: Patch wheels wrapper JAVA_HOME for Linux
@@ -61,8 +70,17 @@ jobs:
6170
sed -i 's|/openjdk.jdk/Contents/Home||g' "$WRAPPER"
6271
grep JAVA_HOME "$WRAPPER"
6372
64-
- name: Smoke-test the CLI
65-
run: wheels --version
73+
- name: Smoke-test the CLI (binary attestation)
74+
# Binary attestation (#3042): this workflow installs the RELEASED
75+
# brew CLI, so {test:cli}/{test:compile}/{test:tutorial} blocks
76+
# attest to that release — not a CLI built from this checkout.
77+
# verify-docs.mjs prints the same "wheels binary: <path> ... " line
78+
# at run start. To attest to a branch-built CLI instead, export
79+
# WHEELS_BIN pointing at it (not wired up yet — issue #3042 tracks
80+
# building the CLI from the checkout here).
81+
run: |
82+
command -v wheels
83+
wheels --version
6684
6785
- name: Warm up wheels module (first-run copy)
6886
# Homebrew wrapper copies the module to $HOME/.wheels/modules/wheels

0 commit comments

Comments
 (0)