Fix auth.json decoding for mixed provider schemas#69
Merged
Conversation
Member
Author
|
@opgginc/op-gg-ai-devops |
Contributor
✅ AI Code Review CompletedReview finished. Check the PR for inline comments. 📋 View Logs | 🤖 Model: |
Contributor
There was a problem hiding this comment.
🤖 OP.GG DevOps AI Code Review
Summary
- auth.json lossy 디코딩 때문에 스키마가 완전히 깨진 파일도 "성공"으로 처리되어 이후 경로 fallback이 막힐 수 있음. 아래 inline 제안처럼 최소 1개 유효 토큰 없으면 디코딩 실패로 처리하는 게 안전함.
- 나머지 변경(영문화, 테스트 추가)은 별도 이슈 없음.
CI/CD Status
- CI: 진행 중 (CI). Lint/Test/Build는 성공.
Local Verification
npm installmake lint-actions- 미실행: SwiftLint/빌드/테스트 (Xcode 프로젝트/Package.swift 미확인)
이 PR에 새 커밋이 push되면 봇이 전체 PR을 자동 재리뷰함. PR 코멘트에서 @opgginc/op-gg-ai-devops 멘션해도 재리뷰함. 예시: @opgginc/op-gg-ai-devops auth.json fallback 검증 다시 확인, @opgginc/op-gg-ai-devops 토큰 디코딩 케이스 테스트 추가 확인, @opgginc/op-gg-ai-devops 문서 영문화 누락 확인
Co-authored-by: op-gg-ai-devops[bot] <255644809+op-gg-ai-devops[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #64.
Problem
OpenCode Bar reads OpenCode's
auth.jsonand decodes it intoOpenCodeAuth.If any single provider entry has an unexpected schema (different object shape, string instead of object, numeric fields as strings, etc.), decoding fails for the entire file. This shows up as
[auth.json] PARSE FAILEDeven when the file exists and other providers are configured.Root Cause
OpenCodeAuthdecoding was strict: a decoding error for one key (for exampleopenaioropenrouter) threw out the wholeOpenCodeAuthdecode.Fix
expiresacceptsInt64,Int,Double, orString.accountIdaccepts aStringor a number.key,access,token,apiKey,value.Notes
Checks
make lintxcodebuild build -scheme CopilotMonitor -configuration Debugxcodebuild build -scheme CopilotMonitor -configuration Release