Skip to content

feat(personas): declarative runtime.identity for the persona standard - #782

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

feat(personas): declarative runtime.identity for the persona standard#782
don-petry merged 2 commits into
mainfrom
feat/persona-identity-1316

Conversation

@don-petry

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

Copy link
Copy Markdown
Contributor

Why

Personas derive 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. That is the root cause of the dev-lead → donpetry-bot regression (petry-projects/.github-private#1316).

What

Adds a runtime.identity block to the persona schema so each persona declares the account it acts as and the secret holding its PAT, orthogonal to address.handle (the mention team):

runtime:
  identity:
    account: don-petry
    credential: GH_PAT_DON_PETRY
  • standards/personas/persona.schema.json — new runtime.identity (account + credential, both required within the block).
  • standards/persona-standards.md — new §5.1 (identity vs handle; the GH_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's validate-personas job resolves the schema from the same-named branch, falling back to main.

Closes part of petry-projects/.github-private#1316.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added runtime identity guidance for personas, including the acting GitHub account and associated credential naming.
    • Updated onboarding requirements to ensure runtime identity is declared and consistently resolved.
    • Added template guidance and validation for required identity account and credential fields.

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>
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: 48 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: 7490d570-eb02-42ca-9f10-a9294fb729c0

📥 Commits

Reviewing files that changed from the base of the PR and between 0100fa4 and 0d62e4f.

⛔ Files ignored due to path filters (2)
  • node_modules/.package-lock.json is excluded by !**/node_modules/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • standards/persona-standards.md
  • standards/personas/persona.schema.json
📝 Walkthrough

Walkthrough

Adds a runtime.identity contract for persona GitHub accounts and PAT secrets, validates it in the schema, documents it in the template, and requires it in the Definition of Done checklist.

Changes

Runtime identity contract

Layer / File(s) Summary
Runtime identity contract
standards/persona-standards.md, standards/personas/persona.schema.json
Defines runtime.identity.account and runtime.identity.credential, including GitHub-login and secret-name validation rules, legacy secret-name grandfathering, and separation from address.handle.
Template and onboarding wiring
standards/personas/TEMPLATE/persona.yml, standards/persona-standards.md
Adds commented identity placeholders to the persona template and requires identity fields and credential naming compliance in the Definition of Done checklist.

Estimated code review effort: 2 (Simple) | ~10 minutes

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 summarizes the main change: adding declarative runtime.identity support to the persona standard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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
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 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.

Comment thread standards/personas/persona.schema.json
Comment thread standards/personas/persona.schema.json
Comment thread standards/persona-standards.md 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

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.json with runtime.identity (required account + credential within 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.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #782
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-18T23:34:22Z

@don-petry

Copy link
Copy Markdown
Contributor Author

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.
Next attempt after: 2026-07-18T23:34:22Z

@don-petry
don-petry enabled auto-merge (squash) July 18, 2026 23:04

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3ba1539 and 0100fa4.

📒 Files selected for processing (3)
  • standards/persona-standards.md
  • standards/personas/TEMPLATE/persona.yml
  • standards/personas/persona.schema.json

Comment thread standards/personas/persona.schema.json
Comment thread standards/personas/persona.schema.json
Comment thread standards/personas/persona.schema.json Outdated
@don-petry
don-petry disabled auto-merge July 18, 2026 23:05
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 18, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #782
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-18T23:46:56Z

@don-petry

Copy link
Copy Markdown
Contributor Author

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.
Next attempt after: 2026-07-18T23:46:56Z

@don-petry
don-petry enabled auto-merge (squash) July 18, 2026 23:17

@donpetry-bot donpetry-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.

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] runtime now has required: ["identity"], which is shape-breaking for any existing manifest that already declares a runtime block, while schema_version stays at 1 (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.json is tracked and modified (name-only churn pr-720pr-782, same in package-lock.json) — pre-existing repo quirk from automation, not introduced here.
  • Secret scan: run_secret_scanning MCP 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.

@don-petry
don-petry merged commit f57ac97 into main Jul 18, 2026
24 of 28 checks passed
@don-petry
don-petry deleted the feat/persona-identity-1316 branch July 18, 2026 23:19
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.

4 participants