Skip to content

Commit 1865a79

Browse files
fix(clawsweeper): address review for issue-openclaw-clawsweeper-225 (2)
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
1 parent 8780817 commit 1865a79

2 files changed

Lines changed: 58 additions & 1 deletion

File tree

‎src/clawsweeper.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9490,7 +9490,17 @@ function dataModelUpgradeProofFromReport(markdown: string): boolean {
94909490
/\b(?:should|would|will|expected|intend(?:ed)?|designed|aims?|plans?|promises?)\b[^.]{0,120}\b(?:preserv(?:e|ed|es)|remain(?:s)? compatible|compatib(?:le|ility)|migration|upgrade|backfill)\b/i.test(
94919491
negativeProofText,
94929492
) ||
9493-
/\b(?:migration|upgrade|backfill|existing data|existing database|existing cache|existing state)\b[^.]{0,120}\b(?:should|would|will|expected|intend(?:ed)?|designed|aims?|plans?|promises?)\b/i.test(
9493+
/\b(?:migration|upgrade|backfill|existing data|existing database|existing cache|existing state)\b[^.]{0,120}\b(?:should|would|will|expected|intend(?:ed)?|designed|aims?|plans?|promises?|planned|pending|unimplemented)\b/i.test(
9494+
negativeProofText,
9495+
)
9496+
) {
9497+
return false;
9498+
}
9499+
if (
9500+
/\b(?:migration|upgrade|backfill|compatibility)\b[^.]{0,160}\b(?:proof|test(?:ed|s|ing)?|cover(?:ed|age)?|verif(?:y|ied|ication)|compatib(?:le|ility))\b[^.]{0,120}\b(?:is|are|remains?)?\s*(?:planned|pending|future|unimplemented|incomplete|todo|not yet|to be (?:added|done|implemented|verified|tested))\b/i.test(
9501+
negativeProofText,
9502+
) ||
9503+
/\b(?:planned|pending|future|unimplemented|incomplete|todo|not yet|to be (?:added|done|implemented|verified|tested))\b[^.]{0,120}\b(?:migration|upgrade|backfill|compatibility)\b[^.]{0,160}\b(?:proof|test(?:ed|s|ing)?|cover(?:ed|age)?|verif(?:y|ied|ication)|compatib(?:le|ility))\b/i.test(
94949504
negativeProofText,
94959505
)
94969506
) {

‎test/clawsweeper.test.ts‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4110,6 +4110,53 @@ Full review comments:
41104110
assert.doesNotMatch(markers, /clawsweeper-verdict:pass/);
41114111
});
41124112

4113+
test("data model reports reject planned migration tests as proof", () => {
4114+
const report = `${reportFrontMatter({
4115+
repository: "openclaw/openclaw",
4116+
type: "pull_request",
4117+
number: "74463",
4118+
decision: "keep_open",
4119+
close_reason: "none",
4120+
review_status: "complete",
4121+
confidence: "high",
4122+
labels: JSON.stringify(["clawsweeper:automerge"]),
4123+
work_candidate: "none",
4124+
pull_head_sha: "abc123def456",
4125+
data_model_change: "true",
4126+
data_model_surfaces: JSON.stringify(["database schema: packages/database/schema.ts"]),
4127+
})}
4128+
4129+
## Summary
4130+
4131+
Keep this data-model PR open for automerge.
4132+
4133+
## What This Changes
4134+
4135+
Adds a stored database column.
4136+
4137+
## Solution Assessment
4138+
4139+
Migration tests are planned.
4140+
4141+
## Review Findings
4142+
4143+
Overall correctness: patch is correct
4144+
4145+
Overall confidence: 0.9
4146+
4147+
Full review comments:
4148+
4149+
- none
4150+
`;
4151+
4152+
const comment = renderReviewCommentFromReport(report, "none");
4153+
const markers = reviewAutomationMarkersFromReport(report);
4154+
4155+
assert.match(comment, /Confirm migration or upgrade compatibility proof before merge\./);
4156+
assert.match(markers, /clawsweeper-verdict:needs-human/);
4157+
assert.doesNotMatch(markers, /clawsweeper-verdict:pass/);
4158+
});
4159+
41134160
test("data model reports reject hypothetical compatibility proof", () => {
41144161
const report = `${reportFrontMatter({
41154162
repository: "openclaw/openclaw",

0 commit comments

Comments
 (0)