Repository navigation
Closed
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/reposThe devops repos commands and worktreessource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Description
Problem
On 2026-11-23 the drift Job (CronJob repos-drift, #6783) reported row 2 (Repository) of dan-petty/devops-cli as pending, with each key of the baseline: allow_squash_merge, allow_merge_commit, allow_rebase_merge, squash_merge_commit_title, squash_merge_commit_message, allow_auto_merge, allow_update_branch, delete_branch_on_merge.
- The same GET with the login of the owner gives
true false false PR_TITLE PR_BODY true true true, which is equal to the baseline. So the report is false. - The Job uses an App installation token that asks for read permissions only (
CONST_GITHUB_APP_READ_TOKEN_PERMISSIONS). GitHub does not give these fields to that token, and row 2 counts a missing field as a difference. The PR comment of feat(repos): report the drift of onboarded repositories nightly #6816 named this risk as not verified. - So
RepositorySettingsDriftfires each night for devops-cli, and row 2 can hide or invent drift in each repository.
Proposed remedy
- A field that the reply does not hold is unknown, not different: row 2 reports it as not readable (with the reason), not as pending.
- Find the permission that gives the merge fields to an App token (GitHub documentation or one probe), and if a read permission gives them, ask for it.
Acceptance criteria
- A test: a repository reply with no merge fields gives row 2
not readable, and no pending key. - A test: a reply with the fields equal to the baseline gives
present.
Dependencies
Metadata
Metadata
Assignees
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/reposThe devops repos commands and worktreessource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 23, 2026
Both work on the nightly drift job, but #6783 delivers the job and the candidate fixes a false-positive defect in its field comparison.devops-cli-service commentedon Nov 23, 2026
Released in v0.201.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.201.2
devops-cli-service commentedon Nov 23, 2026
Live since 2026-11-23 14:01 UTC
dan-petty commentedon Nov 23, 2026
Owner decision of 2026-11-23: the token of the drift Job (CronJob
repos-drift) also asks for Contents write and Administration write, so rows 2 and 10 read the merge settings and the bypass actors each night. GitHub returns those fields only with these write permissions ("Get a repository", "Get a repository ruleset"). The pod already holds the App key, which can mint a write token, so the read-only request only guarded against a code bug; plan mode still sends GET requests only, and the route-ownership test pins that. PR #6878 carries this change with the fix of this issue.