Skip to content

feat(#651): add unmanaged registry mechanism; record add-to-project as single-hop#658

Merged
don-petry merged 1 commit into
mainfrom
fix-651-unmanaged-reusables
Jul 11, 2026
Merged

feat(#651): add unmanaged registry mechanism; record add-to-project as single-hop#658
don-petry merged 1 commit into
mainfrom
fix-651-unmanaged-reusables

Conversation

@don-petry

@don-petry don-petry commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #651.

Decision

Per the rollout audit, add-to-project stays single-hop (@add-to-project/stable, 5 consumers, low-risk plumbing) — not worth a full ring-gate cutover. The problem was only that canary-rollout drift flagged it (and the frozen-@v2 infra reusables claude-code/pr-auto-review) as "unregistered" — noise, since they're intentionally out of the ring model.

Change

Adds an unmanaged block to canary-rings.json (the #1082/#1010 concept) recording intentionally-out-of-model reusables with a reason, and teaches drift to exclude them:

  • new _unmanaged_reusables_for_host() helper (parallels _registered_…);
  • cmd_drift: unregistered = present − registered − unmanaged, and reports the unmanaged set separately.

Recorded as unmanaged: add-to-project (#651, single-hop), claude-code + pr-auto-review (frozen-@v2 infra).

Effect (validated live, read-only)

drift 6 → 3 unregistered — now flags only what genuinely needs onboarding (feature-ideation #614, idea-enhancer #515, ci-failure-analyst #1159); the three intentional ones show as unmanaged (intentional, out of ring gate).

canary_rollout.bats 95/95 (added an unmanaged-exclusion drift test); shellcheck no new error/warning findings.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for intentionally unmanaged automation targets in canary configuration.
    • Drift reports now distinguish unmanaged reusable workflows from genuinely unregistered items and show an unmanaged summary per host.
  • Bug Fixes

    • Prevented intentionally unmanaged workflows from being incorrectly flagged as unregistered during drift checks.
  • Tests

    • Added coverage verifying accurate drift classification for unmanaged and unregistered workflows.

… as single-hop

Per the rollout-audit decision (#651): add-to-project stays on its single-hop
`@add-to-project/stable` model (5 consumers; low-risk project-automation plumbing) —
NOT worth a full ring-gate cutover. But `canary-rollout drift` flagged it (and the
frozen-`@v2` infra reusables claude-code + pr-auto-review) as "unregistered", which is
noise: they are intentionally out of the ring model.

Adds an `unmanaged` block to canary-rings.json (mirrors the #1082/#1010 concept) that
records intentionally-out-of-model reusables with a reason, and teaches `drift` to
exclude them:
  - new `_unmanaged_reusables_for_host()` helper (parallels `_registered_...`);
  - `cmd_drift` computes `unregistered = present − registered − unmanaged` and reports
    the unmanaged set separately ("unmanaged (intentional, out of ring gate)").

Registered as unmanaged: add-to-project (#651, single-hop), claude-code + pr-auto-review
(frozen-major @v2 infra).

Effect (validated live, read-only): drift 6 → **3 unregistered** — now flags only the
reusables that genuinely still need onboarding (feature-ideation #614, idea-enhancer
#515, ci-failure-analyst #1159), with add-to-project/claude-code/pr-auto-review shown
as intentional-unmanaged instead.

canary_rollout.bats 95/95 (added an unmanaged-exclusion drift test); shellcheck no new
error/warning findings.

Closes #651.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner July 11, 2026 02:30
Copilot AI review requested due to automatic review settings July 11, 2026 02:30
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2023b1c1-00e5-4517-a47d-1fd4b813e503

📥 Commits

Reviewing files that changed from the base of the PR and between 5179083 and 3b70456.

📒 Files selected for processing (3)
  • scripts/canary-rollout.sh
  • standards/canary-rings.json
  • tests/canary_rollout.bats

📝 Walkthrough

Walkthrough

The canary registry now declares unmanaged reusable workflows. Drift auditing reads these entries, reports them separately, and excludes them from unregistered findings. A Bats test verifies unmanaged and genuinely unregistered workflows are classified separately.

Changes

Unmanaged drift handling

Layer / File(s) Summary
Unmanaged registry entries
standards/canary-rings.json
Adds host, reusable path, and reason fields for three unmanaged automation targets.
Drift reconciliation and validation
scripts/canary-rollout.sh, tests/canary_rollout.bats
Loads unmanaged paths per host, reports non-empty unmanaged entries, excludes them from unregistered results, and tests the classification.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant canary-rings.json
  participant cmd_drift
  participant HostWorkflows
  canary-rings.json->>cmd_drift: unmanaged reusable declarations
  cmd_drift->>HostWorkflows: read reusable paths
  HostWorkflows-->>cmd_drift: present workflow paths
  cmd_drift-->>cmd_drift: classify unmanaged and unregistered paths
Loading

Possibly related issues

  • petry-projects/.github-private#1008 — Addresses the same unmanaged registry-entry and drift-audit behavior.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the unmanaged registry change and the add-to-project single-hop decision.
Linked Issues check ✅ Passed The PR keeps add-to-project on the single-hop stable channel and marks it unmanaged so drift stops flagging it, matching #651's option B.
Out of Scope Changes check ✅ Passed The added unmanaged registry and drift/test updates stay aligned with the stated #651 objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-651-unmanaged-reusables

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.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to exclude intentionally-unmanaged reusable workflows from the canary-rollout drift detection. It adds an "unmanaged" block to canary-rings.json for low-risk or frozen workflows, updates canary-rollout.sh to query and filter out these unmanaged reusables, and adds a corresponding BATS test. The review feedback suggests improving the robustness of the jq query when the unmanaged field is missing, and optimizing the nested set_difference calls into a single pass.

Comment thread scripts/canary-rollout.sh
Comment thread scripts/canary-rollout.sh
@don-petry
don-petry enabled auto-merge (squash) July 11, 2026 02:32
@don-petry
don-petry disabled auto-merge July 11, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the canary rollout registry and drift auditing so that intentionally out-of-ring-gate reusables can be recorded and excluded from “unregistered” drift noise, aligning the audit output with the documented single-hop/frozen-@v2 decisions.

Changes:

  • Adds a new top-level unmanaged registry block to standards/canary-rings.json with host/reusable/reason metadata.
  • Extends scripts/canary-rollout.sh drift to subtract unmanaged reusables from the “unregistered” set and report the unmanaged list per host.
  • Adds a Bats test ensuring drift does not flag unmanaged entries as unregistered.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/canary_rollout.bats Adds coverage for drift behavior when a reusable is intentionally marked unmanaged.
standards/canary-rings.json Records intentionally out-of-model reusables in a new unmanaged section with reasons.
scripts/canary-rollout.sh Adds _unmanaged_reusables_for_host() and updates cmd_drift to exclude unmanaged from unregistered drift.

Comment thread scripts/canary-rollout.sh
Comment on lines 1089 to +1092
echo " present *-reusable.yml (${#pres_arr[@]}):$pres_str"
# unregistered = present on the host but not in the registry.
unregistered="$(set_difference "$present" "$registered")"
[ "${#um_arr[@]}" -gt 0 ] && echo " unmanaged (intentional, out of ring gate) (${#um_arr[@]}):$um_str"
# unregistered = present on the host, minus registered agents AND intentionally-unmanaged (#651).
unregistered="$(set_difference "$(set_difference "$present" "$registered")" "$unmanaged_r")"
@don-petry
don-petry merged commit 79fd96c into main Jul 11, 2026
35 of 49 checks passed
@don-petry
don-petry deleted the fix-651-unmanaged-reusables branch July 11, 2026 02:35
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide: promote add-to-project to the full ring model (currently single-hop stable) + register

2 participants