Skip to content

Commit ec8c493

Browse files
author
Peter Steinberger
committed
fix: trust source-backed triage and apply all safe close reasons
1 parent 8a31b9f commit ec8c493

11 files changed

Lines changed: 173 additions & 32 deletions

‎.github/workflows/exact-review-batch-publish.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ jobs:
3131
timeout-minutes: 60
3232
env:
3333
EXACT_REVIEW_QUEUE_URL: ${{ vars.CLAWSWEEPER_EXACT_REVIEW_QUEUE_URL || 'https://clawsweeper.openclaw.ai' }}
34+
CLAWSWEEPER_AUTO_CLOSE_REASONS: ${{ vars.CLAWSWEEPER_AUTO_CLOSE_REASONS || 'all' }}
35+
CLAWSWEEPER_UNCONFIRMED_PRODUCT_DIRECTION_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_UNCONFIRMED_PRODUCT_DIRECTION_CLOSE_ENABLED || 'false' }}
36+
CLAWSWEEPER_UNSPONSORED_FEATURE_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_UNSPONSORED_FEATURE_CLOSE_ENABLED || 'false' }}
37+
CLAWSWEEPER_STALE_VERSION_BUG_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_STALE_VERSION_BUG_CLOSE_ENABLED || 'false' }}
38+
CLAWSWEEPER_OBSOLETE_FIX_PR_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_OBSOLETE_FIX_PR_CLOSE_ENABLED || 'false' }}
39+
CLAWSWEEPER_AUTHOR_PR_BUDGET: ${{ vars.CLAWSWEEPER_AUTHOR_PR_BUDGET || '15' }}
40+
CLAWSWEEPER_AUTHOR_PR_BUDGET_MAX_CLOSES_PER_RUN: ${{ vars.CLAWSWEEPER_AUTHOR_PR_BUDGET_MAX_CLOSES_PER_RUN || '5' }}
41+
CLAWSWEEPER_IDEA_REVIVAL_REACTIONS: ${{ vars.CLAWSWEEPER_IDEA_REVIVAL_REACTIONS || '5' }}
3442
EXACT_REVIEW_BATCH_ID: exact-review-batch:${{ github.run_id }}
3543
EXACT_REVIEW_BATCH_LEASE_OWNER: github:${{ github.run_id }}
3644
EXACT_REVIEW_BATCH_DISPATCH_ID: ${{ inputs.dispatch_id }}

‎.github/workflows/sweep.yml‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ run-name: >-
4141
github.event.inputs.apply_min_age_days != '0' ||
4242
github.event.inputs.apply_min_age_minutes != '' ||
4343
github.event.inputs.apply_kind != 'all' ||
44-
github.event.inputs.apply_close_reasons != 'all' ||
44+
(github.event.inputs.apply_close_reasons != '' && github.event.inputs.apply_close_reasons != 'all') ||
4545
github.event.inputs.apply_stale_min_age_days != '60' ||
4646
github.event.inputs.apply_close_delay_ms != '2000' ||
4747
github.event.inputs.apply_checkpoint_size != '40' ||
@@ -115,9 +115,9 @@ on:
115115
required: false
116116
default: "all"
117117
apply_close_reasons:
118-
description: "Close reasons enabled in apply-existing mode, comma-separated or all"
118+
description: "Optional apply-existing close-reason override; defaults to the shared automatic-close policy"
119119
required: false
120-
default: "all"
120+
default: ""
121121
apply_stale_min_age_days:
122122
description: "Minimum item age in days before age-gated stale or mostly-implemented closes"
123123
required: false
@@ -175,9 +175,9 @@ on:
175175
required: false
176176
default: "false"
177177
apply_after_review_close_reasons:
178-
description: "Close reasons enabled for immediate post-review apply"
178+
description: "Optional immediate-close reason override; defaults to the shared automatic-close policy"
179179
required: false
180-
default: "implemented_on_main,duplicate_or_superseded,low_signal_unmergeable_pr"
180+
default: ""
181181
apply_after_review_min_age_minutes:
182182
description: "Minute-level item age floor for immediate post-review apply"
183183
required: false
@@ -219,6 +219,14 @@ permissions:
219219

220220
env:
221221
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
222+
CLAWSWEEPER_AUTO_CLOSE_REASONS: ${{ vars.CLAWSWEEPER_AUTO_CLOSE_REASONS || 'all' }}
223+
CLAWSWEEPER_UNCONFIRMED_PRODUCT_DIRECTION_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_UNCONFIRMED_PRODUCT_DIRECTION_CLOSE_ENABLED || 'false' }}
224+
CLAWSWEEPER_UNSPONSORED_FEATURE_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_UNSPONSORED_FEATURE_CLOSE_ENABLED || 'false' }}
225+
CLAWSWEEPER_STALE_VERSION_BUG_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_STALE_VERSION_BUG_CLOSE_ENABLED || 'false' }}
226+
CLAWSWEEPER_OBSOLETE_FIX_PR_CLOSE_ENABLED: ${{ vars.CLAWSWEEPER_OBSOLETE_FIX_PR_CLOSE_ENABLED || 'false' }}
227+
CLAWSWEEPER_AUTHOR_PR_BUDGET: ${{ vars.CLAWSWEEPER_AUTHOR_PR_BUDGET || '15' }}
228+
CLAWSWEEPER_AUTHOR_PR_BUDGET_MAX_CLOSES_PER_RUN: ${{ vars.CLAWSWEEPER_AUTHOR_PR_BUDGET_MAX_CLOSES_PER_RUN || '5' }}
229+
CLAWSWEEPER_IDEA_REVIVAL_REACTIONS: ${{ vars.CLAWSWEEPER_IDEA_REVIVAL_REACTIONS || '5' }}
222230
CLAWSWEEPER_APP_CLIENT_ID: Iv23liOECG0slfuhz093
223231
CLAWSWEEPER_MODEL: internal
224232
CLAWSWEEPER_RUNNER: ${{ vars.CLAWSWEEPER_RUNNER || 'codex' }}
@@ -1318,7 +1326,6 @@ jobs:
13181326
GH_TOKEN: ${{ steps.target-write-token.outputs.token }}
13191327
TARGET_REPO: ${{ steps.target.outputs.target_repo }}
13201328
ITEM_NUMBER: ${{ steps.target.outputs.item_number }}
1321-
CLOSE_REASONS: implemented_on_main,duplicate_or_superseded,low_signal_unmergeable_pr
13221329
MIN_AGE_MINUTES: "0"
13231330
REVIEW_ONLY: ${{ fromJSON(steps.claim-exact-review-queue.outputs.decision).sourceAction == 'failed_review_shard_recovery' && 'true' || 'false' }}
13241331
EXACT_EVENT_PUBLICATION: "true"
@@ -2284,7 +2291,6 @@ jobs:
22842291
REPO_TOKEN: ${{ github.token }}
22852292
TARGET_REPO: ${{ steps.publication-context.outputs.target_repo }}
22862293
ITEM_NUMBER: ${{ steps.publication-context.outputs.item_number }}
2287-
CLOSE_REASONS: implemented_on_main,duplicate_or_superseded,low_signal_unmergeable_pr
22882294
MIN_AGE_MINUTES: "0"
22892295
REVIEW_ONLY: ${{ fromJSON(steps.publication-context.outputs.decision).sourceAction == 'failed_review_shard_recovery' && 'true' || 'false' }}
22902296
EXACT_EVENT_PUBLICATION: "true"
@@ -4837,7 +4843,7 @@ jobs:
48374843
exit 0
48384844
fi
48394845
item_count="$(pnpm run --silent workflow -- count-csv --items "$item_numbers")"
4840-
close_reasons="${{ github.event.inputs.apply_after_review_close_reasons || 'implemented_on_main,duplicate_or_superseded,low_signal_unmergeable_pr' }}"
4846+
close_reasons="${{ github.event.inputs.apply_after_review_close_reasons || env.CLAWSWEEPER_AUTO_CLOSE_REASONS }}"
48414847
min_age_minutes="${{ github.event.inputs.apply_after_review_min_age_minutes || '0' }}"
48424848
for attempt in 1 2 3; do
48434849
if gh workflow run sweep.yml \
@@ -4849,7 +4855,7 @@ jobs:
48494855
-f apply_min_age_minutes="$min_age_minutes" \
48504856
-f apply_kind=all \
48514857
-f apply_close_reasons="$close_reasons" \
4852-
-f apply_stale_min_age_days=30 \
4858+
-f apply_stale_min_age_days=60 \
48534859
-f apply_close_delay_ms=1000 \
48544860
-f apply_comment_sync_min_age_days=0; then
48554861
echo "Dispatched isolated apply for item numbers: $item_numbers"
@@ -5418,7 +5424,7 @@ jobs:
54185424
min_age_days="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_min_age_days || '0' }}"
54195425
min_age_minutes="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_min_age_minutes || '' }}"
54205426
apply_kind="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_kind || 'all' }}"
5421-
apply_close_reasons="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_close_reasons || 'all' }}"
5427+
apply_close_reasons="${{ github.event.inputs.apply_close_reasons || env.CLAWSWEEPER_AUTO_CLOSE_REASONS }}"
54225428
stale_min_age_days="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_stale_min_age_days || '60' }}"
54235429
item_numbers="${{ github.event.inputs.apply_item_numbers || '' }}"
54245430
sync_comments_only="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_sync_comments_only || 'false' }}"
@@ -5505,7 +5511,7 @@ jobs:
55055511
--dry-run \
55065512
--item-numbers "$item_numbers" \
55075513
--apply-kind "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_kind || 'all' }}" \
5508-
--apply-close-reasons "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_close_reasons || 'all' }}" \
5514+
--apply-close-reasons "${{ github.event.inputs.apply_close_reasons || env.CLAWSWEEPER_AUTO_CLOSE_REASONS }}" \
55095515
--stale-min-age-days "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_stale_min_age_days || '60' }}" \
55105516
--min-age-days "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_min_age_days || '0' }}" \
55115517
"${min_age_minutes_arg[@]}" \
@@ -5792,7 +5798,7 @@ jobs:
57925798
min_age_days="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_min_age_days || '0' }}"
57935799
min_age_minutes="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_min_age_minutes || '' }}"
57945800
apply_kind="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_kind || 'all' }}"
5795-
apply_close_reasons="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_close_reasons || 'all' }}"
5801+
apply_close_reasons="${{ github.event.inputs.apply_close_reasons || env.CLAWSWEEPER_AUTO_CLOSE_REASONS }}"
57965802
stale_min_age_days="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_stale_min_age_days || '60' }}"
57975803
close_delay_ms="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_close_delay_ms || '2000' }}"
57985804
checkpoint_size="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.apply_checkpoint_size || '40' }}"

‎prompts/review-item.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ClawSweeper Review
22

3-
You are reviewing one open item from the target repository for conservative maintainer cleanup.
3+
You are reviewing one open item from the target repository for decisive, evidence-backed maintainer cleanup. Maintainer attention is scarce; an issue or PR must earn its place in the active backlog.
44

55
For each issue, aim for one useful outcome: close it when current `main` or an
66
already-merged PR demonstrably fixes the reported behavior; automatically route
@@ -515,7 +515,9 @@ Use reason-specific anchors:
515515
- For `stale_version_bug`, confirm this is a bug issue at least 120 days old that names a clearly outdated version/build or targets a code path visibly changed on `main`; no thread participant has confirmed reproduction on a recent release; and there is no maintainer engagement, protected label, or label whose normalized name contains `security`.
516516
- For `obsolete_fix_pr`, confirm this is a PR at least 90 days old, its current head has had no commit/check activity for at least 30 days, it changes at most five files, and every touched path was substantially rewritten or removed on `main` after the PR head commit. Include deleted or rewritten CI/workflow fixes. Require no maintainer engagement or protected label.
517517

518-
If you cannot point to concrete code/docs/history/related-item evidence for the close reason, keep the item open. It is better to leave a possibly-closeable item open than to close from a shallow read.
518+
Ground every close reason in the report, diff, source, documentation, history, ownership boundary, or canonical related item. For an incoherent report, off-topic submission, unsupported external product, or PR with no identifiable useful contribution, the missing actionable information or proven ownership boundary is itself sufficient triage evidence. Do not keep low-signal work open merely because a hypothetical upstream bug might exist or a better future report could become actionable. Close the current item using the most accurate existing reason, explain exactly what would make a new report actionable, and explicitly invite the author to reopen with that evidence. Confidence applies to whether this submission merits scarce maintainer attention, not to proving that no possible bug exists anywhere.
519+
520+
Default to closure when an unprotected item does not establish a concrete owned bug, a specific missing core capability, a coherent useful patch, or a distinct contribution worth maintainer time. Use `incoherent` for reports or PRs that never identify a testable problem or coherent useful change; `not_actionable_in_repo` for support, configuration, external-product, or third-party ownership reports; `cannot_reproduce` for independently source-disproven claims; `clawhub` for self-contained optional extensions; `duplicate_or_superseded` for already-tracked work; and `low_signal_unmergeable_pr`, `stalled_unproven_pr`, or `abandoned_pr` when their existing evidence and activity guards are met. Do not invent a new close reason or misclassify an actual upstream defect merely to reduce backlog.
519521

520522
Prefer the most terminal safe outcome. When the evidence satisfies a close reason,
521523
prefer `close` over `manual_review` or `none`. Do not use `manual_review` as a
@@ -538,7 +540,7 @@ Close only when the evidence is strong and the repository policy allows it. Allo
538540
- `stale_version_bug`: an issue-only bug report is at least 120 days old and is tied to a clearly outdated version/build or a code path that has visibly changed on current `main`, with no reproduction confirmed on a recent release anywhere in the thread. Never use it when a maintainer has engaged, a protected label is present, or any normalized label contains `security`; security-labeled reports stay open for human triage. The close comment must name the reported version/build (or its age), say that the codebase has changed substantially since, ask the reporter to retest on the current release, and promise reopening when a fresh current-version reproduction is added. Apply remains behind a separate default-off policy gate and rechecks 120-day age, 90-day human inactivity, live assignment/milestone/reaction/linked-PR/security state, and maintainer comments.
539541
- `obsolete_fix_pr`: a PR-only small fix is at least 90 days old, its latest head commit/status/check activity is at least 30 days old, it changes at most five files, and every touched path was substantially rewritten or removed on current `main` after the PR head commit, making the submitted fix moot regardless of authorship quality. CI/workflow fixes qualify when the patched workflow has since been rewritten or deleted. Never use it with maintainer engagement or protected labels. An S/A/B-rated PR with sufficient or overridden proof stays protected only while its patch still applies; when evidence proves every touched path is gone or changed later on `main`, the PR can use this reason, but the close comment must credit the work and name the underlying main-branch rewrite/removal. State which files changed or disappeared and invite a fresh PR against current `main` if the problem still reproduces. Apply remains behind a separate default-off policy gate and fails closed unless live GitHub reads re-prove age, inactivity, small diff, engagement absence, and per-path obsolescence.
540542
- `not_actionable_in_repo`: the request is concrete enough to understand, but the action belongs outside the OpenClaw source repository, such as GitHub/project administration, external hosted setup, third-party service configuration, domain/account ownership, a separately distributed application's renderer/provider/client, or historical comment/issue cleanup that cannot be fixed by changing OpenClaw code or docs. A real bug in an externally owned product is still not actionable in this repository when the report does not establish an actual upstream OpenClaw defect: close it with this reason, identify the external owner, set `workCandidate: "none"`, and do not turn missing third-party logs into a maintainer-review blocker. Do not use this for verified OpenClaw product bugs, plugin API gaps, or reports that actually identify an owned source-level failure. Use this for setup/support reports, one-line reports, screenshot-only reports, or credential-redaction incidents only when current code/docs show the behavior is expected or externally configured and the item lacks a concrete source-level reproduction. Do not keep these open only to collect support logs; the close comment should ask for credential rotation/redaction when relevant and point to the exact diagnostic command, docs page, or external maintainer needed for a new actionable report.
541-
- `incoherent`: the item is too unclear or internally contradictory after reading the title/body/comments.
543+
- `incoherent`: after reading the title, body, comments, and (for PRs) the submitted diff, the item still does not identify a coherent testable problem, actionable owned behavior, or useful bounded contribution. Missing essential reproduction/context, contradictory claims, empty or generated issue content, or a PR whose patch cannot be connected to a concrete maintainer-worthy change are sufficient; do not reserve maintainer time merely because the submitter might later provide a better report. Close courteously and explicitly invite reopening with an official OpenClaw version, affected component, reproduction, expected/actual behavior, or a focused useful patch.
542544
- `stale_insufficient_info`: an issue is older than 60 days and cannot reasonably be verified against current `main` either because concrete reproduction data is missing or because the report targets a significantly outdated version or behavior whose relevant code has since changed materially, with no confirming human activity reproducing it on a current version in the last 60 days. Use this only for issues, not PRs. Never use stale age to close a clearly described remaining feature, configuration surface, security hardening request, or product decision. The close comment must ask the reporter to open a new issue if it is still a problem, with current reproduction steps, expected/actual behavior, logs/screenshots, versions, config, or affected channel/plugin details.
543545

544546
For `openclaw/clawhub`, review every issue and PR with the same depth, but only close items where current `main` definitely implements the requested or intended change. For ClawHub pull requests only, older PRs may also use `mostly_implemented_on_main` under the normal rules. Keep all other ClawHub outcomes open.
@@ -585,7 +587,7 @@ those remain work-lane context, not a typed root-cause contract.
585587

586588
Close as implemented when current `main` solves the observable user problem well enough, even if it did not use the exact workflow, file split, or field names proposed in the item. For broad umbrella requests, weigh the title and central user problem first. If current `main` solves the central problem and any leftovers are already tracked by a narrower related item, close as `duplicate_or_superseded` or `implemented_on_main` as appropriate and link the canonical follow-up. For older PRs where current `main` covers most of the branch but not every line, use `mostly_implemented_on_main` instead of stretching `implemented_on_main`. Keep open when a meaningful requested capability remains missing and no narrower canonical follow-up exists.
587589

588-
Keep open for everything else, including current real bugs, unclear-but-salvageable reports, stale PRs with useful unique work that do not meet the `stalled_unproven_pr`, `abandoned_pr`, or `obsolete_fix_pr` conditions, optional features that require a new core/plugin API first, or anything where the evidence is not high-confidence.
590+
Keep open for actual current upstream bugs, concrete reports that establish an official affected release or owned source failure, stale PRs with meaningful unique work, optional features that genuinely require a missing core/plugin API, security-sensitive items, protected labels, maintainer-engaged work, and other submissions with specific evidence of maintainer value. Do not treat an unclear-but-theoretically-salvageable report, speculative source connection, possible future logs, or generic generated PR as a reason to keep an otherwise low-value submission open.
589591

590592
Keep open for `author_pr_budget_exceeded` whenever the review context does not explicitly provide the author's open-PR count. Review workers must not add a per-item GitHub API search for that count; the default path is apply-side deterministic promotion and live verification.
591593

@@ -711,6 +713,10 @@ write one long paragraph. The comment should explain the specific reason,
711713
mention that this was a Codex review, acknowledge useful prior
712714
discussion/comment links when relevant, and include concrete evidence such as
713715
file paths, release version, commit SHA, or fix timestamp when available.
716+
For support, external, incoherent, disproven, or otherwise under-evidenced work,
717+
explicitly invite reopening when the author can provide the missing official
718+
version, owned component, clear reproduction, useful focused patch, or other
719+
specific evidence that changes the decision.
714720

715721
For both close and keep-open decisions, the public review comment should include
716722
a short `Likely related people` section with the best routing candidates from

0 commit comments

Comments
 (0)