Skip to content

feat(distribution): add the account-rotation sync target - #528

Merged
kyle-sexton merged 3 commits into
mainfrom
feat/sync-account-rotation-target
Sep 5, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
feat/sync-account-rotation-target

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

No related issue: Phase 0.2 of the account-rotation repository bootstrap; its tracking issues live in the new repository once it exists.

Summary

Add melodic-software/account-rotation as the thirteenth sync target: the public .NET Claude Code account-switching and quota-dashboard tool that melodic-software/github-iac#405 governs.

Fix

  • distribution/sync-manifest.yml: new target. The managed set is github-iac's minus claude-settings-github-iac (that target's own settings file), minus runner-policy (an adoption list rather than a visibility class; account-rotation is not enrolled yet, and enrollment is a separate consumer change with selfHostedCi: false to take up with the requires-ci flip), and minus both components/claude-lanes/ callers (they name the private fleet's runner label; runner-policy refuses that on a public repository, and runner-policy.test.mjs rejects every public managed target of a claude-lanes component). It adds the hosted-only managed-files-guard-caller every public target carries. automerge: false because the repository sits outside the org ci-gate ruleset until github-iac flips requires-ci; that flip is the removal trigger.
  • components/runner-policy/runner-policy.test.mjs: TARGET_VISIBILITY records the target as public.
  • distribution/sync-manifest.test.sh: catalog-size assertion 12 to 13 targets; the review-instructions coverage list gains the target; the production-target loop now gates its runner-policy assertions on the target actually managing runner-policy (this is the first target carrying lefthook-dotnet without it), the same way the lefthook-dotnet assertions were already gated.
  • components/managed-files-guard/README.md: the hosted-only target list gains the repository.

Merge order (github-iac README, "Add an existing organization repository"): approve this change; after melodic-software/github-iac#405 is applied with pulumi up and the repository exists, grant melodic-software/account-rotation in the melodic-standards-sync App installation (installation 144867070, "Only select repositories"); then merge this PR. Merging before the grant fails the exact-set attestation closed, by design.

Verification

  • node distribution/sync-manifest.mjs validate --source-root . --manifest distribution/sync-manifest.yml: Manifest valid: 35 components, 13 targets.
  • bash distribution/sync-manifest.test.sh: 302 PASS. The 13 FAIL cases ([49] to [57], [115], [116], [125], [126]) reproduce identically on unmodified main on this Windows machine (symlink, node-only-runtime, and spawn-shim cases) and are unrelated to this change; the new melodic-software/account-rotation production-apply cases pass.
  • node --test components/runner-policy/runner-policy.test.mjs: 288 passed, 0 failed.
  • shellcheck on the test script, markdownlint on the README, and the pre-commit hooks (editorconfig, typos, gitleaks, markdownlint, shellcheck, biome): clean.

Related

  • Companion governance change: melodic-software/github-iac#405.
  • Plan: account-rotation docs/topics/claude-subscription-rotation/PLAN.md, Phase 0.2.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QKU99jG34EDYBz1y2g5vVF

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T02:58:14.500767Z 9ac7682 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 32s —— View job


Code review complete

  • Gather context (PR diff, changed files)
  • Read distribution/sync-manifest.yml changes
  • Read components/runner-policy/runner-policy.test.mjs changes
  • Read distribution/sync-manifest.test.sh changes
  • Read components/managed-files-guard/README.md changes
  • Cross-check against manifest schema / related components
  • Post findings (inline + summary)

The new target's managed set, the visibility/test-gating updates, and the README addition all check out against the stated rationale (github-iac's set minus claude-settings-github-iac, runner-policy, and both components/claude-lanes/ callers, plus managed-files-guard-caller), alphabetical placement is correct in all three files, and automerge is a real, wired-up field (not dead config) per distribution/sync-manifest.mjs and components/runner-policy/README.md.

One finding, on an existing line this diff doesn't touch, so no changed line can carry it as an inline comment:

Stale invariant in the manifest's own header comment — distribution/sync-manifest.yml#L322-L328 reads:

No per-target opt-out remains as of 2026-09-04. The last three (agent-plugins, cursor-plugins, claude-code-proxy) were disarmed only because their default branches sat outside the org ci-gate ruleset...

This PR adds automerge: false for melodic-software/account-rotation (L356), dated "Adopted 2026-09-05" in the new target's own comment — one day after the header's "no opt-out remains" claim. That claim is now false, and this file otherwise tracks this exact fact with unusual care (naming the specific targets and dates each opt-out was dropped), so leaving it uncorrected is a real drift in the manifest's self-documentation, not a nitpick. Worth updating that paragraph to note account-rotation as a new, dated per-target opt-out alongside the "removal trigger" note already added at L351-354.

Fix this →

Not verified: I was unable to execute node distribution/sync-manifest.mjs validate, bash distribution/sync-manifest.test.sh, or node --test components/runner-policy/runner-policy.test.mjs in this environment — bash execution beyond git/read-only commands required approval that wasn't available in this lane. The static review above (manifest math, alphabetical ordering, gating logic in the shell test diff, automerge wiring) is consistent with the PR's stated verification output, but the actual test runs were not reproduced here.
· Branch

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ac7682d48

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

