feat(personas): declarative runtime.identity for the persona standard - #782
Conversation
Personas derived their acting GitHub account from a single shared `vars.BOT_USER` variable. Two personas that must act as different accounts (dev-lead as `don-petry`, pr-review as the review-only machine user `donpetry-bot`) shared that one variable, so setting it for one silently changed the other — the donpetry-bot regression (petry-projects/.github-private#1316). Add a `runtime.identity` block (account + credential) so each persona declares the account it acts as and the secret holding its PAT, orthogonal to `address.handle` (the mention team). Document it as §5.1 with the `GH_PAT_<ACCOUNT>[_<QUALIFIER>]` credential-naming schema, add a DoD checklist item, and show the field in the TEMPLATE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a ChangesRuntime identity contract
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a declarative runtime.identity configuration for personas, specifying the GitHub account they act as and the Actions secret holding their PAT to prevent account sharing and collisions. The changes update the persona standards documentation, the persona template, and the JSON schema. The review feedback suggests three improvements: adding a maxLength: 39 constraint to the account property in the schema, updating the credential regex pattern to block invalid GITHUB_ prefixes, and clarifying an ambiguous pronoun reference in the documentation checklist.
There was a problem hiding this comment.
Pull request overview
Adds a declarative runtime.identity block to the persona standard so each persona explicitly declares the GitHub account it runs as (and which Actions secret provides its PAT), preventing cross-persona identity collisions caused by shared vars.BOT_USER configuration.
Changes:
- Extend
standards/personas/persona.schema.jsonwithruntime.identity(requiredaccount+credentialwithin the block) and validation patterns. - Document the identity-vs-handle distinction and credential naming conventions in
standards/persona-standards.md(new §5.1 + DoD checklist item). - Update the persona template to demonstrate
runtime.identity.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| standards/personas/TEMPLATE/persona.yml | Updates the scaffold to include commented guidance for the new runtime.identity block under runtime. |
| standards/personas/persona.schema.json | Adds schema support for runtime.identity with required fields and basic validation patterns. |
| standards/persona-standards.md | Documents the new runtime identity concept, clarifies separation from address.handle, and adds DoD checklist coverage. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #782 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@standards/personas/persona.schema.json`:
- Around line 249-253: Align the schema and documentation for runtime identity
requirements: update the `runtime.identity` validation around the persona
schema’s `identity` definition so it is required only for personas using runtime
wiring, or add the corresponding guard for stable personas. Ensure
`standards/persona-standards.md` §7 states the same conditional requirement
rather than requiring identity universally.
- Around line 260-263: Update the persona schema’s credential validation to
enforce correspondence with the account value, accepting the documented
GH_PAT_<ACCOUNT>[_<QUALIFIER>] convention and grandfathered account-named
secrets while rejecting unrelated uppercase names such as GH_PAT_OTHER_ACCOUNT
or NOT_A_PAT. Use a cross-field rule or companion validator tied to the
credential and account properties; retain the existing uppercase-name
constraints where applicable.
- Around line 249-265: Update the persona schema’s schema_version contract to
reflect the new runtime.identity shape: either increment the version from its
current const value and document compatibility with prior schemas, or revise the
versioning description to explicitly allow additive fields to remain at v1. Keep
the schema_version declaration and its description consistent.
🪄 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: 184371d9-6eb3-4748-8a94-180595043741
📒 Files selected for processing (3)
standards/persona-standards.mdstandards/personas/TEMPLATE/persona.ymlstandards/personas/persona.schema.json
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #782 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 0d62e4f6099e550c7a0569003c3c9db1f65b2fdd
Review mode: triage-approved (single reviewer)
Summary
Adds a declarative runtime.identity block (acting account + PAT credential secret name) to the persona schema, with matching documentation (§5.1), a Definition-of-Done checklist item, and a TEMPLATE example. The change directly targets the root cause of the dev-lead → donpetry-bot identity regression (shared vars.BOT_USER). Schema patterns are sound: the account pattern matches GitHub login rules (alphanumeric + non-consecutive hyphens, ≤39 chars) and the credential pattern excludes the reserved GITHUB_ prefix via a valid ECMA-262 negative lookahead. Docs, schema, and template are mutually consistent. Confirms the triage assessment — no issues that would block approval.
Linked issue analysis
References petry-projects/.github-private#1316 ("closes part of", by design). The issue traces dev-lead commits being authored by the review-only machine user donpetry-bot to a single shared vars.BOT_USER variable. This PR delivers the schema/standards half of the fix (per-persona declarative identity); the runtime wiring and validator enforcement land in the companion .github-private PR on branch feat/persona-identity-1316. Substantively addresses its declared scope.
Findings
- [Observation, non-blocking]
runtimenow hasrequired: ["identity"], which is shape-breaking for any existing manifest that already declares aruntimeblock, whileschema_versionstays at1(its description was reworded to permit additive optional fields — a new required field is not that). This is mitigated by the coordinated companion PR updating all consumer manifests and the same-branch-name schema-resolution fallback, but strictly the versioning rule and the change are in mild tension. - [Observation, non-blocking]
node_modules/.package-lock.jsonis tracked and modified (name-only churnpr-720→pr-782, same inpackage-lock.json) — pre-existing repo quirk from automation, not introduced here. - Secret scan:
run_secret_scanningMCP tool not available in this environment; gitleaks CI check passed and the diff contains no secret material (secret names only, which is the point of the change). - All 6 review threads (gemini-code-assist, CodeRabbit) are resolved; CodeRabbit's earlier CHANGES_REQUESTED review was dismissed after the fix commit that added the
GITHUB_prefix exclusion and tightened the account pattern.
CI status
All substantive checks green: Lint, ShellCheck, CodeQL, Analyze (actions), Secret scan (gitleaks), npm audit, AgentShield, Agent Security Scan, SonarCloud (quality gate passed), CodeRabbit. The dev-lead / dispatch CANCELLED and dev-lead / ci-relay CANCELLED/SKIPPED entries are superseded persona-automation runs (a later dev-lead / dispatch run succeeded); they are not correctness checks and do not block.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Why
Personas derive their acting GitHub account from a single shared
vars.BOT_USERvariable. Two personas that must act as different accounts — dev-lead asdon-petry, pr-review as the review-only machine userdonpetry-bot— shared that one variable, so setting it for one silently changed the other. That is the root cause of the dev-lead → donpetry-bot regression (petry-projects/.github-private#1316).What
Adds a
runtime.identityblock to the persona schema so each persona declares the account it acts as and the secret holding its PAT, orthogonal toaddress.handle(the mention team):standards/personas/persona.schema.json— newruntime.identity(account + credential, both required within the block).standards/persona-standards.md— new §5.1 (identity vs handle; theGH_PAT_<ACCOUNT>[_<QUALIFIER>]credential-naming schema) + a Definition-of-Done checklist item.standards/personas/TEMPLATE/persona.yml— shows the field.Companion
Consumer PR (manifests + runtime wiring + validator enforcement): petry-projects/.github-private branch
feat/persona-identity-1316. Merge this schema PR first — the consumer'svalidate-personasjob resolves the schema from the same-named branch, falling back tomain.Closes part of petry-projects/.github-private#1316.
🤖 Generated with Claude Code
Summary by CodeRabbit