Skip to content

fix(cli): distinguish stale CLI from stale running proxy - #3826

Merged
lidge-jun merged 6 commits into
devfrom
codex/axis1-version-guidance
Sep 7, 2026
Merged

fix(cli): distinguish stale CLI from stale running proxy#3826
lidge-jun merged 6 commits into
devfrom
codex/axis1-version-guidance

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Correct the diagnostic residual of #3464: a newer CLI points to restarting the older proxy; an older CLI points to its installation/PATH. Keep non-comparable versions neutral and suppress false doctor match claims. No automatic repair or routing-policy changes.

Related #3464 (broader original request remains open). Reporter garysassano is acknowledged in the commit.

Manual delivery chain: #3825 quota → #3826 CLI version guidance → #3827 recovery diagnostics. This is an integration/review order; the CLI and recovery fixes do not depend on quota at runtime. Parent base: codex/axis1-anthropic-quota. No GitHub native stack registration.

Verification

Final merge proof: Cross-platform CI34074350604 passed all26 jobs at9470fdb1; Service34074351720 passed all3 platform jobs at the same head. All current review threads are resolved. Owner-authorized admin merge will preserve source commits/trailers and compare the resulting dev tree with90a75118402d2f310393bef9ac3e4668cfcbdcfa.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

t and others added 2 commits September 7, 2026 07:36
…lines [skip ci]

Carry and refine #3809: observe each request-bound physical response, preserve probe clocks and model-specific windows, and retain valid multi-day upstream reset deadlines. Preserve credential ownership and skip unprovable observations. Runtime checks are deferred to the final cumulative hosted CI at owner request; no local suite was run.

Co-authored-by: Éverton Toffanetto <evertondgn@hotmail.com>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: b11866f2-ea45-48bc-ba8c-bd1378ed2969

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 66 / 80

이 PR은 CLI와 실행 중 프록시 버전이 다를 때, “누가 낡은지”를 가려 안내하는 #3464 잔여 수정입니다. 기준 dev(137d6a727)의 src/cli/version-skew.ts는 버전이 다르면 항상 “이 PATH의 ocx가 stale이다. 재설치하거나 프록시 쪽 바이너리를 써라”만 말합니다. 실제 #3464 현장처럼 CLI가 더 새롭고 백그라운드 프록시만 옛 빌드인 경우에는 그 말이 반대입니다. 베이스는 codex/axis1-anthropic-quota(#3825)이고, 런타임으로 quota에 의존하지는 않습니다. 머지 순서만 3825 다음입니다.

고친 흐름은 단순합니다. computeVersionSkew가 둘 다 엄격 SemVer로 파싱되면(parseStrictSemver, 이미 dev에 있는 ReDoS-안전한 파서) 순서를 비교합니다. CLI가 더 높으면 “실행 중 프록시가 더 오래됐다. 의도한 설치로 프록시를 재시작하라. 백그라운드면 ocx service repair(restart 별칭)”이라고 합니다. CLI가 더 낮으면 “PATH의 ocx가 더 오래됐다. CLI를 올리거나 PATH를 고쳐라”입니다. 빌드 메타만 다르거나, v접두·공백·잘못된 문자열처럼 비교 불가면 “어느 쪽이 더 옛것인지 확정할 수 없다”로 중립입니다. placeholder(unknown/0.0.0)는 예전처럼 경고를 끄되, 그걸 “일치”로 치켜세우지 않습니다.

doctor 쪽은 isConfirmedVersionMatch를 새로 씁니다. 예전에는 proxyVersion !== null이면 “ok … matches”를 찍을 수 있어, placeholder끼리도 일치처럼 보일 여지가 있었습니다. 이제는 CLI와 프록시 문자열이 같고 placeholder가 아닐 때만 일치 메시지를 냅니다. 자동 수리·라우팅 정책 변경은 없습니다. 진단 문구와 status JSON projection만 바뀝니다.

테스트는 cli-version-skew.test.ts에 방향별 SemVer 순서·중립 케이스·#3464 예시(2.42.0 vs 2.10.1-preview…)가 들어가고, cli-status-json.test.tsdoctor.test.ts가 JSON/사람 출력·doctor 로그까지 같은 문장을 요구합니다. docs lifecycle(영/한/러)에도 안내가 맞춰져 있습니다. 로컬 스위트는 금지 전제이고, 검증은 스택 누적 hosted CI에 맡깁니다.

지금 dev만 놓고 보면 기능 버그라기보다 잘못된 처방전 문제입니다. 그래도 “옛 CLI”라고 단정하면 사용자가 새 CLI를 지우고 프록시는 그대로 두는 反向 조치를 할 수 있어, axis1 진단 체인에 넣을 만합니다. #3464 본이슈의 더 넓은 요청은 열어 두는 전제와 맞습니다.

라인 - src/cli/version-skew.ts compareVersions: core → prerelease(숫자/문자 혼합, 길이 차이) 순으로 SemVer 우선순위를 따르고 build metadata는 무시합니다. raw 문자열 같지 않은데 파서가 둘 다 null이면 중립 분기입니다.

경로/심볼 - isConfirmedVersionMatch: doctor의 “matches the running proxy” 거짓 긍정을 막는 핵심입니다. status JSON의 skewed/warning 스키마는 유지됩니다.

경로/심볼 - parseStrictSemver: 새 의존이 아니라 기존 src/lib/strict-semver.ts 재사용입니다. 길이 상한·식별자 검증이 이미 있어서 버전 문자열 ReDoS 걱정은 낮습니다.

경로/심볼 - 문서의 ocx service repair 안내: 실제 서비스 별칭과 같은지(이미 alias라고 본문에 적힘) 운영 문서와 한 줄만 맞으면 됩니다.

메인테이너의 판단이 필요한 지점

  • #3464를 이 PR만으로 부분 close 할지, 진단 residual로 두고 이슈는 열어둡지(PR 본문은 후자).
  • 비교 불가(build meta·비정상 문자열)일 때 skewed=true + 중립 문구가 좋은지, 아니면 skewed=false로 조용히 할지.
  • fix(anthropic): preserve serving-account quota and upstream reset deadlines #3825 머지 전에 이 브랜치만 cherry-pick 할 필요는 있는지(런타임 비의존이지만 스택 base는 3825).

너의 추천
#3825가 dev에 들어간 뒤 이어서 머지하세요. 동작은 진단만 고치므로 충돌 면적이 작고, doctor/status 거짓 “matches”와 반대 처방전만 고칩니다. #3464는 잔여가 있으면 열어둡니다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun force-pushed the codex/axis1-version-guidance branch 2 times, most recently from 2657179 to 421ab6c Compare September 6, 2026 23:15
@lidge-jun
lidge-jun marked this pull request as ready for review September 7, 2026 00:01
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 7, 2026 00:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T00:04:22.885010Z 421ab6c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…kip ci]

Address #3825 review discussion_r3945728864. Retained standard and model-specific measurements become unknown after their known reset, including idle reads, hydration, persistence and joined failed probes. Reset-only headers cannot renew old usage. Keep unknown-reset behavior, probe clocks, unavailability and credential policy unchanged.

Add real quota-evidence/manual-selection and persistence regressions; no local suites run per maintainer instruction. Original #3809 credit remains in ancestor f215f79.
@lidge-jun
lidge-jun force-pushed the codex/axis1-version-guidance branch from 421ab6c to 4520d45 Compare September 7, 2026 00:15
The attribution/cache tests used July 2026 quota reset dates, which correctly expire under the known-reset fix. Generate future reset dates from one clock snapshot; preserve all existing assertions. Explicit expiry tests retain fixed simulated boundaries. No local suites run.
@lidge-jun
lidge-jun force-pushed the codex/axis1-version-guidance branch from 4520d45 to 090d6df Compare September 7, 2026 00:22
t added 2 commits September 7, 2026 09:44
…sport [skip ci]

Reject unusable custom labels/percentages, omit invalid reset metadata while retaining valid usage, and state the existing 60-second fallback. Guard unexpected test network calls with teardown-safe restoration. No new TTL or synthetic quota values. Addresses #3825 review findings; no local suite was run.
Address the diagnostic residual of #3464. Keep raw mismatch and placeholder behavior, compare valid SemVer precedence, and avoid false doctor match claims. No automatic service repair or request-policy change. Local suites omitted by owner instruction; final cumulative hosted CI pending.

Reported-by: garysassano <10464497+garysassano@users.noreply.github.com>
@lidge-jun
lidge-jun force-pushed the codex/axis1-version-guidance branch from 090d6df to 872f0e5 Compare September 7, 2026 00:44
@lidge-jun
lidge-jun changed the base branch from codex/axis1-anthropic-quota to dev September 7, 2026 02:19
@lidge-jun
lidge-jun merged commit 860baaf into dev Sep 7, 2026
37 of 42 checks passed
@lidge-jun
lidge-jun deleted the codex/axis1-version-guidance branch September 7, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant