Repository navigation
feat(code-tidying): add upkeep settings, cap and per-merge detection - #12614
Conversation
…batch gate Settings upkeep_cadence, upkeep_backstop and upkeep_max_open live in <home>/code-tidying.yaml and resolve through one reader. The tidy throttle takes its limit from upkeep_max_open. A push job names the areas each merge changed. upkeep.mjs gate plans the daily batch from git log, the open tidy PR count and earlier ad hoc sweeps; no workflow runs it yet. Refs: #12475 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn
…'s edge A listing of 1000 pull requests here reaches back about three days, so a limit-based read stopped every run short of the weekly window. The gate now pages newest first until it passes the window, and reads open pull requests separately so an old open sweep still counts. Refs: #12475 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn
An area nobody changed is never eligible, since 108 areas cannot fit the sweeps a cap of 3 allows in a week. An area is overdue once its oldest unswept commit passes the backstop window, and overdue areas go first. The gate reads commits and pull requests back twice the window. Refs: #12475 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c5199564c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #12614, incremental from
|
|
claude-review reviewed Incremental code review: PR #12614 (
|
…n in view A squash-merged sweep's own commit no longer counts as churn in its area. The gate reads every sweep by branch prefix and reads commits back to the oldest sweep, at least 90 days, so overdue churn no longer leaves a fixed window. A sweep list at the listing limit stops the batch with a reason. The throttle test clears the inherited git environment. Refs: #12475 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn
The sweep search returns at most 1000 results, so stopping on a full list would have stopped the gate for good within a year. The oldest listed sweep is the lookback floor instead, and an area the list has lost is still judged correctly. Refs: #12475 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn
…de-tidying-upkeep (#945) Refs: melodic-software/claude-code-plugins#12475 ## Summary claude-code-plugins is adding the lane `maintenance-code-tidying-upkeep`. Its `resolve-config` rejects a lane not named `<stage>-<function>` from this vocabulary, and the `maintenance` stage lists no matching function. ## Fix `vocabulary.json`: reserves the `maintenance` function `code-tidying-upkeep`, with its purpose. Nothing else changes. ## Verification - Same one-file shape as #909 and #791. CI runs this repository's vocabulary checks. - Left out: nothing local beyond the JSON edit; the lane PR in claude-code-plugins exercises the synced copy. ## Related - melodic-software/claude-code-plugins#12614 and the batch branch `feat/12475-upkeep-daily-batch`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn <!-- codesmith:footer --> --- <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796269708&installation_model_id=447774&pr_number=945&ref=codesmith_pr_footer&repository=melodic-software%2Fstandards&return_to=https%3A%2F%2Fgithub.com%2Fmelodic-software%2Fstandards%2Fpull%2F945&signature=7a3a45e029d6685e2e9baeab759eab0d88119c27c0069899b1c719244646ed64"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"></picture></a> <sup><a href="https://app.blacksmith.sh/melodic-software/codesmith/standards/pr/945?autoLogin=true&ref=codesmith_pr_footer">Open in [code]smith</a> · Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
Refs: #12475
session: lane-2
Summary
Part of #12475: the upkeep settings, the open-PR cap, per-merge detection and the plan a daily batch runs from. Detection opens no PR and runs no model, as decision Q110 asks ("per-merge is detection only"). No upkeep PR opens until the daily model job lands; see Remaining.
Fix
upkeep_cadence,upkeep_backstopandupkeep_max_open(defaultsdaily,weekly, 3) indocs/conventions/code-tidying.yaml, with a schema,reference/config.mdand one reader,upkeep-setting.sh./code-tidying:tidy's existing throttle now takes its limit fromupkeep_max_open, so there is one cap.maintenance-code-tidying-upkeep.ymlruns on each push to main and names the changed areas in the job summary, withcontents: readonly. The gate derives churn fromgit log, so a lost push run drops no area.upkeep.mjs gatehonors cadence and the cap and opens only the difference. Only an area changed since its last sweep is eligible; overdue ones go first.Choices made on evidence:
areaOfovergit ls-files; the sweep figure is judgment).git logis the durable record, not an artifact. Basis:dependabot-fragments.yml:22-24records that push runs can be lost.Verification
open-pr-counttest: 21 checks pass.scripts/check-affected.sh: "14 passed, 1 skipped over 20 changed files" (ruff: no changed.py). The 17 nearest suites andcallers.test.mjspass.--testsrun. It selects 364 suites and was stopped at 14 of 224 after 25 minutes at--jobs 1; CI runs them.Remaining
scheduleruns only frompr-merge.yml,work-unblock.ymlandupstream-apply-changelog.yml(docs/conventions/pr-pipeline/pr-run-activity.md), so how it gets a token is an owner decision..github/lane-funding.jsonentry; and the kill-switch read before the model step.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Pzf47aw4gsMAyk98Wn