fix(reports): honour reports.enabled and reports.period, drop the key nothing could read - #1429
Merged
Merged
Conversation
β¦ nothing could read Of the six keys under `reports`, three reached the command β `prompt`, `title` and `labels` β and three did not. `enabled` was documented "Generate reports (default: false)" and read by nothing. The generated workflow ran `buddy report --publish` every week regardless, so the documented default was the opposite of the behaviour: a repository that never opted in got a report issue anyway, and one that set `enabled: false` got the same. It cannot be enforced in the workflow, because a cron trigger has no way to read the config. So the workflow now passes `--scheduled`, and the command declines to publish on a scheduled run unless `enabled` is `true`. A person typing `buddy report --publish` at a terminal is not second-guessed β they have already decided, and the setting exists to govern the run nobody typed. `period` fell back straight to `'30d'`, so the config's value was never consulted; the flag wins, then config, then the default. `schedule` is removed rather than wired. It was declared as "cron expression for the scheduled run", and no production path could ever have honoured it: `buddy setup` writes the config *and* the workflow in the same run, from a preset rather than from a config that does not exist yet, and `generate-workflows` does not write `buddy.yml` at all. A key that no generator reads is a promise the docs cannot keep. The cadence lives in the workflow's `schedule:` block, as the presets documentation already says, and `enabled`'s docstring now says so too. Nothing validates `reports`, so an existing config carrying the key keeps loading; it simply never did anything. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWouahBJT3msK7V2VDYY6T
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.
Of the six keys under
reports, three reached the command βprompt,title,labelsβ and three did not.enabledβ the documented default was the opposite of the behaviourDocumented "Generate reports (default: false)". Read by nothing. The generated workflow ran
buddy report --publishevery week regardless, so a repository that never opted in got a report issue anyway, and one that setenabled: falsegot the same.It can't be enforced in the workflow: a cron trigger has no way to read the config. So the workflow now passes
--scheduled, and the command declines to publish on a scheduled run unlessenabledistrue:A person typing
buddy report --publishby hand is not second-guessed β they've already decided. The setting governs the run nobody typed.periodβ never consultedNow flag β config β default.
scheduleβ removed rather than wiredDeclared as "cron expression for the scheduled run". No production path could ever have honoured it:
buddy setupwrites the config and the workflow in the same run, from a preset rather than from a config that doesn't exist yet, andgenerate-workflowsdoesn't writebuddy.ymlat all.A key that no generator reads is a promise the docs can't keep. The cadence lives in the workflow's
schedule:block β which the presets docs already say β andenabled's docstring now says so too.Nothing validates
reports, so an existing config carrying the key keeps loading. It just never did anything.If you'd rather have it work, the honest design is
buddy generate-workflowsregeneratingbuddy.ymlfrom the resolved config. That's a feature, not a wire β flagging rather than building it.Tests
2143 β 2148.
Lint β Β· typecheck β Β·
check:docsβ Β· 0 failπ€ Generated with Claude Code
https://claude.ai/code/session_01UWouahBJT3msK7V2VDYY6T