GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — ci: check declared repository settings against live GitHub by devantler · Pull Request #140 · devantler-tech/.github Conversation
Contributor
WhyThe org's GitHub settings are declared in
Running this check for the first time found a real one nobody knew about: World at Ruin still WhatA daily read-only check that compares every declared repository setting against the live repository It refuses to report "all clear" when it could not actually establish that: a truncated read, an Expect it to be red until the three known divergences are fixed. That is the check working, not Part of #123
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsA Repository managed resource only issues an update PATCH when it has a pending diff, so one that writes nothing - because it is Observe-only, or because GitHub rejects its writes - reports Synced=ReconcileSuccess indefinitely while its declaration is never applied. Cluster state cannot tell that apart from a declaration that landed. check-repository-drift.sh compares the two ends directly: every forProvider field of every declared Repository against the live repository object. It is read-only, and fails closed on a collapsed render, unreadable live state, or a declared field it cannot map onto the REST object - each of which would otherwise report agreement it never established. Part of #123
Closed
3 tasks
The drift case only asserted that the diverging repository appeared, which a check that flagged every repository would also satisfy; it now pins exactly one finding. The unmapped abort now names the declared field alongside the mapped one, so a mapping bug says which side is wrong.
Closed
4 tasks
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
✅ Action performedReview finished.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Warning Review limit reached
Next review available in: 33 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a read-only Bash checker that compares declared repository settings with live GitHub data or offline fixtures. Adds fixture-based tests for drift detection, field mapping, topic ordering, and fail-closed errors. Runs these tests in CI. Adds a scheduled and manually triggerable workflow for live checks. Updates contributor guidance for drift reports. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/repository-drift-check.yaml:
- Around line 29-38: Add the github.repository_owner value to the app-token
step’s configuration so the installation token covers all repositories managed
by that owner, while leaving repositories unspecified and preserving
permission-metadata: read.
In `@scripts/check-repository-drift.sh`:
- Around line 58-61: Update the Repository transformation in the yq expression
to set repo from metadata.annotations["crossplane.io/external-name"], falling
back to metadata.name when the annotation is absent. Preserve the existing
declared payload and add a fixture covering a Repository whose resource name
differs from its external name.
- Around line 107-108: Update the topics normalization expressions in the
repository drift comparison to apply unique after sorting to both $want and
$got, so duplicate topics are compared as a set while preserving current
handling for other keys. Add a fixture covering duplicate topics on either side
with equivalent unique values and verify it does not report drift.
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 020d4577-2af4-4ebf-b85e-bb12c6065067
.github/workflows/ci.yaml.github/workflows/repository-drift-check.yamlAGENTS.mdscripts/check-repository-drift.shtests/repository-drift.sh📄 CodeRabbit inference engine (CLAUDE.md)
Follow the instructions defined in
AGENTS.md.Keep this
AGENTS.mdsynchronized with the actualdeploy/layout and shared engineering contract; do not add a redundant.github/copilot-instructions.md.
Files:
AGENTS.md📄 CodeRabbit inference engine (GEMINI.md)
Follow the coding guidelines and instructions defined in
AGENTS.md.
Files:
AGENTS.md📄 CodeRabbit inference engine (AGENTS.md)
Before every PR, run the seven baseline checks:
admin-team-policy.sh,declarative-coverage.sh,declarative-coverage-fail-closed.sh,repository-update-policy.sh,release-contract.sh, andrepository-drift.sh, in addition to the Kustomize build.
Files:
tests/repository-drift.shLearnt from: CR
Repo: devantler-tech/.github
Timestamp: 2026-08-07T10:17:15.615Z
Learning: Use GitHub Issues as the roadmap of record, triage incoming issues into the roadmap/epic structure, and have implementing pull requests use `Fixes `#N``.
.github/workflows/ci.yaml (1)
59-64: LGTM!.github/workflows/repository-drift-check.yaml (1)
1-28: LGTM!Also applies to: 40-48
AGENTS.md (1)
99-102: LGTM!Also applies to: 116-121
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
… set Three findings from review, all real: The App token defaults to the workflow's own repository, so the check would have aborted on the first repository it read - the scheduled run could never have succeeded. crossplane.io/external-name is what identifies a repository on GitHub and is not always the resource name; keying on the resource name reads the wrong repository, or none. Drift now reports the repository and, when they differ, the resource that declares it. Sorting topics ignores order but keeps duplicates, so a repeated declared topic produced drift that no change to the repository could close. Part of #123
There was an error while loading. Please reload this page.
Widening the token to the owner fixed the read but tripped zizmor's github-app audit: with no repository list it grants access to every repository in the installation. Both concerns are satisfied by deriving the list from deploy/ before minting the token, so the token reaches exactly the repositories the check reads. Hand-maintaining that list here would add a second declaration that can go stale without anything noticing - the failure mode this workflow exists to catch. Part of #123
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
CodeRabbit refused this head: its acknowledgement of the 10:31:12Z request carries @codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Codex refused this head as well: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7011f8db-7129-4381-af32-88e732c560e5) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This repository is public, so the drift check's output lands in a public Actions log. A finding on the org's private repository would have printed its description, homepage or topics there. A finding on a private repository now names the field and prints neither value; public repositories are unchanged, because the values are what make a finding actionable. Live state carrying no visibility flag aborts rather than guessing which of the two applies. Part of #123
New head @coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
CodeRabbit refused head @codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Codex refused head |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ab9cd46a-6f55-4c78-ac98-ebffec0ab02a) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🤖 Generated by the Agentic Engineer
Reviewed commit: 3c2f946548ce8efb84d61368222c8e0ea1d86c5d
Each lane was requested at this exact head and each declined:
| Lane | Outcome at 3c2f946 |
When |
|---|---|---|
| CodeRabbit | ack carried ⚠️ Action not completed / Review rate limited, naming this head, no retry window |
10:43:20Z |
| Codex | You have reached your Codex usage limits for code reviews |
10:43:53Z |
| Cursor Bugbot | check-run neutral / output.title: Error — Bugbot run failed, preceded by usage limit reached |
10:44:21Z |
All three are provider quota states rather than verdicts on this change, so the local round applies.
Correctness. The comparison is exercised in both directions against hand-written fixtures, and each assertion was confirmed decisive by ablating the behaviour it targets and watching it fail: reverting external-name resolution, reverting unique to sort, dropping the declaring-resource hint, inverting the redaction, removing the render floor, tolerating an absent private flag, and making the comparison always agree — seven ablations, seven caught. The check was also run against live GitHub, where it found a real divergence nobody had recorded (#141).
Fail-closed behaviour. Four paths refuse to report agreement they did not establish: a collapsed render, unreadable live state, live state whose visibility cannot be determined, and a declared field with no counterpart on the live object. The last matters most — silently skipping an unmappable field would leave a whole class of settings unchecked while the run still exited 0.
Security. The workflow's token is metadata-only and scoped to exactly the repositories named by deploy/, derived from that file rather than duplicated into the workflow. persist-credentials: false on checkout; the token is exposed to the one step that needs it. zizmor is clean on the workflow. The check performs no writes, so it cannot fight the reconciler.
One finding I raised against myself during this round and fixed before posting: this repository is public, so its Actions logs are public, and a finding on the org's private repository would have printed its description, homepage or topics into them. A private repository's findings now name the field and withhold both values.
Repo conventions. bash, no Python. Generated output is not hand-edited. Docs updated in the same change (AGENTS.md validate list and watch-list). The offline fixture test is wired into ci.yaml; the live check runs on a schedule so it never gates a PR on org state no PR controls.
Verdict: no P0/P1 findings.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Exercised as a user, at Judged as the person who would be paged by it: the output names the repository and the field, the exit code is usable as a gate, and the finding was actionable without further digging — the The clean path was exercised too: on fixtures where declared and live agree it prints The workflow itself cannot be dispatched until it is on the default branch. What I could verify locally I did: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.