fix(ci): drop unused pull-requests scope from kilo-app CI - #4821
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by claude-sonnet-5 · Input: 14 · Output: 2.2K · Cached: 244.6K Review guidance: REVIEW.md from base branch |
pandemicsyn
approved these changes
Jul 28, 2026
iscekic
enabled auto-merge (squash)
July 28, 2026 18:09
# Conflicts: # .kilo_workflow/dispatch-role.sh
This was referenced Jul 29, 2026
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
What: one-line fix — delete
pull-requests: readfrom thepermissions:block of.github/workflows/kilo-app-ci.yml.Why: the scheduled
kilo-app Releaseworkflow has been failing withstartup_failure(zerojobs, run never starts) since #4695 — e.g. scheduled run
30336828117. Root cause: a called
reusable workflow may only downgrade the caller-granted
GITHUB_TOKENscopes, never elevatethem. The caller
kilo-app-release.ymldeclarespermissions: contents: writeand nothing else(every other scope is implicitly
none), while the calledkilo-app-ci.ymlrequestedcontents: readpluspull-requests: read. GitHub rejects the run at workflow-validationtime.
How:
pull-requests: readis used by nothing inkilo-app-ci.yml(no job referencesGITHUB_TOKEN,github.token,gh, orsecrets.*— the jobs are purecheckout + pnpm + typecheck/lint/format/check-unused/test). Dropping the unused scope from the
callee is the least-privilege resolution: the alternative — granting
pull-requests: readin therelease caller — would hand an unused scope to the workflow that pushes release tags and drives
App Store submission. The workflow's own
push/pull_requesttriggers are unaffected(
contents: readstays, and the jobs use no token at all).Also in this PR, as a separate commit: a workflow-tooling repair to
.kilo_workflow/dispatch-role.sh(tmux window target now<session>:— prefix-matching againstwindow names broke every role dispatch from a session named after the section) plus its committed
learning. Unrelated to the defect; discovered mid-run and shipped per the workflow's self-fix
rule.
Possible follow-up (not this PR): the release workflow's
validatejob runs on every scheduledinvocation even when
check-changesdecidesshould_build=false, so a no-change night stillburns five CI jobs.
Verification
kilo-app-release.ymlon athrowaway branch at the broken head produced run
30356820904 —
startup_failure,0 jobs, ~1s, "This run likely failed because of a workflow file issue" — the exact signature of
the scheduled failure (branch deleted after the repro).
workflow_dispatchofkilo-app-release.ymlat headc559d6fdeproduced run30361039476 —
conclusion: success, 7 jobs.check-changessucceeded and emittedshould_build=true(232changed
apps/mobile/**paths since the last release tag); all fivevalidate / *jobs(typecheck, lint, format-check, check-unused, test) ran green;
build-and-submitwasskipped — with
should_build=trueon a non-main ref, the skip is attributable solely to thegithub.ref == 'refs/heads/main'guard, proving it intact.kilo-app CIon its own triggers: covered by this PR's ownpull_requestrun (the PRtouches
.github/workflows/kilo-app-ci.yml, which is in that workflow's paths filter).verification.
Visual Changes
N/A
Reviewer Notes
The entire defect fix is the single deleted line in
kilo-app-ci.yml. The second commit(
.kilo_workflow/) is intentional workflow tooling, recorded as a binding decision in the run'splan — please don't read it as scope creep.