Repository navigation
ci(sonar): reduce SONAR_TOKEN expiry risk with monthly runs - #106
Conversation
SonarCloud deletes a token that goes 60 days without being used, and nothing guaranteed this one was used that often: the analysis runs on pushes to main and on pull requests from this repository, and Dependabot pull requests run without the secret. The analysis of 2026-08-12 was the last until 2026-10-31; by then the token was gone, and the next pull request failed at `begin` with "Authentication with the server has failed", for a reason it had nothing to do with. A scheduled run on the 3rd of each month keeps the longest gap at about 31 days, well inside the 60. It analyses main, which the job's `if` already admits since only pull_request events are filtered. Verified: actionlint 1.7.7, the version and checksum ci.yml pins, reports nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019k6GsUrFe92DSgN3opCj6g
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. |
Reefact
left a comment
There was a problem hiding this comment.
Review finding on scheduled workflow reliability.
In a public repository GitHub disables a scheduled trigger after 60 days without repository activity, and a scheduled run is not activity. So in a repository that stays quiet, the schedule stops around day 60 and the token still lapses, between day 90 and day 120 rather than at day 60. The comment claimed the gap stayed well inside the 60 days, which only holds while the repository sees activity. The comment now says the schedule widens the margin and does not guarantee it, gives the recovery steps (re-enable the workflow, store a new SONAR_TOKEN, re-run), and notes that keeping the trigger enabled automatically would need a job holding `actions: write`. Verified: actionlint 1.7.7 reports nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019k6GsUrFe92DSgN3opCj6g
Reefact
left a comment
There was a problem hiding this comment.
issue (blocking): PR title still promises a guarantee
The title,
ci(sonar): run monthly so SONAR_TOKEN is never left unused, still claims the token can never become unused. The revised description and workflow comment correctly explain that GitHub can disable scheduled runs after 60 days without repository activity, so the token can still expire. Please change the title to something accurate, such as ci(sonar): reduce SONAR_TOKEN expiry risk with monthly runs. This is a contract/accuracy issue, not a wording preference.
|
done: retitled to 'reduce SONAR_TOKEN expiry risk with monthly runs' Answers issue (blocking): PR title still promises a guarantee. The finding is a review body, which has no thread to reply in, so the answer is here. The title is now One place still carries the old claim: the header of commit Generated by Claude Code |
|
reviewed: the monthly Sonar schedule's limitations are now accurately documented Verified the corrected PR title, description and This closes my review; it is not an approval. |
Summary
Adds a monthly scheduled run to
sonar.yml. SonarCloud deletes a token that goes 60 days without being used, and nothing guaranteed this one was used that often. That is what broke Sonar on #105. The schedule widens the margin but is not a guarantee: GitHub disables scheduled triggers in a public repository after 60 days without activity.Type of change
Changes
sonar.ymlgainsschedule: cron '41 4 3 * *', which runs on the 3rd of each month at 04:41 UTC and analysesmain. While the repository sees any activity, the longest gap between two analyses is about 31 days.actions: write.ifalready admits scheduled runs, since it filters onlypull_requestevents from forks. Nothing else changes.Testing
ci.ymlpins: nothing to reporttools/commit-lint/lint-commit-message.shon both commit messages: passesdotnet build -c Release/dotnet test -c Release: not run, no code changedtests/PackageSmokeTest/run.sh: not run, packaging untouchedThe scheduled trigger itself cannot run before it reaches
main. After merge, aworkflow_dispatchrun exercises the same job, and the first scheduled run is due on the 3rd.Public API
Documentation
🤖 Generated with Claude Code
https://claude.ai/code/session_019k6GsUrFe92DSgN3opCj6g