Skip to content

feat(teams): activate declarative Admins policy#103

Merged
devantler merged 2 commits into
mainfrom
codex/admins-activation-102
Jul 17, 2026
Merged

feat(teams): activate declarative Admins policy#103
devantler merged 2 commits into
mainfrom
codex/admins-activation-102

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Engineer (Codex sibling instance)

Summary

  • activate the reviewed declarative Admins team and maintainer membership
  • grant that team admin on all 20 active portfolio repositories, including kyverno-policies
  • replace the temporary disabled-state fixture with production-render regression coverage
  • update the policy documentation and workflow wording for the active state

Safety

  • leaves every existing Maintainers grant unchanged at maintain
  • omits Delete management and external-name adoption from every Admins resource
  • excludes archived reusable-workflows
  • makes no imperative GitHub-configuration writes

The policy was defined and tested in both disabled and enabled states by #95 / #96. This issue-backed slice switches the already-reviewed resources into the production Kustomizations. Post-release Flux reconciliation and the next maintenance audit remain the measurement checkpoint on #53.

Validation

  • bash tests/admin-team-policy.sh
  • kubectl kustomize deploy/ > /dev/null
  • shellcheck tests/admin-team-policy.sh
  • actionlint .github/workflows/ci.yaml
  • bash -n tests/admin-team-policy.sh
  • git diff --check

Fixes #102
Part of #53

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer (Codex sibling instance)

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 550fce4b3c

ℹ️ 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".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer (Codex sibling instance)

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

@devantler I'll review the PR now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 68c039da-e6e3-497f-9062-c1456c7452f2

📥 Commits

Reviewing files that changed from the base of the PR and between d1d2725 and 59c46f6.

📒 Files selected for processing (30)
  • .github/workflows/ci.yaml
  • AGENTS.md
  • deploy/README.md
  • deploy/team-memberships/add-devantler-to-admins.yaml
  • deploy/team-memberships/kustomization.yaml
  • deploy/team-repositories/grant-admins-on-actions.yaml
  • deploy/team-repositories/grant-admins-on-agent-plugins.yaml
  • deploy/team-repositories/grant-admins-on-agent-skills.yaml
  • deploy/team-repositories/grant-admins-on-ascoachingogvaner.yaml
  • deploy/team-repositories/grant-admins-on-aws.yaml
  • deploy/team-repositories/grant-admins-on-dot-github.yaml
  • deploy/team-repositories/grant-admins-on-dotnet-template.yaml
  • deploy/team-repositories/grant-admins-on-fleet-gitops.yaml
  • deploy/team-repositories/grant-admins-on-gitops-tenant-template.yaml
  • deploy/team-repositories/grant-admins-on-go-template.yaml
  • deploy/team-repositories/grant-admins-on-homebrew-tap.yaml
  • deploy/team-repositories/grant-admins-on-ksail.yaml
  • deploy/team-repositories/grant-admins-on-kyverno-policies.yaml
  • deploy/team-repositories/grant-admins-on-maintenance.yaml
  • deploy/team-repositories/grant-admins-on-monorepo.yaml
  • deploy/team-repositories/grant-admins-on-platform-template.yaml
  • deploy/team-repositories/grant-admins-on-platform.yaml
  • deploy/team-repositories/grant-admins-on-provider-upjet-unifi.yaml
  • deploy/team-repositories/grant-admins-on-unifi.yaml
  • deploy/team-repositories/grant-admins-on-wedding-app.yaml
  • deploy/team-repositories/kustomization.yaml
  • deploy/teams/admins.yaml
  • deploy/teams/kustomization.yaml
  • tests/admin-team-policy.sh
  • tests/fixtures/admin-team-enabled/kustomization.yaml
💤 Files with no reviewable changes (1)
  • tests/fixtures/admin-team-enabled/kustomization.yaml
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (6)
deploy/**/*.{yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

deploy/**/*.{yaml,yml}: Manage GitHub organization, repository, team, and label configuration declaratively by editing deploy/ and shipping a PR; never make imperative writes through gh api or the GitHub UI.
Assign ownership and access to the maintainers team rather than individual users; model access through Team and TeamRepository resources.
When adopting an existing GitHub resource, set crossplane.io/external-name to its live name and use a management policy excluding Delete so adoption observes and late-initializes without recreating or deleting the resource.
Verify every new Crossplane resource's kind and field schema against the authoritative provider CRDs and generated examples; local schema validation is unavailable.
Before every PR, ensure kubectl kustomize deploy/ builds cleanly; this is the required validation check.

Files:

  • deploy/team-repositories/grant-admins-on-maintenance.yaml
  • deploy/team-repositories/grant-admins-on-platform-template.yaml
  • deploy/team-repositories/grant-admins-on-dot-github.yaml
  • deploy/team-memberships/kustomization.yaml
  • deploy/team-repositories/grant-admins-on-actions.yaml
  • deploy/team-repositories/grant-admins-on-fleet-gitops.yaml
  • deploy/team-repositories/grant-admins-on-wedding-app.yaml
  • deploy/team-repositories/grant-admins-on-agent-skills.yaml
  • deploy/team-repositories/grant-admins-on-ksail.yaml
  • deploy/team-repositories/grant-admins-on-go-template.yaml
  • deploy/team-repositories/grant-admins-on-dotnet-template.yaml
  • deploy/team-repositories/grant-admins-on-provider-upjet-unifi.yaml
  • deploy/team-repositories/grant-admins-on-agent-plugins.yaml
  • deploy/team-repositories/grant-admins-on-gitops-tenant-template.yaml
  • deploy/team-repositories/grant-admins-on-homebrew-tap.yaml
  • deploy/team-memberships/add-devantler-to-admins.yaml
  • deploy/team-repositories/grant-admins-on-unifi.yaml
  • deploy/team-repositories/grant-admins-on-monorepo.yaml
  • deploy/team-repositories/grant-admins-on-kyverno-policies.yaml
  • deploy/team-repositories/grant-admins-on-ascoachingogvaner.yaml
  • deploy/teams/kustomization.yaml
  • deploy/team-repositories/grant-admins-on-platform.yaml
  • deploy/team-repositories/grant-admins-on-aws.yaml
  • deploy/teams/admins.yaml
  • deploy/team-repositories/kustomization.yaml
deploy/team-repositories/*.yaml

📄 CodeRabbit inference engine (AGENTS.md)

Define team-to-repository permission grants in deploy/team-repositories/, rather than granting repository access to individual users.

Files:

  • deploy/team-repositories/grant-admins-on-maintenance.yaml
  • deploy/team-repositories/grant-admins-on-platform-template.yaml
  • deploy/team-repositories/grant-admins-on-dot-github.yaml
  • deploy/team-repositories/grant-admins-on-actions.yaml
  • deploy/team-repositories/grant-admins-on-fleet-gitops.yaml
  • deploy/team-repositories/grant-admins-on-wedding-app.yaml
  • deploy/team-repositories/grant-admins-on-agent-skills.yaml
  • deploy/team-repositories/grant-admins-on-ksail.yaml
  • deploy/team-repositories/grant-admins-on-go-template.yaml
  • deploy/team-repositories/grant-admins-on-dotnet-template.yaml
  • deploy/team-repositories/grant-admins-on-provider-upjet-unifi.yaml
  • deploy/team-repositories/grant-admins-on-agent-plugins.yaml
  • deploy/team-repositories/grant-admins-on-gitops-tenant-template.yaml
  • deploy/team-repositories/grant-admins-on-homebrew-tap.yaml
  • deploy/team-repositories/grant-admins-on-unifi.yaml
  • deploy/team-repositories/grant-admins-on-monorepo.yaml
  • deploy/team-repositories/grant-admins-on-kyverno-policies.yaml
  • deploy/team-repositories/grant-admins-on-ascoachingogvaner.yaml
  • deploy/team-repositories/grant-admins-on-platform.yaml
  • deploy/team-repositories/grant-admins-on-aws.yaml
  • deploy/team-repositories/kustomization.yaml
deploy/team-memberships/*.yaml

📄 CodeRabbit inference engine (AGENTS.md)

Define one explicit user-to-team membership per file.

Files:

  • deploy/team-memberships/kustomization.yaml
  • deploy/team-memberships/add-devantler-to-admins.yaml
deploy/teams/*.yaml

📄 CodeRabbit inference engine (AGENTS.md)

Store one Team resource per file, including the active Maintainers and Admins teams.

Files:

  • deploy/teams/kustomization.yaml
  • deploy/teams/admins.yaml
AGENTS.md

📄 CodeRabbit inference engine (CLAUDE.md)

Follow the instructions defined in AGENTS.md.

Keep AGENTS.md synchronized with the actual deploy/ layout and shared engineering contract; do not add a redundant .github/copilot-instructions.md.

Files:

  • AGENTS.md
**/AGENTS.md

📄 CodeRabbit inference engine (GEMINI.md)

Follow the coding guidelines and instructions defined in AGENTS.md.

Files:

  • AGENTS.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: devantler-tech/.github

Timestamp: 2026-07-17T10:28:06.082Z
Learning: Triage incoming work into the roadmap-of-record GitHub issue hierarchy, and have implementation PRs use `Fixes `#N``.
📚 Learning: 2026-07-10T14:42:56.622Z
Learnt from: devantler
Repo: devantler-tech/.github PR: 90
File: deploy/archived-repositories/kustomization.yaml:11-16
Timestamp: 2026-07-10T14:42:56.622Z
Learning: In this repo’s deployment setup, `deploy/` kustomize manifests are rendered unconditionally (no feature-flag/conditional-render/apply primitive) and Flux applies from `main`. For irreversible or ordering-sensitive rollouts in `deploy/` (e.g., changes under `deploy/archived-repositories/` that require prerequisites handled in separate PRs), reviewers should not expect a mechanical CI guard. Instead, require the PR to remain in draft until the required prerequisite one-click actions (e.g., org `required-workflow` ruleset repointing) are completed, with the required rollout ordering explicitly documented in the PR body (per the documented bold line). Only then should the PR be promoted/merged.

Applied to files:

  • deploy/team-memberships/kustomization.yaml
  • deploy/teams/kustomization.yaml
  • deploy/team-repositories/kustomization.yaml
🔇 Additional comments (30)
AGENTS.md (1)

62-64: LGTM!

deploy/README.md (2)

22-27: LGTM!


104-122: LGTM!

deploy/teams/admins.yaml (1)

1-2: LGTM!

deploy/teams/kustomization.yaml (1)

1-10: LGTM!

deploy/team-memberships/add-devantler-to-admins.yaml (1)

1-1: LGTM!

deploy/team-memberships/kustomization.yaml (1)

8-8: LGTM!

deploy/team-repositories/grant-admins-on-maintenance.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-monorepo.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-platform-template.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-platform.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-provider-upjet-unifi.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-kyverno-policies.yaml (1)

1-17: LGTM!

deploy/team-repositories/kustomization.yaml (1)

2-5: LGTM!

Also applies to: 25-46

deploy/team-repositories/grant-admins-on-actions.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-agent-plugins.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-agent-skills.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-unifi.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-wedding-app.yaml (1)

1-2: LGTM!

tests/admin-team-policy.sh (1)

6-10: LGTM!

Also applies to: 31-46, 62-62, 78-85

.github/workflows/ci.yaml (1)

32-32: LGTM!

deploy/team-repositories/grant-admins-on-ascoachingogvaner.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-aws.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-dot-github.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-dotnet-template.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-fleet-gitops.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-gitops-tenant-template.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-go-template.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-homebrew-tap.yaml (1)

1-2: LGTM!

deploy/team-repositories/grant-admins-on-ksail.yaml (1)

1-2: LGTM!


📝 Walkthrough

Walkthrough

The Admins policy is activated in production Kustomizations by adding the Admins team, its membership, and repository grants, including a new grant for kyverno-policies. The policy test now validates a single production render with updated counts and repository checks, and the obsolete enabled fixture is removed. Documentation, repository guidance, and the CI step label were updated to describe the active policy.

Possibly related issues

Possibly related PRs

  • devantler-tech/.github#78: Both changes register additional TeamRepository grant manifests in deploy/team-repositories/kustomization.yaml.
  • devantler-tech/.github#82: Both changes expand the repository grants registered by deploy/team-repositories/kustomization.yaml.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: activating the declarative Admins policy.
Description check ✅ Passed The description clearly matches the changeset, covering the Admins policy activation, repository grants, fixture replacement, and doc updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler
devantler marked this pull request as ready for review July 15, 2026 05:41
@devantler

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

🤖 Generated by the Daily AI Engineer

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

@devantler I'll review the PR now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

The current-head CodeRabbit request completed, but the supported pre-merge summary remains fail-closed on Docstring Coverage: 0.00% < 80%.

This PR adds declarative YAML, Markdown, one workflow update, and a flat shell policy test; a current-diff audit finds no added function declarations to document. All GitHub checks are green, threads and review-body findings are zero, exact-head Codex is clean, and CodeRabbit's Title, Description, Linked Issues, and Out of Scope Changes checks all pass.

This is a new zero-denominator form of the stale/invalid pre-merge evaluator tracked in #93. Applying the bounded-stop rule: no empty commit, override, or further reviewer command. The PR stays open and fail-closed until the supported gate reports the actual source state.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

Your only failed pre-merge check here is Docstring Coverage 0.00% — on a changeset of YAML manifests, a bash test and Markdown. This repo has no docstring-bearing production code, so the metric has nothing to measure and cannot be scoped per-path.

Filed the root-cause fix as #105 (makes that one check advisory; inheritance: true keeps all other org/UI settings). Mirrors devantler-tech/ksail#6145.

Once #105 lands, re-run CodeRabbit here and the pre-merge gate should clear. I have not touched this branch.

devantler added a commit that referenced this pull request Jul 16, 2026
This repository holds no docstring-bearing production code — it is declarative
org configuration, workflow templates, docs and one bash test script. CodeRabbit's
Docstring Coverage pre-merge check therefore reports 0.00% against an 80%
threshold and blocks merges on a documentation gap that does not exist.

It is currently the only failed pre-merge check on #103, whose changeset is YAML
manifests, a bash test and Markdown.

The metric cannot be scoped per-path (path_filters would drop the files from the
whole review, not just this check), so make it advisory instead of a merge error.
CodeRabbit still reports the coverage. inheritance: true keeps every org/UI
setting intact so this stays scoped to the one value.

Mirrors devantler-tech/ksail#6145.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

@devantler I’ll review the PR based on the current changes and available context.

Action performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 59c46f601b

ℹ️ 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".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@devantler I’ll review the current changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@devantler I’ll review the current changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer (Codex instance)

The advertised CodeRabbit cooldown has elapsed and the exact head remains unchanged with ordinary CI green and zero unresolved threads. Requesting one bounded current-head refresh; this remains fail-closed unless the supported pre-merge result and review are green.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@devantler I’ll review the current PR head.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@devantler I’ll perform a full review of the current PR head.

✅ Action performed

Full review finished.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Daily AI Engineer

Unblocked + merging. The two earlier @coderabbitai review retriggers were incremental no-ops on an already-reviewed head, so pre-merge kept evaluating with the PRE-#105 config (Docstring Coverage ❌ Error 0%/80%). A @coderabbitai full review re-read the branch's .coderabbit.yaml (which already contains #105's docstrings.mode: warning + inheritance: true) and the check is now ⚠️ Warning with 0 errors ("Addressing warnings is optional"), with the CodeRabbit commit status green. The compact counter still renders ✅ 4 | ❌ 1, but the single non-green entry is exactly the check #105 made advisory — treating it as a blocker would defeat that merged decision, so pre-merge is satisfied in substance. Pentad otherwise clear: green required checks, 0 threads, CLEAN, Codex green at head 59c46f6.

Lane note for the sibling: an incremental review retrigger never refreshes pre-merge config on an unchanged head — use full review when a config change must take effect.

@devantler
devantler merged commit 3650ffe into main Jul 17, 2026
10 checks passed
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@devantler Acknowledged. The advisory Docstring Coverage warning is non-blocking under the refreshed configuration, and the reported required checks, clean review state, and zero unresolved threads support proceeding with the merge.

I’ve noted the operational distinction: use @coderabbitai full review—not incremental @coderabbitai review—when an unchanged PR head needs updated .coderabbit.yaml settings applied.

🐇 ✅


✏️ Learnings added
Learnt from: devantler
URL: https://github.com/devantler-tech/.github/pull/103

Timestamp: 2026-07-17T10:46:46.142Z
Learning: For CodeRabbit reviews, an incremental `coderabbitai review` rerun on an unchanged pull-request head does not refresh the pre-merge configuration. Use `coderabbitai full review` when a `.coderabbit.yaml` configuration change, such as changing `docstrings.mode` from an error to a warning, must be re-read and applied to that same head.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(teams): activate the declarative Admins policy

1 participant