Skip to content

Commit 4a0f497

Browse files
improve: simplify PR context and evidence (#94676)
* improve: simplify PR context and evidence * improve: decouple PR context from proof labels * fix: satisfy PR context lint
1 parent 3706047 commit 4a0f497

13 files changed

Lines changed: 524 additions & 1174 deletions

‎.agents/skills/openclaw-landable-bug-sweep/SKILL.md‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,9 @@ Reject:
107107

108108
## PR Body Proof
109109

110-
Use the repo PR template. Include these exact labels:
111-
112-
```text
113-
Behavior addressed:
114-
Real environment tested:
115-
Exact steps or command run after this patch:
116-
Evidence after fix:
117-
Observed result after fix:
118-
What was not tested:
119-
```
110+
Use the repo PR template. Include authored `## What Problem This Solves` and
111+
`## Evidence` sections. Keep the body focused on intent and the most useful
112+
validation evidence; inspect the code, tests, and CI before judging correctness.
120113

121114
## Existing PR Rules
122115

‎.github/pull_request_template.md‎

Lines changed: 57 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,57 @@
1-
## Summary
2-
3-
What problem does this PR solve?
4-
5-
Why does this matter now?
6-
7-
What is the intended outcome?
8-
9-
What is intentionally out of scope?
10-
11-
What does success look like?
12-
13-
What should reviewers focus on?
14-
15-
<details>
16-
<summary>Summary guidance</summary>
17-
18-
This PR description is the contributor's durable explanation of the change. Write it for human maintainers first; ClawSweeper and Barnacle use the same text to understand intent, proof, risk, and current review state.
19-
20-
Describe the intent and outcome in 2-5 bullets. Avoid restating the diff; reviewers and bots can read the changed files.
21-
22-
If this PR fixes a plugin beta-release blocker, title it `fix(<plugin-id>): beta blocker - <summary>` and link the matching `Beta blocker: <plugin-name> - <summary>` issue labeled `beta-blocker`. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.
23-
24-
</details>
25-
26-
## Linked context
27-
28-
Which issue does this close?
29-
30-
Closes #
31-
32-
Which issues, PRs, or discussions are related?
33-
34-
Related #
35-
36-
Was this requested by a maintainer or owner?
37-
38-
<details>
39-
<summary>Linked context guidance</summary>
40-
41-
Link the issue, PR, discussion, maintainer request, or owner request that explains why this PR should exist. Maintainer context helps reviewers and automation distinguish intended work from drive-by churn.
42-
43-
</details>
44-
45-
## Real behavior proof (required for external PRs)
46-
47-
- Behavior or issue addressed:
48-
- Real environment tested:
49-
- Exact steps or command run after this patch:
50-
- Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
51-
- Observed result after fix:
52-
- What was not tested:
53-
- Proof limitations or environment constraints:
54-
- Before evidence (optional but encouraged):
55-
56-
<details>
57-
<summary>Real behavior proof guidance</summary>
58-
59-
External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only.
60-
61-
Screenshots are encouraged even for CLI, console, text, or log changes. Terminal screenshots, copied live output, redacted runtime logs, recordings, and linked artifacts count.
62-
63-
If your environment cannot produce the ideal proof, explain that under `Proof limitations or environment constraints` so reviewers and ClawSweeper can direct the next step properly.
64-
65-
Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.
66-
67-
</details>
68-
69-
## Tests and validation
70-
71-
Which commands did you run?
72-
73-
What regression coverage was added or updated?
74-
75-
What failed before this fix, if known?
76-
77-
If no test was added, why not?
78-
79-
<details>
80-
<summary>Testing guidance</summary>
81-
82-
List focused commands, not every incidental check. CI is useful support, but external PRs still need real behavior proof above when behavior changes.
83-
84-
</details>
85-
86-
## Risk checklist
87-
88-
Did user-visible behavior change? (`Yes/No`)
89-
90-
Did config, environment, or migration behavior change? (`Yes/No`)
91-
92-
Did security, auth, secrets, network, or tool execution behavior change? (`Yes/No`)
93-
94-
What is the highest-risk area?
95-
96-
How is that risk mitigated?
97-
98-
<details>
99-
<summary>Risk guidance</summary>
100-
101-
Use this for author judgment that is not obvious from the diff. ClawSweeper can see touched files, but it cannot know which behavior you think is risky, why the risk is acceptable, or what mitigation reviewers should verify.
102-
103-
</details>
104-
105-
## Current review state
106-
107-
What is the next action?
108-
109-
What is still waiting on author, maintainer, CI, or external proof?
110-
111-
Which bot or reviewer comments were addressed?
112-
113-
<details>
114-
<summary>Review state guidance</summary>
115-
116-
Keep this as the durable state for review progress. If useful information appears in comments, fold the current next action or blocker back here so maintainers and ClawSweeper do not need to reconstruct state from comment history.
117-
118-
</details>
1+
<!--
2+
Optional linked context:
3+
Add a visible `Closes #<issue-number>` or `Related: #<issue-number>` line
4+
below this comment.
5+
6+
Required PR title:
7+
type: user-facing description
8+
Use a parenthesized scope only when it adds clarity:
9+
fix(auth): login redirect loops when session cookie is expired
10+
11+
Types: feat, fix, improve, refactor, docs, chore.
12+
For fixes, describe the user-visible symptom and trigger:
13+
fix: task list fails to load when user has no environments
14+
Avoid implementation details such as:
15+
fix: add null check to task query
16+
-->
17+
18+
## What Problem This Solves
19+
20+
<!--
21+
Describe the concrete user, product, or operational problem.
22+
For fixes, begin with:
23+
"Fixes an issue where users <do X> would <experience Y> when <condition>."
24+
or:
25+
"Resolves a problem where..."
26+
27+
Name the affected UI surface or workflow. Do not describe the code-level cause here.
28+
-->
29+
30+
## Why This Change Was Made
31+
32+
<!--
33+
In one or two sentences, explain the complete shipped solution, key design
34+
decisions, and relevant boundaries or non-goals. Include implementation detail
35+
only when it helps reviewers understand user-visible behavior or risk.
36+
Avoid file-by-file narration.
37+
-->
38+
39+
## User Impact
40+
41+
<!--
42+
State what users, operators, or developers can now do or expect. Lead with the
43+
concrete benefit and use user-facing language. If there is no user-visible
44+
impact, say so plainly.
45+
-->
46+
47+
## Evidence
48+
49+
<!--
50+
Show the most useful proof that this change works. Screenshots, screencasts,
51+
terminal output, focused tests, CI results, live observations, redacted logs,
52+
and artifact links are all useful. Include before/after evidence for visual
53+
changes when it clarifies the result.
54+
55+
Reviewers will inspect the code, tests, and CI. Use this section to make the
56+
validation easy to understand, not to restate the diff.
57+
-->

‎AGENTS.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Skills own workflows; root owns hard policy and routing.
3535
- One-sided fixes need sibling-surface proof, an explanation for why siblings are unaffected, or explicit follow-up work.
3636
- Changelog findings: see Docs / Changelog.
3737
- Public ClawSweeper comments prefer `https://docs.openclaw.ai/...` when a public docs page exists; structured evidence still cites repo files, lines, SHAs.
38-
- Findings need current source, shipped/current behavior, tests/CI evidence, and dependency contract proof when dependency-backed behavior is involved. Validation is judged against touched and sibling surfaces plus this file's commands; real behavior proof matters for user-visible changes, with Telegram/Desktop proof for Telegram-visible behavior when feasible.
38+
- Findings need current source, shipped/current behavior, tests/CI evidence, and dependency contract proof when dependency-backed behavior is involved. Validation is judged against touched and sibling surfaces plus this file's commands; clear evidence matters for user-visible changes, with Telegram/Desktop proof for Telegram-visible behavior when feasible.
3939
- Prefer findings for concrete behavior regressions, missing changed-surface proof, owner-boundary violations, security/API contract issues, or docs/config mismatches.
4040
- Do not file findings for repo policy preference when changed code follows the relevant scoped guide and no user-visible, runtime, security, or maintainer-risk impact is shown.
4141

@@ -165,13 +165,12 @@ Skills own workflows; root owns hard policy and routing.
165165
- Representing user: if user already has a comment/thread for the point, update/reply there when possible; avoid duplicate PR/issue comments.
166166
- No surprise GH writes: chat must mention every posted/updated public comment with URL.
167167
- GH comments with backticks, `$`, or shell snippets: use heredoc/body file, not inline double-quoted `--body`.
168-
- PR create: real body required. Include Summary + Verification; mention refs, behavior, and proof.
168+
- PR create: real body required. Use the current template: `What Problem This Solves`, `Why This Change Was Made`, `User Impact`, and `Evidence`; include visible refs, behavior, and validation.
169169
- PR create/refresh: keep PR branches takeover-ready. Use a branch maintainers can push to, or for fork PRs ensure `maintainer_can_modify` / GitHub's `Allow edits by maintainers` is enabled unless explicitly told otherwise or GitHub's Actions/secrets warning makes that unsafe.
170170
- GitHub issue/PR create: read `$agent-transcript`; ask about sanitized transcript logs when available.
171-
- Contributor PRs: parsed `Real behavior proof` uses exact `field: value` labels: `Behavior addressed`, `Real environment tested`, `Exact steps or command run after this patch`, `Evidence after fix`, `Observed result after fix`, `What was not tested`.
171+
- Contributor PRs: parsed context requires authored `What Problem This Solves` and `Evidence` sections. Do not require field-level proof forms; reviewers inspect code, tests, and CI for correctness.
172172
- PR artifacts/screenshots: attach to PR/comment/external artifact store. Never push screenshots, videos, proof images, or proof assets to OpenClaw or any product repo branch, including temp artifact branches. Use Crabbox artifact publishing plus the manifest URL. Do not commit `.github/pr-assets`.
173173
- CI polling: exact SHA, relevant checks only, minimal fields. Skip routine noise (`Auto response`, `Labeler`, docs agents, performance/stale). Logs only after failure/completion or concrete need.
174-
- OpenClaw write-access maintainers may skip `Real behavior proof` when local tests or Crabbox verified behavior; record proof in PR verification.
175174
- Agent PR landing to `main`: use only the repo-native `scripts/pr` wrapper: run `scripts/pr review-init <PR>`, follow its emitted checkout/guard guidance, initialize and complete review artifacts with `scripts/pr review-artifacts-init <PR>`, validate them with `scripts/pr review-validate-artifacts <PR>`, then run `scripts/pr prepare-run <PR>` and `scripts/pr merge-run <PR>`; do not idle on `auto-response` or `check-docs`.
176175

177176
## Code

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For coordinated change sets that genuinely need more than 20 PRs, join the **#cl
106106
## Before You PR
107107

108108
- Test locally with your OpenClaw instance
109-
- External PRs must include a filled **Real behavior proof** section in the PR body. Show the real setup you tested, the exact command or steps you ran after the patch, after-fix evidence, the observed result, and anything you did not test. Screenshots, recordings, terminal screenshots, console output, copied live output, linked artifacts, and redacted runtime logs all count. Unit tests, mocks, snapshots, lint, typechecks, and CI are useful but do not satisfy this requirement by themselves. Maintainers may apply `proof: override` only when the proof gate should not apply.
109+
- External PRs must describe the user, product, or operational problem in **What Problem This Solves** and include useful validation in **Evidence**. Focused tests, CI results, screenshots, recordings, terminal output, live observations, redacted logs, and artifact links all count. Reviewers will inspect the code, tests, and CI; use the PR body to explain intent and make validation easy to understand.
110110
- Keep PRs takeover-ready: open them from a branch maintainers can push to. For fork PRs, leave GitHub's **Allow edits by maintainers** option enabled so maintainers can finish urgent fixes, changelog entries, or merge prep when needed. If GitHub shows **Allow edits and access to secrets by maintainers**, enable it only when that workflow/secrets access is acceptable and say so in the PR.
111111
- Do not edit `CHANGELOG.md` in contributor PRs. Maintainers or ClawSweeper add the changelog entry when landing user-facing changes.
112112
- Run tests: `pnpm build && pnpm check && pnpm test`
@@ -169,7 +169,7 @@ Built with Codex, Claude, or other AI tools? **Awesome - just mark it!**
169169
Please include in your PR:
170170

171171
- [ ] Mark as AI-assisted in the PR title or description
172-
- [ ] Include human-run real behavior proof from your own setup. AI-generated tests, mocks, lint, typechecks, and CI output are supplemental only; they do not prove the fix works for users.
172+
- [ ] Include a concise **Evidence** section with the most useful validation. Reviewers will inspect the code, tests, and CI rather than relying on the PR body alone.
173173
- [ ] Include prompts or session logs if possible (super helpful!)
174174
- [ ] Confirm you understand what the code does
175175
- [ ] If you have access to Codex, run `codex review --base origin/main` locally and address the findings before asking for review

‎docs/ci.md‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,21 @@ Use `pnpm ci:timings`, `pnpm ci:timings:recent`, or `node scripts/ci-run-timings
4747

4848
For pull request runs, the terminal timing-summary job runs the helper from the trusted base revision before passing `GH_TOKEN` to `gh run view`. That keeps the tokened query out of branch-controlled code while still summarizing the pull request's current CI run.
4949

50-
## Real behavior proof
50+
## PR context and evidence
5151

52-
External contributor PRs run a `Real behavior proof` gate from
52+
External contributor PRs run a PR context and evidence gate from
5353
`.github/workflows/real-behavior-proof.yml`. The workflow checks out the trusted
5454
base commit and evaluates the PR body only; it does not execute code from the
5555
contributor branch.
5656

5757
The gate applies to PR authors who are not repository owners, members,
58-
collaborators, or bots. It passes when the PR body contains a
59-
`Real behavior proof` section with filled values for:
60-
61-
- `Behavior or issue addressed`
62-
- `Real environment tested`
63-
- `Exact steps or command run after this patch`
64-
- `Evidence after fix`
65-
- `Observed result after fix`
66-
- `What was not tested`
67-
68-
The evidence must show the changed behavior after the patch in a real OpenClaw
69-
setup. Screenshots, recordings, terminal captures, console output, copied live
70-
output, redacted runtime logs, and linked artifacts all count. Unit tests, mocks,
71-
snapshots, lint, typechecks, and CI results are useful supporting verification,
72-
but they do not satisfy this gate by themselves.
58+
collaborators, or bots. It passes when the PR body contains authored
59+
`What Problem This Solves` and `Evidence` sections. Evidence can be a focused
60+
test, CI result, screenshot, recording, terminal output, live observation,
61+
redacted log, or artifact link. The body provides intent and useful validation;
62+
reviewers inspect the code, tests, and CI to assess correctness.
7363

7464
When the check fails, update the PR body instead of pushing another code commit.
75-
Maintainers can apply `proof: override` only when the proof gate should not
76-
apply to that PR.
7765

7866
## Scope and routing
7967

0 commit comments

Comments
 (0)