Skip to content

fix(repair): select gitcrawl low-signal PRs by facts, not keywords - #1778

Merged
obviyus merged 1 commit into
mainfrom
judges-d2b-gitcrawl-selection
Oct 9, 2026
Merged

obviyus merged 1 commit into
mainfrom
judges-d2b-gitcrawl-selection

Conversation

@obviyus

@obviyus obviyus commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

Gitcrawl low-signal PR selection (src/repair/import-gitcrawl-low-signal-prs.ts) now selects by facts only. It no longer matches title, body, or path keywords.

Removed:

  • The hasConcreteFix blocker. It ran /\b(fixes|fixes?|root cause|repro|regression|bug|problem)\b/ over the title and body and blocked with "possible focused fix needs human review".
  • The keyword signals:
    • blank template
    • docs-only (\bdocs?\b in the title + docs paths)
    • test-only
    • refactor/cleanup
    • third-party capability (/(new|add|feat).*(plugin|provider|…)/)
    • risky infra
    • dirty branch

The score now counts facts:

  • no_update_<N>d: no update in --stale-days days (new flag, default 30)
  • outside_author: NONE, FIRST_TIMER or FIRST_TIME_CONTRIBUTOR
  • draft
  • broad_change: 12 or more changed files

--min-score still defaults to 2.

Blockers: maintainer association, assignees, and security labels, markers or advisory IDs (unchanged hasSecuritySignalText).

The job section is now "Gitcrawl Candidate Facts". The repair worker still judges close_low_signal under instructions/low-signal-prs.md. The applicator still re-fetches live state and rejects maintainer-touched PRs.

