Skip to content

Name repos mechanically from the idea, not via gpt-4o-mini - #151

Merged
AndrewRqy merged 1 commit into
ChicagoHAI:mainfrom
AndrewRqy:fix/mechanical-repo-naming
Jul 30, 2026
Merged

Name repos mechanically from the idea, not via gpt-4o-mini#151
AndrewRqy merged 1 commit into
ChicagoHAI:mainfrom
AndrewRqy:fix/mechanical-repo-naming

Conversation

@AndrewRqy

Copy link
Copy Markdown
Contributor

Problem

_generate_repo_name condensed the idea title into a slug via a gpt-4o-mini call (OpenRouter/OpenAI). When no OPENROUTER_KEY/OPENAI_API_KEY was set, or the call failed, it silently fell back to the raw idea id, producing names like probabilistic_calibration_metr_20260730_075410_ac649b07. This hit any run without an OpenAI-compatible key (for example claude-subscription runs), independent of the --provider agent.

Change

Derive the slug deterministically from the idea.yaml content, tried in order title -> hypothesis -> domain, then the sanitized idea id as a last resort. Naming no longer depends on an external LLM or API key. Same {slug}-{random}-{provider} shape; apostrophes are stripped so possessives stay one word (solver's -> solvers).

hypothesis is threaded through create_research_repo and its two primary callers (runner, submit). fetch_from_ideahub.py is left to PR #147 (which is editing it).

Testing

Ran the actual function against real workspace titles plus stress cases (blank/stopword-only title, punctuation/symbols, non-ASCII, all-empty). Every output is a valid GitHub name with a deterministic slug, and the fallback ordering resolves correctly.

_generate_repo_name called gpt-4o-mini (OpenRouter/OpenAI) to condense the title and silently fell back to the raw idea_id when no OPENROUTER_KEY/OPENAI_API_KEY was set or the call failed, producing names like probabilistic_calibration_metr_20260730_075410_ac649b07. Derive the slug deterministically from idea.yaml, tried in order title -> hypothesis -> domain, then the sanitized idea_id as last resort. Apostrophes are stripped so possessives stay one word. Threads hypothesis through create_research_repo and its two primary callers (runner, submit); fetch_from_ideahub is left to PR ChicagoHAI#147.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@Chenxi1818 Chenxi1818 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It works on my end using the idea submitted on IdeaHub.

Image

@Chenxi1818
Chenxi1818 self-requested a review July 30, 2026 22:00

@Chenxi1818 Chenxi1818 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you :)

@AndrewRqy
AndrewRqy merged commit 4bd1880 into ChicagoHAI:main Jul 30, 2026
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.

2 participants