Skip to content

docs(requirements): per-user GitHub PAT requirements entry (#1711) - #1726

Merged
vybe merged 1 commit into
devfrom
docs/1711-per-user-pat-requirements
Jul 22, 2026
Merged

vybe merged 1 commit into
devfrom
docs/1711-per-user-pat-requirements

Conversation

@dolho

@dolho dolho commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

#1711 — per-user GitHub PAT requirements entry

Per-user GitHub credentials (ent#162, shipped in the v0.8.5 payload) were documented only as architecture prose. RoE §1 requires the relevant requirements/ area file for a new capability — most of all a stored user credential. Docs-only.

What's added — grounded in the code, not paraphrased

  • requirements/github.md §11.10 — the full capability:
    • Who sets it: self-service, owner-only (GET/PUT/DELETE /api/users/me/github-pat), honest validation (GitHub-rejected → 400, unreachable → 503).
    • Three-tier CREATE ladder (resolve_github_pat): per-agent → owner's per-user (live) → global, keyed on ownership only (a sharee can't inject their PAT).
    • Persist carve-out: per_agent/per_user persist as the feat: Per-agent GitHub PAT configuration #347 per-agent PAT; global NEVER does — a global-fallback agent keeps github_pat_encrypted NULL so PAT-propagation still reaches it on admin rotation (ent#162 Decision 2).
    • Recreate/restart ladder (get_github_pat_for_agent) stays 2-tier (per-agent → global) and never re-derives per-user — so adding a personal token can't force-recreate a running agent.
    • Never echoed on read (standing requirement); AES-256-GCM under Invariant fix: Add ARM64 Alpine compatibility for frontend Docker build #12.
  • requirements/security.md §20.9 — the credential-storage-half cross-reference pointing at §11.10.

AC coverage

All seven boxes: capability + who + storage guarantee ✅ · three-tier order ✅ · persist carve-out (NULL for global) ✅ · recreate ladder distinguished ✅ · Invariant #12 + column listed ✅ (already in architecture.md) · never-echoed as a requirement ✅ · security.md cross-reference ✅.

Docs-only — no code/test change, safe to land during the v0.8.5 soak.

Related to #1711 · ent#162

🤖 Generated with Claude Code

Per-user GitHub credentials (ent#162) shipped in the v0.8.5 payload documented
only as architecture prose. RoE §1 requires the relevant requirements/ area file
updated for a new capability — most of all for a stored user credential.

- requirements/github.md §11.10 — the full capability: what it is + who sets it
  (self-service, owner-only 3 endpoints), the storage guarantee, and the
  load-bearing distinctions:
  * three-tier CREATE ladder (per-agent → owner's per-user LIVE → global) with
    tier provenance from resolve_github_pat;
  * persist carve-out — per_agent/per_user persist as the #347 per-agent PAT,
    global NEVER does, so a global-fallback agent keeps github_pat_encrypted NULL
    and PAT-propagation still reaches it on admin rotation (ent#162 Decision 2);
  * recreate/restart ladder stays 2-tier (per-agent → global) via
    get_github_pat_for_agent and never re-derives the per-user tier — so adding a
    personal token can't force-recreate a running agent;
  * never echoed on read (standing requirement, not just behavior);
  * AES-256-GCM envelope under Invariant #12 (column already listed there).
- requirements/security.md §20.9 — the credential-storage-half cross-reference
  (stored user credential, Invariant #12, never-echoed, ownership-keyed) pointing
  at github.md §11.10 for the resolution mechanics.

Grounded in the code (settings_service.resolve_github_pat /
get_github_pat_for_agent, routers/users.py /me/github-pat), not paraphrased.
Docs-only — no code/test change, safe during the v0.8.5 soak.

Related to #1711 · ent#162
Co-Authored-By: Claude Opus 4.8 <[email protected]>

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

Validated via /validate-pr: required checks green, security scan clean, scope focused.

@vybe
vybe merged commit bc90357 into dev Jul 22, 2026
22 checks passed
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.

2 participants