Changelog: changelog.d/gitcrawl-low-signal-facts-only.md. This is Batch D part 2b (part 1 is #1775, part 2a is #1777).

Why

Maintainer rule (LLM systems): no keyword or path classifiers that pre-decide outcomes; code selects by facts and the model judges. Code-judge inventory (Batch D) listed "import-gitcrawl-low-signal-prs: title/body keyword and path triage (hasConcreteFix, isDocsOnly, isTestOnly, isRefactor, isNewPlugin, isInfra)". The maintainer approved: select by deterministic facts (age, author association, assignees, file count) and delete hasConcreteFix and the keyword signals.

Proof (real data)

The local portable store is gitcrawl-store/data/openclaw__openclaw.sync.db, exported 2026-09-18 (gitcrawl-portable-sync-v2). It has no thread_code_snapshots or thread_changed_files tables, and pull_request_files is empty. Both main and this branch stop with no such table: thread_code_snapshots, so the importer cannot run against the current portable schema on main either. That gap is separate and out of scope here.

To compare selection, I added empty shim tables to a copy and ran both builds with --dry-run --json --limit 100000 --skip-existing false:

--min-score main this PR
2 (default) 0 378 (all no_update_30d+draft)
1 218 (all third_party_or_external_capability, a title/body keyword) 16,293 (no_update_30d 15,635; no_update_30d+draft 378; draft 280)

outside_author never fires on this store because its raw_json has no author association. Every real run stages at most --limit PRs (default 20 PRs → 4 worker jobs).

New test test/repair/import-gitcrawl-low-signal-prs.test.ts uses a real SQLite DB and the real CLI. A stale outside-author PR titled "Fixes the root cause of a regression" is now selected with facts no_update_30d, outside_author; main blocked it on keywords. A member PR and an assigned PR stay blocked. A fresh PR with one fact stays below the score.

pnpm run check: exit 0 (static, format, build:all, lint, all tests: 6,927 passed, 0 failed).

Needs maintainer call

  • The importer's SQL targets tables that the current portable gitcrawl store does not export (thread_code_snapshots, thread_changed_files). The CLI fails on main and on this branch alike. Recommendation: point it at pull_request_files, or retire the manual lane. That fix is out of scope here.

Codex review dispositions

codex review --base main on this branch: no actionable findings.

Merge Danger

  • Door: two-way. This is a manual CLI only (pnpm repair:import-gitcrawl-low-signal); no workflow calls it. No stored formats change.
  • Blast radius: low-signal cleanup jobs staged by hand from gitcrawl data. The worker and the guarded applicator still decide each close.
  • Approved decision (maintainer): select by facts only; delete hasConcreteFix and the keyword signals.
  • Spend change: on the current store, eligible candidates at the default score go from 0 to 378. Spend per run stays capped by --limit (default 20 PRs → 4 repair-worker jobs), and runs happen only when an operator starts them. PRs whose text mentions a bug or fix can now reach the worker. The worker's low-signal policy keeps plausible fixes open (needs_human), so expect more worker-judged needs_human/keep_* outcomes per batch.

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The manual gitcrawl importer selects PR candidates using inactivity, author association, draft status, and file count instead of title, body, and path classifiers.

Example: An operator imports a stale outside-author PR titled “Fixes the root cause of a regression.”

  • Before: The PR has no qualifying keyword signals and is excluded at the default score.
  • After: The PR qualifies with no_update_30d and outside_author for the worker to judge.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused simplification with relevant CLI evidence, useful regression coverage, and clearly disclosed proof limits.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR reports after-fix execution of the actual importer CLI on real gitcrawl rows, showing 378 eligible stale drafts versus zero on base at the default score. Empty compatibility tables isolate selection from a disclosed pre-existing schema failure; this proves candidate admission, not untouched-store compatibility or actual GitHub closure.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Operators’ cleanup batches depend on PR wording instead of factual eligibility.
Reason: The PR implements the recorded facts-only selection direction in the existing owner and removes more production code than it adds.

Merge readiness

✅ Ready for maintainer review

This PR contains useful, bounded work that current main does not implement. The introduced changes preserve downstream judgment and live close guards, and no actionable patch defect was found.

Priority: P2
Reviewed head: 16751d3ff1bdf610aaa70b3e61ad475070b8e58b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The manual importer reads locally stored GitHub PR data and stages bounded cleanup jobs. A model judges those candidates, and a separate applicator checks live GitHub state before any close.

flowchart TD
 A[Local gitcrawl PR data] --> B[Manual importer]
 B --> C[Protection checks]
 C --> D[Fact score and batch limit]
 D --> E[Cleanup worker judgment]
 E --> F[Live GitHub close guards]
 F --> G[Keep open or guarded close]
Loading

Technical review

Best possible solution:

Keep candidate admission factual and leave low-signal judgment with the worker, while addressing the pre-existing portable-schema mismatch separately.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a runtime bug report; the base source directly establishes keyword-based admission, and the reported CLI comparison demonstrates the changed selection.

Is this the best way to solve the issue?

Yes. Replacing admission classifiers in the existing importer is narrower than adding another selection path, and it preserves the downstream decision owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ca02659810a7.

Provenance checked

  • src/repair/import-gitcrawl-low-signal-prs.ts candidate scoring and job explanation changes intended behavior with a stated reason (62dd779: The introducing commit states “refactor: unify clawsweeper repair lane”; no associated introducing PR was returned, so a more specific rationale for the keyword heuristics is unavailable.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 62dd779 adds src/repair/import-gitcrawl-low-signal-prs.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 62dd779eb155; files: src/repair/import-gitcrawl-low-signal-prs.ts)

Review metrics

Metric Value Why it matters
Production and test LOC production -80 net lines; tests +84 lines Removing seven semantic classifiers simplifies production selection while adding CLI-level behavioral coverage.

Labels

Label changes:

  • add P2: This is a bounded improvement to operator-triggered backlog admission.
  • add merge-risk: 🚨 automation: The accepted selection change admits more cleanup candidates, including plausible fixes, while preserving worker judgment and live close guards.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a bounded improvement to operator-triggered backlog admission.
  • merge-risk: 🚨 automation: The accepted selection change admits more cleanup candidates, including plausible fixes, while preserving worker judgment and live close guards.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 8, 2026, 8:15 PM ET / October 9, 2026, 00:15 UTC.

@obviyus
obviyus merged commit 70d71a3 into main Oct 9, 2026
24 checks passed
@obviyus
obviyus deleted the judges-d2b-gitcrawl-selection branch October 9, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant