Skip to content

[WRONG BRANCH] fix(claude): preserve escaped v1 aliases - #238

Closed
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-v1-alias-resolution-issue
Closed

[WRONG BRANCH] fix(claude): preserve escaped v1 aliases#238
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-v1-alias-resolution-issue

Conversation

@luvs01

@luvs01 luvs01 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Motivation

  • A recent change migrated slash/tilde-containing model ids to a v2 alias prefix but made existing v1 aliases decode literally, breaking the stability contract for persisted Claude Code picker selections that were previously emitted as escaped v1 aliases.
  • The intent is to restore backward-compatible decoding so v1 aliases minted by older releases continue to resolve to the same routed model strings while keeping newly minted escaped aliases under v2.

Description

  • Reworked resolveAlias in src/claude/alias.ts so v1 aliases now expand historical ~s/~t escapes (using the existing escape decoder) and v2 remains the canonical write form for model ids that need escaping.
  • Kept v2 write behavior for models containing / or ~ (aliases now mint under claude-ocx2-...) while ensuring v1 inputs that contain the legacy escape sequences continue to decode to their original routed model.
  • Updated tests/claude-alias.test.ts to add/adjust regression assertions that validate v1 compatibility decoding and v2 round-trips for slash/tilde models.
  • Updated the Claude Code docs and localized copies in docs-site/src/content/docs/.../claude-code.md to reflect that v1 decoding remains supported for historical escaped aliases and that new escaped aliases are issued under v2.

Testing

  • Ran bun run typecheck and the full test suite via bun run test, and the full suite passed with the updated behavior.
  • Ran the focused alias tests and the updated tests/claude-alias.test.ts as part of the suite; assertions for both v1 compatibility and v2 escaping passed.
  • Ran bun run privacy:scan which passed.
  • Attempted cd docs-site && bun install --frozen-lockfile && bun run build but the documentation install/build could not complete in this environment due to external registry 403 errors, so the site build was not executed here.

Codex Task

Summary by CodeRabbit

  • Bug Fixes

    • Improved model alias decoding for escaped characters across v1 and v2 aliases.
    • Preserved compatibility with v1 aliases saved by earlier releases.
    • Correctly handles escaped slashes and tildes without changing other alias fallback behavior.
  • Documentation

    • Updated Claude Code alias documentation across supported languages to reflect the decoding and compatibility rules.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Alias decoding now expands ~s and ~t for v1 and v2 aliases. Compatibility tests cover historical v1 aliases and v2 round trips. Claude Code guides were updated in five languages.

Changes

Alias decoding

Layer / File(s) Summary
Alias resolution and compatibility tests
src/claude/alias.ts, tests/claude-alias.test.ts
V1 alias resolution decodes historical ~s and ~t sequences. Tests cover v1 compatibility and v2 handling of slashes and tildes.
Localized alias behavior documentation
docs-site/src/content/docs/guides/claude-code.md, docs-site/src/content/docs/{ja,ko,ru,zh-cn}/guides/claude-code.md
The guides describe escape expansion for v1 and v2 aliases and compatibility with persisted v1 aliases.

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

Suggested reviewers: lidge-jun, wibias

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Claude alias compatibility fix for escaped v1 aliases, which matches the primary change.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-v1-alias-resolution-issue

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot changed the title fix(claude): preserve escaped v1 aliases [WRONG BRANCH] fix(claude): preserve escaped v1 aliases Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 10, 2026 02:59

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35e34c5a60

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/claude/alias.ts
@luvs01 luvs01 closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant