Skip to content

Autoloop: stop double-prefixing program-issue titles and dedupe scheduler discovery#193

Merged
mrjf merged 3 commits intomainfrom
copilot/autoloop-fix-duplicate-pr-prefix
Apr 23, 2026
Merged

Autoloop: stop double-prefixing program-issue titles and dedupe scheduler discovery#193
mrjf merged 3 commits intomainfrom
copilot/autoloop-fix-duplicate-pr-prefix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

The create-issue safe-output's title-prefix: "[Autoloop] " was being applied on top of the agent-supplied [Autoloop: name] marker, producing titles like [Autoloop] [Autoloop: tsb-perf-evolve]. The scheduler then slugified that to autoloop-autoloop-tsb-perf-evolve, didn't recognise it as the file-based program, and scheduled the same program twice — two branches, two PRs, two state files, divergent populations.

Changes

  • autoloop.md prompt (Fix 1, Option A) — at the two title-construction sites (program-issue creation and unconfigured-program setup-issue), instruct the agent to supply [Autoloop: {program-name}] exactly and not prepend [Autoloop] itself; the safe-output adds it.
  • autoloop_scheduler.py (Fix 2) — new extract_program_name_from_issue_title() matches [Autoloop: name] while tolerating any number of leading [Autoloop] prefixes (case-insensitive). First-pass discovery uses it instead of the strict regex, so doubly-prefixed program issues already in the wild merge with their file-based program rather than forking a duplicate.
  • autoloop_scheduler.py (Fix 3) — defensive module-level slugify() strips known [Autoloop] / [Autoloop: name] prefixes before slugifying. Used in the second-pass fallback for human-authored issues so even a stray doubly-prefixed title that doesn't match a known file-based program collapses to a clean slug instead of autoloop-autoloop-....
  • .gitignore — ignore __pycache__/ and *.pyc.

Behaviour

title:  "[Autoloop] [Autoloop: tsb-perf-evolve]"
before: extract → no match → slugify → "autoloop-autoloop-tsb-perf-evolve"  → second program scheduled
after:  extract → "tsb-perf-evolve" → matches file-based program → selected_issue=189, single program

Out of scope

The repo cleanup called out in the issue (close PR #191, delete branch autoloop/autoloop-autoloop-tsb-perf-evolve, delete the stranded state file on memory/autoloop, rename issue #189) needs a maintainer — an agent can't perform those from a PR. Once these fixes land the next scheduler run merges #189 into the file-based program automatically, so the duplication stops compounding even before that cleanup happens.

Copilot AI changed the title [WIP] Fix duplicate PR prefixes for Autoloop issue Autoloop: stop double-prefixing program-issue titles and dedupe scheduler discovery Apr 23, 2026
Copilot AI requested a review from mrjf April 23, 2026 05:37
Copilot finished work on behalf of mrjf April 23, 2026 05:37
@mrjf mrjf marked this pull request as ready for review April 23, 2026 05:49
@mrjf mrjf merged commit 2d32f0a into main Apr 23, 2026
17 checks passed
@mrjf mrjf deleted the copilot/autoloop-fix-duplicate-pr-prefix branch April 23, 2026 06:04
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.

Autoloop: duplicate PRs opening because program-issue title gets double-prefixed with [Autoloop] and scheduler treats file + issue as two programs

2 participants