Skip to content

Comments

feat(sweep): Add master tracking issue for sweep PRs#210

Merged
dcramer merged 3 commits intomainfrom
feat/sweep-tracking-issue
Feb 22, 2026
Merged

feat(sweep): Add master tracking issue for sweep PRs#210
dcramer merged 3 commits intomainfrom
feat/sweep-tracking-issue

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 22, 2026

Sweep PRs currently go up as isolated draft PRs with no central coordination
point. Reviewers seeing individual fix: ... PRs labeled warden have no way
to understand the full sweep scope, which files were checked, what was found,
or how the PRs relate to each other.

This adds a tracking issue created between the verify and patch phases. Every
PR references the issue via Ref #N, and the organize phase posts a completion
comment with a task list reviewers can check off as they work through PRs.

New script: create_issue.py

  • Creates a GitHub issue summarizing scan stats, verified findings, and skills run
  • Idempotent: skips if issueUrl already exists in manifest
  • Defensively ensures the warden label exists before creating the issue
  • Writes issueUrl, issueNumber, and phases.issue to manifest

Updated: organize.py

  • New update_tracking_issue() posts a completion comment on the tracking issue
    with a summary table (created/skipped/failed/security) and a PR task list

Updated: SKILL.md

  • New Phase 3 (Issue) between Verify and Patch
  • Patch renumbered to Phase 4, Organize to Phase 5
  • PR body template includes conditional Ref #${ISSUE_NUMBER}
  • Resume section updated with issue phase idempotency note

Collateral improvements (from code review/simplifier pass):

  • Extracted read_json, write_json, severity_badge, pr_number_from_url into _utils.py
  • find_reviewers.py now excludes the current GitHub user from reviewer suggestions
  • scan.py and generate_report.py now separate timeouts from errors in output

Create a GitHub issue before patching that summarizes sweep results and
gives reviewers a single coordination point. Each PR references the
tracking issue, and the organize phase posts a completion comment with
a task list of all created PRs.

New script create_issue.py handles issue creation with idempotency
(skips if issueUrl already in manifest). Also extracts shared utilities
(read_json, write_json, severity_badge, pr_number_from_url) into
_utils.py, improves find_reviewers.py to exclude the current user,
and separates timeout vs error tracking in scan output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make update_tracking_issue() idempotent by checking for an existing
"Sweep Complete" comment before posting a new one. This preserves
the organize phase's re-run safety guarantee.

Restore --fail-on off flag in scan_file() that was inadvertently
removed. Without it, warden exits non-zero on findings and scan_file
misclassifies those files as errors, silently dropping findings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Restore --min-confidence off in scan_file() that was inadvertently
removed. Without it, warden applies its default confidence threshold
and silently drops low-confidence findings.

Extract ensure_github_label() into _utils.py to eliminate three
duplicate implementations across scan.py, create_issue.py, and
organize.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcramer dcramer marked this pull request as ready for review February 22, 2026 21:34
@dcramer dcramer merged commit b6c797b into main Feb 22, 2026
11 of 12 checks passed
@dcramer dcramer deleted the feat/sweep-tracking-issue branch February 22, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant