Skip to content

fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316) - #1317

Merged
don-petry merged 6 commits into
mainfrom
feat/persona-identity-1316
Jul 19, 2026
Merged

don-petry merged 6 commits into
mainfrom
feat/persona-identity-1316

Conversation

@don-petry

@don-petry don-petry commented Jul 18, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1316.

Regression

dev-lead regressed to authoring/pushing commits as donpetry-bot — the review-only PR-review machine user — instead of don-petry. Git-archaeology dates the flip to late June 2026 (author id 36422719 don-petry → 281750570 donpetry-bot) with no code change in the window, so the trigger was the runtime vars.BOT_USER Actions variable: dev-lead and pr-review shared it, and setting it to donpetry-bot for pr-review's approvals flipped dev-lead's committer as collateral damage. (It also left the anti-loop sender == BOT_USER guard inconsistent, since the real pusher is don-petry.)

Fix — declarative, per-persona identity

  • Manifests — personas/*/persona.yml gain runtime.identity (account + credential): dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
  • Runtime — scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest; dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  • Enforcement — validate-personas.py makes runtime.identity mandatory + enforces GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh (wired into lint.yml) asserts the manifest↔workflow wiring can't drift. +2 new validator tests.
  • Credential rename sweep (clarity) — GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY, GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with secrets.NEW || secrets.OLD transition fallbacks. Bot secrets (DON_PETRY_BOT_GH_PAT*) grandfathered.
  • Docs — machine-user-setup.md, dev-lead/spec.md, AGENTS.md.

Requires

  1. Merge the companion schema PR first: feat(personas): declarative runtime.identity for the persona standard .github#782 (same branch name, so this repo's validate-personas job validates against it).
  2. Provision the new secrets (copies of the old values — fallbacks keep CI green until then): GH_PAT_DON_PETRY ← GH_PAT_WORKFLOWS, GH_PAT_DON_PETRY_COPILOT ← GH_PAT.

Verification

actionlint / markdownlint / shellcheck clean; persona validator (22 existing + 2 new) green; dev-lead intent/anti-loop tests green; resolver + drift-checker verified. The live proof is the next dev-lead commit being authored by don-petry.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Persona-based runtime identity is now resolved automatically for supported workflows.
    • Added consistency checks to verify persona identities, credentials, and workflow configuration.
    • Automation now supports the updated credential configuration while retaining compatibility with legacy settings.
  • Bug Fixes

    • Improved authentication fallback handling across automated workflow operations.
  • Documentation

    • Updated identity, credential naming, migration, and developer workflow documentation.

…s.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 23:01
@don-petry
don-petry requested a review from a team as a code owner July 18, 2026 23:01
@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.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b3636121-6c90-4600-a1f7-405d9e80b77d

📥 Commits

Reviewing files that changed from the base of the PR and between 758efed and 53bd5ba.

📒 Files selected for processing (10)
  • .github/workflows/dependency-advisory.yml
  • .github/workflows/dev-lead-retry.yml
  • .github/workflows/dev-lead-reusable.yml
  • .github/workflows/lint.yml
  • docs/dev-lead/spec.md
  • docs/pr-review-agent/machine-user-setup.md
  • personas/validate-personas.py
  • scripts/lib/resolve-persona-identity.sh
  • scripts/verify-persona-identity.sh
  • tests/test_validate_personas.bats
📝 Walkthrough

Walkthrough

The change adds manifest-driven persona identities, validates credential naming and workflow wiring, and updates GitHub Actions to prefer account-specific PAT secrets with legacy fallbacks.

Changes

Persona identity and validation

Layer / File(s) Summary
Identity declarations and contracts
AGENTS.md, docs/..., personas/*/persona.yml, personas/validate-personas.py, tests/test_validate_personas.bats
Persona manifests declare runtime accounts and credentials; validator rules and tests enforce the identity contract.
Identity resolution and CI verification
scripts/lib/resolve-persona-identity.sh, scripts/verify-persona-identity.sh, .github/workflows/lint.yml
New scripts resolve manifest identity and verify credential references, naming, and workflow usage.
Reusable agent identity wiring
.github/workflows/dev-lead-reusable.yml, .github/workflows/pr-review.yml, .github/workflows/persona-runner-reusable.yml, .github/workflows/readme-refresh.yml
Reusable workflows add canonical PAT inputs, resolve BOT_USER from persona manifests, and apply Copilot PAT fallbacks.

PAT precedence across automation

Layer / File(s) Summary
Workflow authentication fallback rollout
.github/workflows/actions-fleet-monitor.yml, .github/workflows/auto-rebase-retry.yml, .github/workflows/dependency-advisory.yml, .github/workflows/dev-lead-retry.yml, .github/workflows/feature-ideation.yml, .github/workflows/gh-aw-cross-org.yml, .github/workflows/idea-triage.yml, .github/workflows/initiative-*.yml, .github/workflows/pr-review-*.yml, .github/workflows/reviewer-report.yml, .github/workflows/token-report.yml
Checkout, dispatch, reporting, triage, remediation, and analysis steps now prefer account-specific PAT secrets before existing fallbacks.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow
  participant PersonaResolver
  participant PersonaManifest
  participant GitHub
  Workflow->>PersonaResolver: Resolve runtime identity
  PersonaResolver->>PersonaManifest: Read runtime.identity
  PersonaManifest-->>PersonaResolver: Return account and credential
  PersonaResolver-->>Workflow: Set BOT_USER and token inputs
  Workflow->>GitHub: Execute authenticated API operation
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also includes broad secret renames, unrelated workflow updates, and new persona changes beyond the dev-lead identity fix in #1316. Split the unrelated secret/credential, documentation, and other persona/workflow changes into separate PRs or justify them with linked issues.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main dev-lead identity fix and matches issue #1316.
Linked Issues check ✅ Passed The PR resolves dev-lead identity from persona manifests and adds validation/drift checks, addressing the issue's root cause and expected behavior.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/persona-identity-1316

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a mandatory runtime.identity block for all persona manifests to explicitly define the GitHub account and credential secret each persona acts as, preventing accidental fallbacks to shared machine users. It includes validation updates, helper scripts, and documentation. The review feedback focuses on improving robustness and performance: suggesting a pure Python fallback parser in resolve-persona-identity.sh to avoid PEP 668 pip installation failures, optimizing verify-persona-identity.sh by replacing external subshell calls inside loops with pure Bash parameter expansions, and adding defensive checks in validate-personas.py to prevent potential crashes during manifest parsing.

Comment thread scripts/lib/resolve-persona-identity.sh Outdated
Comment thread scripts/verify-persona-identity.sh Outdated
Comment thread scripts/verify-persona-identity.sh
Comment thread personas/validate-personas.py Outdated

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 addresses the dev-lead identity regression (#1316) by making agent/persona “acting identity” declarative in persona manifests and wiring workflows to resolve BOT_USER from those manifests instead of relying on a shared vars.BOT_USER.

Changes:

  • Add mandatory runtime.identity (account + credential) to persona manifests and enforce it in validate-personas.py + Bats tests.
  • Introduce identity resolution and drift checks (resolve-persona-identity.sh, verify-persona-identity.sh) and wire them into lint.yml and key workflows.
  • Begin PAT secret rename migration (GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY, GH_PAT → GH_PAT_DON_PETRY_COPILOT) with NEW || OLD fallbacks across workflows and docs.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_validate_personas.bats Adds validator tests for mandatory runtime.identity and credential naming.
scripts/verify-persona-identity.sh New drift check tying persona identity ↔ workflow consumption.
scripts/lib/resolve-persona-identity.sh New runtime resolver to read runtime.identity from persona YAML.
personas/validate-personas.py Makes runtime.identity mandatory and adds credential convention checks.
personas/scrum-master/persona.yml Adds runtime.identity for advisory persona.
personas/qa-lead/persona.yml Replaces “no runtime block” doc with runtime.identity.
personas/pr-review/persona.yml Declares pr-review acts as donpetry-bot + grandfathered credential.
personas/dev-lead/persona.yml Declares dev-lead acts as don-petry + canonical credential.
personas/business-analyst/persona.yml Adds runtime.identity for advisory persona.
docs/pr-review-agent/machine-user-setup.md Documents new GH_PAT_<ACCOUNT> secret naming and migration.
docs/dev-lead/spec.md Updates spec env examples for new secret names and identity model.
AGENTS.md Documents the new manifest-driven identity standard and constraints.
.github/workflows/token-report.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/reviewer-report.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/readme-refresh.yml Uses `GH_PAT_DON_PETRY_COPILOT
.github/workflows/pr-review.yml Adds persona identity resolution step; updates Copilot PAT secret fallback.
.github/workflows/pr-review-sweep.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/pr-review-mention.yml Maps reusable secret input from `GH_PAT_DON_PETRY
.github/workflows/pr-review-canary.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/persona-runner-reusable.yml Adds optional GH_PAT_DON_PETRY secret and uses it as preferred GH_TOKEN.
.github/workflows/lint.yml Adds verify-persona-identity job and updates PAT usage.
.github/workflows/initiative-planner.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/initiative-planner-canary.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/initiative-driver.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/initiative-driver-canary.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/idea-triage.yml Updates cross-repo token fallback to prefer GH_PAT_DON_PETRY.
.github/workflows/gh-aw-cross-org.yml Updates PAT fallbacks for checkout/auth and Copilot token rename.
.github/workflows/feature-ideation.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/dev-lead-reusable.yml Adds persona identity resolution step; updates PAT fallbacks and sparse checkout.
.github/workflows/dev-lead-retry.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/dependency-advisory.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/auto-rebase-retry.yml Switches to `GH_PAT_DON_PETRY
.github/workflows/actions-fleet-monitor.yml Switches to `GH_PAT_DON_PETRY

Comment thread .github/workflows/dev-lead-reusable.yml Outdated
Comment thread personas/validate-personas.py Outdated
Comment thread scripts/verify-persona-identity.sh Outdated
Comment thread scripts/lib/resolve-persona-identity.sh Outdated
Comment thread docs/dev-lead/spec.md Outdated
Comment thread .github/workflows/lint.yml Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 18, 2026 23:09
@donpetry-bot donpetry-bot added the needs-human-review Flagged by automated PR review agent label Jul 18, 2026
… feat/persona-identity-1316

# Conflicts:
#	personas/devops-lead/persona.yml
#	personas/security-lead/persona.yml
#	personas/sre-lead/persona.yml
@don-petry
don-petry disabled auto-merge July 19, 2026 00:30
coderabbitai[bot]
coderabbitai Bot previously requested changes Jul 19, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/feature-ideation.yml (1)

128-132: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Synchronize PAT diagnostics and documentation with donor-first selection.

The workflows now accept GH_PAT_DON_PETRY, but their guards/comments still identify GH_PAT_WORKFLOWS as the sole required or primary credential.

  • .github/workflows/feature-ideation.yml#L128-L132: update the missing-secret error.
  • .github/workflows/initiative-driver.yml#L91-L95: update the missing-secret error.
  • .github/workflows/initiative-planner.yml#L102-L105: update the missing-secret error.
  • .github/workflows/initiative-planner.yml#L143-L147: update the cross-repository and redispatch credential comments.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/feature-ideation.yml around lines 128 - 132, Synchronize
PAT diagnostics and documentation with donor-first selection: update the
missing-secret errors in .github/workflows/feature-ideation.yml lines 128-132,
.github/workflows/initiative-driver.yml lines 91-95, and
.github/workflows/initiative-planner.yml lines 102-105 to identify
GH_PAT_DON_PETRY as the preferred credential while acknowledging the
GH_PAT_WORKFLOWS fallback; update the cross-repository and redispatch credential
comments in .github/workflows/initiative-planner.yml lines 143-147 to reflect
the same donor-first order.
🤖 Prompt for all review comments with AI agents
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/actions-fleet-monitor.yml:
- Around line 83-87: Update the fleet-monitor workflow credential expressions so
GH_PAT_WORKFLOWS remains the primary value for GH_TOKEN, issue operations, and
remediation-related authentication. Use GH_PAT_DON_PETRY only as the permitted
fallback, and apply this ordering consistently at the referenced workflow
occurrences, including the Run fleet monitor environment.

In @.github/workflows/auto-rebase-retry.yml:
- Line 49: Update the GH_TOKEN fallback chain in the retry dispatch
configuration so secrets.GH_PAT_WORKFLOWS remains the first candidate, followed
by secrets.GH_PAT_DON_PETRY and github.token. Preserve the existing fallback
behavior while ensuring workflow_run retries use GH_PAT_WORKFLOWS when
available.

In @.github/workflows/dependency-advisory.yml:
- Around line 45-48: Disable credential persistence in both checkout steps by
adding persist-credentials: false under with for actions/checkout in
.github/workflows/dependency-advisory.yml lines 45-48 and
.github/workflows/dev-lead-retry.yml lines 48-51; no other workflow behavior
should change.

In @.github/workflows/dev-lead-reusable.yml:
- Line 129: Replace the fallback GH_TOKEN expressions with the strict
secrets.GH_PAT_WORKFLOWS value at .github/workflows/dev-lead-reusable.yml lines
129, 439, and 485; all three workflow sites must use only that secret.
- Around line 173-178: Remove the if/else fallback wrappers around
resolve-persona-identity.sh in .github/workflows/dev-lead-reusable.yml lines
173-178 and .github/workflows/pr-review.yml lines 227-232. Invoke the script
directly, export its resolved value to BOT_USER, and allow a non-zero exit
status to halt each job instead of using the existing fallback environment
value.
- Line 187: Replace every COPILOT_GITHUB_TOKEN fallback expression with
secrets.GH_PAT only in .github/workflows/dev-lead-reusable.yml at lines 187,
283, 302, 321, 340, 359, 376, and 393, and in .github/workflows/pr-review.yml at
line 147. Ensure each workflow uses the exact GH_PAT secret without any
fallback.

In `@docs/pr-review-agent/machine-user-setup.md`:
- Around line 121-124: Update the explanatory sentence in the PAT secret naming
guidance to add a verb linking “the ambiguity” to its outcome, while preserving
the existing account naming schema and issue reference.

In `@scripts/verify-persona-identity.sh`:
- Around line 27-29: Update GRANDFATHERED in scripts/verify-persona-identity.sh
to a Bash array, then adjust both iteration sites (including lines 41–45) to
iterate over the array with quoted expansions, eliminating SC2086 while
preserving the existing credential values and behavior.

---

Outside diff comments:
In @.github/workflows/feature-ideation.yml:
- Around line 128-132: Synchronize PAT diagnostics and documentation with
donor-first selection: update the missing-secret errors in
.github/workflows/feature-ideation.yml lines 128-132,
.github/workflows/initiative-driver.yml lines 91-95, and
.github/workflows/initiative-planner.yml lines 102-105 to identify
GH_PAT_DON_PETRY as the preferred credential while acknowledging the
GH_PAT_WORKFLOWS fallback; update the cross-repository and redispatch credential
comments in .github/workflows/initiative-planner.yml lines 143-147 to reflect
the same donor-first order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 34867e3e-b80c-4490-9bb7-19af1c2b9076

📥 Commits

Reviewing files that changed from the base of the PR and between da83a79 and 758efed.

📒 Files selected for processing (36)
  • .github/workflows/actions-fleet-monitor.yml
  • .github/workflows/auto-rebase-retry.yml
  • .github/workflows/dependency-advisory.yml
  • .github/workflows/dev-lead-retry.yml
  • .github/workflows/dev-lead-reusable.yml
  • .github/workflows/feature-ideation.yml
  • .github/workflows/gh-aw-cross-org.yml
  • .github/workflows/idea-triage.yml
  • .github/workflows/initiative-driver-canary.yml
  • .github/workflows/initiative-driver.yml
  • .github/workflows/initiative-planner-canary.yml
  • .github/workflows/initiative-planner.yml
  • .github/workflows/lint.yml
  • .github/workflows/persona-runner-reusable.yml
  • .github/workflows/pr-review-canary.yml
  • .github/workflows/pr-review-mention.yml
  • .github/workflows/pr-review-sweep.yml
  • .github/workflows/pr-review.yml
  • .github/workflows/readme-refresh.yml
  • .github/workflows/reviewer-report.yml
  • .github/workflows/token-report.yml
  • AGENTS.md
  • docs/dev-lead/spec.md
  • docs/pr-review-agent/machine-user-setup.md
  • personas/business-analyst/persona.yml
  • personas/dev-lead/persona.yml
  • personas/devops-lead/persona.yml
  • personas/pr-review/persona.yml
  • personas/qa-lead/persona.yml
  • personas/scrum-master/persona.yml
  • personas/security-lead/persona.yml
  • personas/sre-lead/persona.yml
  • personas/validate-personas.py
  • scripts/lib/resolve-persona-identity.sh
  • scripts/verify-persona-identity.sh
  • tests/test_validate_personas.bats

Comment thread .github/workflows/actions-fleet-monitor.yml
Comment thread .github/workflows/auto-rebase-retry.yml
Comment thread .github/workflows/dependency-advisory.yml
Comment thread .github/workflows/dev-lead-reusable.yml
Comment thread .github/workflows/dev-lead-reusable.yml
Comment thread .github/workflows/dev-lead-reusable.yml
Comment thread docs/pr-review-agent/machine-user-setup.md
Comment thread scripts/verify-persona-identity.sh Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 19, 2026 00:42
@donpetry-bot
donpetry-bot dismissed coderabbitai[bot]’s stale review July 19, 2026 00:42

Auto-dismissed (#617): coderabbitai[bot] CHANGES_REQUESTED on a superseded commit. The bot re-reviews the new head automatically — a valid concern will return as a fresh review.

@don-petry
don-petry disabled auto-merge July 19, 2026 00:43
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry disabled auto-merge July 19, 2026 00:49
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: fix-reviews)

PR: #1317
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-19T01:20:25Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Traceability: fixes #1316; tracked under the post-rollout hardening Epic #1318 (top-priority item — root cause of the pr-review approval friction across the persona rollout).

@don-petry
don-petry merged commit 8f1c471 into main Jul 19, 2026
57 of 69 checks passed
@don-petry
don-petry deleted the feat/persona-identity-1316 branch July 19, 2026 02:43
don-petry added a commit that referenced this pull request Aug 2, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 3, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 3, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
…s.BOT_USER (#1316) (#1317)

* fix(dev-lead): resolve identity from persona manifest, not shared vars.BOT_USER (#1316)

dev-lead regressed to authoring/pushing commits as `donpetry-bot` — the
review-only PR-review machine user — instead of `don-petry`. Root cause:
dev-lead and pr-review both derived their acting identity from one shared
`vars.BOT_USER` variable; when it was set org-wide to `donpetry-bot` for
pr-review's approvals, dev-lead's commit author flipped as collateral damage.
git-archaeology dates the flip to late June 2026 (don-petry id 36422719 →
donpetry-bot id 281750570) with no code change in the window — the trigger
was the runtime variable.

Make each persona's acting identity DECLARATIVE and per-persona:

- personas/*/persona.yml gain `runtime.identity` (account + credential):
  dev-lead → don-petry, pr-review → donpetry-bot, advisory personas → don-petry.
- scripts/lib/resolve-persona-identity.sh resolves BOT_USER from the manifest;
  dev-lead-reusable.yml and pr-review.yml consume it in a "Resolve persona
  identity" step. dev-lead's job-env fallback flips donpetry-bot → don-petry.
  This also fixes the anti-loop guard, which compares the real pusher
  (don-petry) against BOT_USER.
- validate-personas.py makes runtime.identity mandatory and enforces the
  GH_PAT_<ACCOUNT> credential naming; new scripts/verify-persona-identity.sh
  (wired into lint.yml) asserts the manifest↔workflow wiring can't drift.

Credential-secret rename sweep (clarity): GH_PAT_WORKFLOWS → GH_PAT_DON_PETRY,
GH_PAT → GH_PAT_DON_PETRY_COPILOT, applied with `secrets.NEW || secrets.OLD`
transition fallbacks so nothing breaks before the new secrets are provisioned.
The bot's DON_PETRY_BOT_GH_PAT(_CLASSIC) secrets are grandfathered.

Docs: persona-standards §5.1 (in petry-projects/.github), machine-user-setup.md
secret-naming table, dev-lead/spec.md, AGENTS.md.

Requires companion schema PR in petry-projects/.github (same branch), and the
owner to create GH_PAT_DON_PETRY / GH_PAT_DON_PETRY_COPILOT secrets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: Rachel Petry <Rachel.L.Petry@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human-review Flagged by automated PR review agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev-lead regressed to committing as donpetry-bot (review-only machine user) instead of don-petry

4 participants