You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Write a credential stub at minting; discover installations by JWT #83
Fold back finding 11 on #73: /user/installations fails under real operator credentials, so both live reviewer sessions minted via raw JWT with hand-supplied IDs. identity new already holds the App ID at creation: persist a small credential stub beside the private key under ~/.config/codecrew (slug, app_id, client_id), and teach scripts/codecrew-token to read the stub, mint the JWT, and discover the installation via GET /app/installations — no user-credential API dependence at all; the org and /user lookups remain fallbacks for stubless legacy Apps, and the docs say how to hand-write a stub for an App minted before this change. Tests ride along per #46 for the Go side; the script is smoke-verified by minting a real token.
Requirements
M5-R2
Plan
identity new persists a credential stub beside the key: ~/.config/codecrew/<slug>.json carrying slug, App ID, and client ID — extracted into a writeCredentials helper so the write path is unit-testable; the verb prints both paths.
scripts/codecrew-token resolution order becomes: stub (App ID from the file, JWT minted, installation discovered via GET /app/installations under the App's own JWT — preferring the installation on the current owner, else the only one) → legacy /orgs/{owner}/installations → /user/installations. No user-credential dependence when the stub exists; the error message tells a stubless legacy operator how to hand-write one.
docs/identities.md: the stub in the minting flow and the one-line hand-written stub for Apps minted before this change.
Tests per feat: request review from the reviewer-role holder #46 on the Go side (stub path convention, writeCredentials content and modes); the script is smoke-verified by minting real tokens through both the stub and legacy paths.
Activity
radiusred-cody commentedon Aug 25, 2026
Started by @radiusred-cody[bot].
feat: write a credential stub at minting and discover installations b…
fix: tolerate bad stubs and missing gh auth in codecrew-token (#83)
fix: shape-validate installation lookups against error bodies (#83)
feat: write a credential stub at minting and discover installations b…
fix: tolerate bad stubs and missing gh auth in codecrew-token (#83)
fix: shape-validate installation lookups against error bodies (#83)