Skip to content

Commit 74ee66b

Browse files
committed
fix(proof): decouple supplied label from nudges
1 parent a6ee02e commit 74ee66b

7 files changed

Lines changed: 26 additions & 56 deletions

File tree

‎dashboard/worker.ts‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ const GITHUB_APP_TOKEN_DEFAULT_TTL_MS = 50 * 60_000;
133133
const PR_PROOF_LABEL_NAMES = [
134134
"triage: needs-real-behavior-proof",
135135
"triage: mock-only-proof",
136-
"proof: supplied",
137136
"proof: sufficient",
138137
"proof: override",
139138
"mantis: telegram-visible-proof",
@@ -207,16 +206,9 @@ const PR_PROOF_VIEWS = [
207206
},
208207
{
209208
id: "missing-proof",
210-
title: "No proof supplied",
211-
description: "Proof is requested, but no supplied, sufficient, or override label is present.",
209+
title: "Needs proof review",
210+
description: "Proof is requested, but ClawSweeper has not marked it sufficient or overridden.",
212211
allLabels: ["triage: needs-real-behavior-proof"],
213-
withoutLabels: ["proof: supplied", "proof: sufficient", "proof: override"],
214-
},
215-
{
216-
id: "supplied-awaiting-review",
217-
title: "Supplied, needs review",
218-
description: "Proof has been supplied, but ClawSweeper has not marked it sufficient.",
219-
allLabels: ["proof: supplied"],
220212
withoutLabels: ["proof: sufficient", "proof: override"],
221213
},
222214
{
@@ -2547,7 +2539,6 @@ function proofStateFromLabels(labels) {
25472539
return "Sufficient + needs label";
25482540
}
25492541
if (has("proof: sufficient")) return "Sufficient";
2550-
if (has("proof: supplied")) return "Supplied, needs review";
25512542
if (has("triage: mock-only-proof")) return "Mock-only proof";
25522543
if (has("triage: needs-real-behavior-proof")) return "Needs proof";
25532544
if (has("mantis: telegram-visible-proof")) return "Telegram proof";
@@ -4546,12 +4537,7 @@ function prProofTriagePageConfig() {
45464537
metrics: [
45474538
{ label: "Proof triage PRs", view: "proof-triage", detail: "proof-related labels" },
45484539
{ label: "Needs proof", view: "needs-proof", detail: "real behavior proof requested" },
4549-
{ label: "No proof supplied", view: "missing-proof", detail: "most stuck bucket" },
4550-
{
4551-
label: "Supplied, needs review",
4552-
view: "supplied-awaiting-review",
4553-
detail: "waiting on sufficiency decision",
4554-
},
4540+
{ label: "Needs proof review", view: "missing-proof", detail: "most stuck bucket" },
45554541
{
45564542
label: "Proof sufficient",
45574543
view: "sufficient-proof",

‎docs/pr-proof-triage-dashboard.md‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The worker reads a fixed set of proof-related labels from the target repository:
1919

2020
- `triage: needs-real-behavior-proof`
2121
- `triage: mock-only-proof`
22-
- `proof: supplied`
2322
- `proof: sufficient`
2423
- `proof: override`
2524
- `mantis: telegram-visible-proof`
@@ -30,16 +29,15 @@ The focused views are derived from high-signal label combinations:
3029
| ------------------------ | -------------------------------------------------------------------------------------------------------- |
3130
| Proof triage | any configured proof-related label |
3231
| Needs proof | `triage: needs-real-behavior-proof` |
33-
| No proof supplied | `triage: needs-real-behavior-proof` without `proof: supplied`, `proof: sufficient`, or `proof: override` |
34-
| Supplied, needs review | `proof: supplied` without `proof: sufficient` or `proof: override` |
32+
| Needs proof review | `triage: needs-real-behavior-proof` without `proof: sufficient` or `proof: override` |
3533
| Proof sufficient | `proof: sufficient` |
3634
| Mock-only proof | `triage: mock-only-proof` |
3735
| Telegram proof | `mantis: telegram-visible-proof` |
3836
| Sufficient + needs label | `triage: needs-real-behavior-proof` and `proof: sufficient` |
3937

4038
The API queries each proof view directly so the main stuck buckets are not
41-
undercounted by a broad first-page snapshot. The `No proof supplied` and
42-
`Supplied, needs review` views load up to `PR_PROOF_ITEMS_PER_VIEW`; the default
39+
undercounted by a broad first-page snapshot. The `Needs proof review` view loads
40+
up to `PR_PROOF_ITEMS_PER_VIEW`; the default
4341
is 500, with an upper bound of 1,000 because GitHub Search only exposes the
4442
first 1,000 results for a query. Broader summary views load fewer rows while
4543
still using GitHub's `total_count`, so the metric cards stay accurate without
@@ -80,6 +78,6 @@ Keep this dashboard read-only:
8078
- no repair dispatch
8179

8280
A later phase could add contributor reminders for PRs that remain in the
83-
`No proof supplied` view for a maintainer-defined period, or route selected PRs
81+
`Needs proof review` view for a maintainer-defined period, or route selected PRs
8482
to maintainers who can validate behavior in Crabbox. That should be a separate
8583
opt-in workflow with clear wording, cooldowns, and maintainer control.

‎docs/proof-nudges.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Read when changing the ClawSweeper lane that reminds pull request authors to add
44

55
## Scope
66

7-
The proof-nudge lane is read-mostly triage hygiene. It can post a polite reminder comment on open pull requests that are stuck on `triage: needs-real-behavior-proof`, but it does not close pull requests, merge pull requests, change labels, request reviews, or modify review records.
7+
The proof-nudge lane is read-mostly triage hygiene. It can post a polite reminder comment when the latest ClawSweeper review still requires real behavior proof, but it does not close pull requests, merge pull requests, change labels, request reviews, or modify review records.
88

99
The lane uses the latest ClawSweeper review report plus the live pull request state. It does not scrape the visible review comment for policy.
1010

@@ -13,14 +13,13 @@ The lane uses the latest ClawSweeper review report plus the live pull request st
1313
A pull request is eligible only when all of these are true:
1414

1515
- The live item is an open pull request.
16-
- The live pull request still has `triage: needs-real-behavior-proof`.
1716
- The latest report still says real behavior proof blocks merge.
1817
- The report head SHA matches the live pull request head SHA.
1918
- The pull request is past the first-nudge age gate, defaulting to 5 days.
2019
- The author has not commented recently and the head commit is not recent.
2120
- There is no same-head proof nudge inside the cooldown window, defaulting to 7 days.
2221

23-
The lane skips maintainer-authored, bot-authored, security-sensitive, and release-style pull requests. It also skips pull requests with `proof: supplied`, `proof: sufficient`, or `proof: override`, because those need review or policy handling rather than another contributor reminder.
22+
The lane skips maintainer-authored, bot-authored, security-sensitive, and release-style pull requests. It also skips pull requests with `proof: sufficient` or `proof: override`, because those need review or policy handling rather than another contributor reminder. OpenClaw's `triage: needs-pr-context` label is separate contributor-body hygiene and does not decide real-proof sufficiency.
2423

2524
## Bot-Owned Proof Handling
2625

@@ -33,8 +32,8 @@ The bot-owned lane is status-only unless an approved Mantis proof suggestion is
3332
available. It is eligible only when the live PR is open and not draft, the
3433
author is the ClawSweeper GitHub App, the latest
3534
ClawSweeper review says real behavior proof blocks merge, and that review head
36-
SHA still matches the live head SHA. It must skip PRs with `proof: supplied`,
37-
`proof: sufficient`, or `proof: override`.
35+
SHA still matches the live head SHA. It must skip PRs with `proof: sufficient`
36+
or `proof: override`.
3837

3938
When the review includes an approved Mantis-style proof suggestion, the lane
4039
posts a durable Mantis proof request comment. Otherwise it updates one durable

‎docs/repair/auto-update-prs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ status contains `clawsweeper_self_rebase` or `conflict_self_heal`.
299299
Replacement PR labels must describe the replacement PR, not stale lifecycle
300300
state from a source PR. Replacement creation filters source labels so it does
301301
not copy `close:*`, `stale`, `rating:*`, `status:*`, `proof:*`,
302-
`triage: needs-real-behavior-proof`, `merge-risk:*`, `size:*`, or `P*`
302+
`triage: needs-real-behavior-proof`, `triage: needs-pr-context`, `merge-risk:*`, `size:*`, or `P*`
303303
priority labels.
304304

305305
Use the cleanup command to inspect existing open ClawSweeper replacement PRs

‎src/clawsweeper.ts‎

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ type ProofNudgeAction =
829829
| "proof_nudge_planned"
830830
| "skipped_not_pull_request"
831831
| "skipped_not_open"
832-
| "skipped_missing_label"
833832
| "skipped_policy_exempt"
834833
| "skipped_stale_report_head"
835834
| "skipped_recent_author_activity"
@@ -1099,8 +1098,6 @@ const UNCONFIRMED_PRODUCT_DIRECTION_EXEMPT_LABELS = new Set([
10991098
]);
11001099
const PROOF_OVERRIDE_LABEL = "proof: override";
11011100
const PROOF_SUFFICIENT_LABEL = "proof: sufficient";
1102-
const PROOF_SUPPLIED_LABEL = "proof: supplied";
1103-
const REAL_BEHAVIOR_PROOF_REQUIRED_LABEL = "triage: needs-real-behavior-proof";
11041101
const PROOF_NUDGE_MARKER_PREFIX = "<!-- clawsweeper-proof-nudge";
11051102
const PROOF_NUDGE_MARKER_VERSION = "1";
11061103
const BOT_PROOF_DECISION_MARKER_PREFIX = "<!-- clawsweeper-bot-proof-decision";
@@ -11662,13 +11659,6 @@ function proofNudgeEligibility(options: ProofNudgeEligibilityOptions): ProofNudg
1166211659
reason: `type is ${options.item.kind}`,
1166311660
};
1166411661
}
11665-
if (!hasNormalizedLabel(options.item.labels, REAL_BEHAVIOR_PROOF_REQUIRED_LABEL)) {
11666-
return {
11667-
eligible: false,
11668-
action: "skipped_missing_label",
11669-
reason: `${REAL_BEHAVIOR_PROOF_REQUIRED_LABEL} is not present`,
11670-
};
11671-
}
1167211662
const lockedReason = lockedConversationApplyReason(options.item);
1167311663
if (lockedReason) {
1167411664
return {
@@ -11679,13 +11669,12 @@ function proofNudgeEligibility(options: ProofNudgeEligibilityOptions): ProofNudg
1167911669
}
1168011670
if (
1168111671
hasNormalizedLabel(options.item.labels, PROOF_OVERRIDE_LABEL) ||
11682-
hasNormalizedLabel(options.item.labels, PROOF_SUFFICIENT_LABEL) ||
11683-
hasNormalizedLabel(options.item.labels, PROOF_SUPPLIED_LABEL)
11672+
hasNormalizedLabel(options.item.labels, PROOF_SUFFICIENT_LABEL)
1168411673
) {
1168511674
return {
1168611675
eligible: false,
1168711676
action: "skipped_policy_exempt",
11688-
reason: "proof is already supplied, sufficient, or overridden",
11677+
reason: "proof is already sufficient or overridden",
1168911678
};
1169011679
}
1169111680
if (isMaintainerAuthored(options.item)) {
@@ -11872,13 +11861,12 @@ function botProofEligibility(options: BotProofEligibilityOptions): BotProofEligi
1187211861
}
1187311862
if (
1187411863
hasNormalizedLabel(options.item.labels, PROOF_OVERRIDE_LABEL) ||
11875-
hasNormalizedLabel(options.item.labels, PROOF_SUFFICIENT_LABEL) ||
11876-
hasNormalizedLabel(options.item.labels, PROOF_SUPPLIED_LABEL)
11864+
hasNormalizedLabel(options.item.labels, PROOF_SUFFICIENT_LABEL)
1187711865
) {
1187811866
return {
1187911867
eligible: false,
1188011868
action: "skipped_policy_exempt",
11881-
reason: "proof is already supplied, sufficient, or overridden",
11869+
reason: "proof is already sufficient or overridden",
1188211870
};
1188311871
}
1188411872
if (!realBehaviorProofBlocksBotOwnedMerge(options.markdown)) {

‎src/repair/replacement-labels.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export function replacementSourceLabelCopyable(value: string): boolean {
4545
) {
4646
return false;
4747
}
48-
if (key === "triage: needs-real-behavior-proof") return false;
48+
if (key === "triage: needs-real-behavior-proof" || key === "triage: needs-pr-context") {
49+
return false;
50+
}
4951
if (/^p[0-3]$/.test(key)) return false;
5052
return true;
5153
}

‎test/clawsweeper.test.ts‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17325,16 +17325,13 @@ Reason: Maintainers should review the proof before merge.
1732517325
});
1732617326

1732717327
test("ClawSweeper proof judgement controls the sufficient proof label", () => {
17328-
assert.deepEqual(realBehaviorProofSufficientLabelsForTest(["proof: supplied"], "sufficient"), [
17329-
"proof: supplied",
17328+
assert.deepEqual(realBehaviorProofSufficientLabelsForTest(["bug"], "sufficient"), [
17329+
"bug",
1733017330
"proof: sufficient",
1733117331
]);
1733217332
assert.deepEqual(
17333-
realBehaviorProofSufficientLabelsForTest(
17334-
["proof: supplied", "proof: sufficient"],
17335-
"insufficient",
17336-
),
17337-
["proof: supplied"],
17333+
realBehaviorProofSufficientLabelsForTest(["bug", "proof: sufficient"], "insufficient"),
17334+
["bug"],
1733817335
);
1733917336
assert.deepEqual(realBehaviorProofSufficientLabelsForTest(["proof: sufficient"], "missing"), []);
1734017337
});
@@ -17571,7 +17568,7 @@ test("bot proof handling skips overrides, stale heads, drafts, and non-ClawSweep
1757117568
}).action,
1757217569
"skipped_draft",
1757317570
);
17574-
for (const label of ["proof: override", "proof: supplied", "proof: sufficient"] as const) {
17571+
for (const label of ["proof: override", "proof: sufficient"] as const) {
1757517572
assert.equal(
1757617573
botProofEligibilityForTest({
1757717574
item: proofNudgeItem({
@@ -17922,13 +17919,13 @@ test("proof nudges skip stale report heads and proof-policy exemptions", () => {
1792217919
);
1792317920
assert.equal(
1792417921
proofNudgeEligibilityForTest({
17925-
item: proofNudgeItem({ labels: ["triage: needs-real-behavior-proof", "proof: supplied"] }),
17922+
item: proofNudgeItem({ labels: ["proof: supplied"] }),
1792617923
markdown: proofNudgeReport(),
1792717924
headSha: "abc123def456",
1792817925
headCommittedAt: "2026-01-01T00:00:00Z",
1792917926
now: Date.parse("2026-01-10T00:00:00Z"),
1793017927
}).action,
17931-
"skipped_policy_exempt",
17928+
"proof_nudge_planned",
1793217929
);
1793317930
});
1793417931

0 commit comments

Comments
 (0)