Repository navigation
feat(ci-respond): a model's summary of a refused wave (#5335) - #5365
Merged
Merged
Conversation
lex00
enabled auto-merge
November 20, 2026 02:52
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 20, 2026
lex00
force-pushed
the
feat/5335-wave-refused-summary
branch
from
November 20, 2026 08:53
e04ed2c to
b7ccbdd
Compare
lex00
enabled auto-merge
November 20, 2026 08:53
78 of 84 tasks
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.
Closes #5335
respond.wave-refusedtakes a third value,summary. It posts the notediffposts today with a model's summary above it. The default staysdiff, so the summary runs only where a product setssummary.What it does
CI_RESPONSES["wave-refused"]isdiff,summary,off.--respond wave-refused=summary,CHANT_RESPONDand an op waves spec'srespondall take it.summarizeRefusedWave(packages/core/src/ci-respond-summary.ts) runs one command the same way the review agent does. The prompt goes in on stdin and the summary comes back on stdout. The command's environment holds the model's key and process basics. The default command is the review command with--output-format json, so the cost is read from Claude Code's result. The prompt uses the product's words (product, noun, plan and apply verbs) and quotes the diff as data.respondPrApplyandrespondOpWavepost one note per event and place, under the same marker as before, with the summary above the diff. When the summary cannot run or its command fails, the note is the diff alone, headedThe summary was skipped: <reason>.The reason names the cause: a missing key variable, for one.agentRunRecordInput) under op<product>-refused-wave, triggerrefused-wave(terragucci's op and trigger words, so its audit file keeps reading the same lines), resultsummarizedorfailed, withpromptDigestandusage(model, tokens, USD).AgentResultgainssummarized.maxRunsandmaxCostUsdper day, checked withoverLimiton those records before the command runs. A run past a limit runs nothing and records nothing.WAVE_REFUSED_SUMMARY_FLOOR(=NEXT_RELEASE) is exported from@intentius/chant/ci-productand@intentius/chant/ci-respond-summary, with the floor table regenerated.Product words
respond.wave-refuseddiff,summary,offCiResponses["wave-refused"]agent.wave-refused.commandCHANT_WAVE_SUMMARY_COMMANDagent.wave-refused.key_secretCHANT_WAVE_SUMMARY_KEY_ENVagent.wave-refused.timeoutCHANT_WAVE_SUMMARY_TIMEOUTagent.wave-refused.max_runsCHANT_WAVE_SUMMARY_MAX_RUNSagent.wave-refused.max_cost_usdCHANT_WAVE_SUMMARY_MAX_COST_USDThe new keys are in the Stage keys table of the product config page and in
PRODUCT_CONFIG_WORDSwith sectionstage.Generated jobs
A product hands the
agent.wave-refused.*settings to chant aswaveSummaryon its op waves spec or its pull request loop options (productPipelineJobspasses them on to the waves spec). Whenrespond["wave-refused"]issummary, chant's generated jobs carry them:CHANT_WAVE_SUMMARY_*and the model's key as<KEY>: ${{ secrets.<KEY> }}.CHANT_WAVE_SUMMARY_*, naming the key's variable. The key is the CI/CD variable of that name, which every GitLab job already has.With
difforoffthe jobs carry none of this, and the render tests compare the rendered files byte for byte with and withoutwaveSummary. The existing default goldens are unchanged.opWavesSummaryEnv(@intentius/chant/op/op-waves) andwaveSummaryJobEnvhold the rule in one place, andassertOpWavesSpeccheckswaveSummary.Tests
lexicons/{github,gitlab,forgejo}/src/components/generate-wave-summary.test.tsrender both pipelines in each forge withsummary,diffandoff.packages/core/src/ci-respond-summary.test.tsdrives the summary through a fake command, ledger and forge. It covers the settings and the prompt. The run record's digest and cost are checked too. It checks that each limit and each failure leaves the diff alone with its reason, and that an op wave refusal posts one note with the summary above the diff.