feat(daily-regen): default to Haiku, add spec_id + model inputs#5706
Merged
Conversation
Thread a `model` parameter (haiku / sonnet / opus) through the entire regen chain — daily-regen → bulk-generate → impl-generate → impl-review → impl-repair — so a manual run can pick the model used by every Claude step. Daily-regen also accepts an optional `specification_id` to target a specific spec instead of the oldest one, mirroring `/regen <spec-id>`. - daily-regen: new `specification_id` and `model` inputs (model default haiku); validates the override spec, passes model to bulk-generate. - bulk-generate: new `model` input forwarded into impl-generate. - impl-generate: new `model` input drives `claude_args`, the `generated_by` metadata field, and the auto-retry. Model is forwarded to impl-review via `client_payload[model]`. - impl-review: reads model from input or `client_payload`, uses it in `claude_args`, propagates it on auto-retries and into impl-repair. - impl-repair: new `model` input drives `claude_args` and is threaded back into impl-review on re-trigger and into the auto-retry path. Default for impl-* workflows stays `sonnet` so existing label-driven flows are unaffected.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the regen pipeline’s Claude model configurable end-to-end, defaulting scheduled daily-regen runs to Haiku for lower-cost cron executions while keeping existing label/manual flows on Sonnet by default.
Changes:
- Added a
modelinput (haiku/sonnet/opus) and threaded it throughbulk-generate → impl-generate → impl-review → impl-repair(including repository_dispatch retriggers). - Added
daily-regenspecification_idoverride (validated againstplots/{id}/specification.md) and madedaily-regendefault to Haiku. - Updated impl metadata generation to record
generated_by: claude-{model}instead of a hard-codedclaude-sonnet.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/daily-regen.yml | Adds specification_id + model inputs; defaults scheduled runs to Haiku; dispatches bulk-generate with selected model. |
| .github/workflows/bulk-generate.yml | Adds model input and forwards it into impl-generate.yml dispatches. |
| .github/workflows/impl-generate.yml | Adds model input, uses it for claude_args, propagates via repository_dispatch, and writes generated_by accordingly. |
| .github/workflows/impl-review.yml | Adds model input, resolves model from inputs/payload, uses it for review and forwards it into auto-retries and repair dispatch. |
| .github/workflows/impl-repair.yml | Adds model input, uses it for repair claude_args, and threads it back into impl-review retriggers. |
|
|
||
| # Resolve model: explicit input > repository_dispatch payload > default sonnet | ||
| MODEL="${MODEL_INPUT:-${MODEL_PAYLOAD:-sonnet}}" | ||
|
|
Comment on lines
204
to
210
| LIBRARY: ${{ steps.pr.outputs.library }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| RUN_ID: ${{ github.run_id }} | ||
| MODEL: ${{ steps.pr.outputs.model }} | ||
| run: | | ||
| echo "::error::AI Review did not produce valid output files (score=0)" | ||
|
|
Comment on lines
516
to
522
| LIBRARY: ${{ steps.pr.outputs.library }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| RUN_ID: ${{ github.run_id }} | ||
| MODEL: ${{ steps.pr.outputs.model }} | ||
| run: | | ||
| MARKER="<!-- review-retry:${SPEC_ID}:${LIBRARY} -->" | ||
| # Paginate so the marker is found even on PRs with >30 comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
daily-regen.ymlconfigurable for manual runs and default the scheduled cadence to Haiku for cheaper cron ticks. The model choice now threads through every Claude step in the regen chain.New
daily-regeninputsspecification_id— optional. When set, regen targets that spec instead of the oldest one (mirrors/regen <spec-id>fromregen.md). Validated againstplots/{id}/specification.md.model— choice ofhaiku/sonnet/opus. Default:haiku(so the schedule defaults to Haiku too).countis now ignored whenspecification_idis set.Model threading
The selected model is forwarded all the way through:
bulk-generate.yml: newmodelinput passed toimpl-generate.yml.impl-generate.yml:modelinput drivesclaude_args, thegenerated_bymetadata field (claude-{model}instead of hard-codedclaude-sonnet), and the auto-retry on failure. Forwarded intoimpl-reviewviaclient_payload[model].impl-review.yml: reads model frominputs.modelorclient_payload.model, uses it inclaude_args, propagates it through review auto-retries and into theimpl-repairdispatch.impl-repair.yml:modelinput drivesclaude_args, threaded back intoimpl-reviewon re-trigger and into its own auto-retry path.Backwards compatibility
The new
modelinput on each impl-* workflow defaults tosonnet, so existing label-driven and manual flows continue to behave exactly as before. Onlydaily-regendefaults tohaiku.Test plan
workflow_dispatchofdaily-regenwith no inputs → picks oldest spec, runs all libs on Haiku end-to-end (PR labels showquality:N,ai-approved/ai-rejected, metadatagenerated_by: claude-haiku).specification_id=<existing-spec>andmodel=opus→ regenerates only that spec, every step runs on Opus, metadatagenerated_by: claude-opus.specification_id→ fails fast with clear error.generate:matplotlib) → still uses Sonnet (unchanged behavior).https://claude.ai/code/session_01YaZndtFg2hBrm6Ag2Du7Xo
Generated by Claude Code