Comment thread distribution/sync-manifest.yml Outdated
kyle-sexton and others added 3 commits September 5, 2026 13:24
Add melodic-software/account-rotation, the public .NET Claude Code
account-switching tool github-iac now governs, as the thirteenth sync
target. Its managed set is github-iac's minus what a public hosted-only
target cannot carry: claude-settings-github-iac, runner-policy, and both
components/claude-lanes/ callers, which name the private fleet's runner
label and are refused on a public repository. It adds the hosted-only
managed-files-guard-caller every public target carries. automerge is
false because the repository sits outside the org ci-gate ruleset until
github-iac flips its requires-ci; that flip is the removal trigger.

Record the target's visibility in runner-policy's TARGET_VISIBILITY map,
raise the catalog-size assertion to 13 targets, extend the
review-instructions coverage list, and gate the production-target
runner-policy assertions on the target actually managing that component:
this is the first target carrying lefthook-dotnet without runner-policy.
Mirror the new hosted-only target in the managed-files-guard README.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The target's comment said runner-policy is for private selector-routed
consumers only. The README's "Runner-policy consumer handoff" defines
enrollment as an adoption list rather than a visibility class,
claude-code-plugins is public and enrolled, and a hosted-only consumer
carries selfHostedCi: false. Record the true state instead: the
component is not adopted yet, and enrollment is a separate consumer
change (the repo-local runner-policy.json plus the CI job) to take up
with the requires-ci flip.

Addresses the review thread on the sync target.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKU99jG34EDYBz1y2g5vVF
…trigger

The target's automerge note said the requires-ci flip lands with "the four
ci-gate callers". standards#530 deleted those callers and github-iac#409
folded the contract into the single ci-status context, so the trigger is
the ci.yml that emits ci-status.

Comment-only; rebased onto 877c1b6 so the note sits beside that change.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKU99jG34EDYBz1y2g5vVF
@kyle-sexton
kyle-sexton force-pushed the feat/sync-account-rotation-target branch from 58a5500 to 11c4ad6 Compare September 5, 2026 18:05
@kyle-sexton
kyle-sexton merged commit fdac203 into main Sep 5, 2026
2 checks passed
@kyle-sexton
kyle-sexton deleted the feat/sync-account-rotation-target branch September 5, 2026 18:26
kyle-sexton added a commit to melodic-software/claude-code-account-rotation that referenced this pull request Sep 5, 2026
No related issue: Phase 0 of the account-rotation plan; the plan file
this PR lands is the tracking artifact.

## Summary

The repository skeleton for the account-rotation tool: two source
projects (`AccountRotation.Core`, `AccountRotation.App`) and two test
projects under the org's strict analyzer posture (vendored
`eng/dotnet-analysis/`), the MIT license, the
claude-subscription-rotation contract slice (Brief, plan, and design
notes under `docs/topics/`), and the first vertical test: the parked
profile folder name derived from an account e-mail, which proves the
build, test, and analyzer lane end to end before the machine-wide switch
lands.

## Fix

- Solution scaffold: `AccountRotation.slnx`, `Directory.Build.props`,
`.globalconfig`, `global.json` (pinned SDK), locked restore,
`.gitignore`, `CHANGELOG.md`, `LICENSE` (MIT), and a `README.md` that
replaces the AutoInit stub.
- First vertical slice in `AccountRotation.Core`: the
profile-folder-name sanitizer and its tests.
- `eng/check-no-machine-paths.sh`: the portability gate that fails on
any drive-root or per-user path in `src/`, `tests/`, `README.md`,
`docs/`, and `config.template.json`; the operator's own user name is
supplied only through `CHECK_NO_MACHINE_PATHS_NAMES`.
- `.github/workflows/ci.yml`: locked restore, build, test, and
whitespace-format verification on `ubuntu-24.04` and `windows-2025`,
plus shellcheck and the path gate as repository gates. The header
describes the org ci-gate contract as the single `ci-status` context,
matching github-iac#409 and standards#530.
- Contract slice moved in under
`docs/topics/claude-subscription-rotation/` (Brief, PLAN.md with Phase 0
items 0.3 to 0.7 ticked, design notes).

## Verification

- `dotnet test AccountRotation.slnx -c Release` on this branch: 9
passed, 0 failed.
- `dotnet format whitespace AccountRotation.slnx --verify-no-changes`:
exit 0.
- `bash eng/check-no-machine-paths.sh`: `check-no-machine-paths: clean.`
- `typos` with the org `_typos.toml`: clean on these files.
- Local shellcheck could not be run on a clean copy (the Windows
checkout has `core.autocrlf=true` and no `.gitattributes` yet, so the
working copy is CRLF while the committed blob is LF); CI's shellcheck
step on Linux is the authoritative run. The first sync PR (#1) adds
`.gitattributes`.
- CI on this PR runs the same steps on both hosted images.

## Related

- Plan: `docs/topics/claude-subscription-rotation/PLAN.md`, Phase 0
(items 0.3 to 0.7). Phase 1 follows on `feat/machine-wide-switch`.
- melodic-software/github-iac#405 (merged) created this repository;
melodic-software/standards#528 (merged) registered the standards sync
target; #1 is the first sync PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QKU99jG34EDYBz1y2g5vVF

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant