Conversation
* fix: skip async task manager init on edge * fix: avoid static async task manager import * test: cover edge runtime task scheduling * chore: document edge runtime process.once fix * chore: record edge runtime warning baseline * fix: drop NEXT_PHASE and lazy-init async task manager * test: isolate NEXT_RUNTIME in cloud price sync tests * docs: stabilize edge process.once repro baseline * docs: make rollback instructions hashless * docs: add grep checklist for edge warning audit * chore: run regression gate and align docs * test: cover edge runtime guard on register * Update src/lib/async-task-manager.ts 补充 NEXT_PHASE === "phase-production-build" 检查 Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * chore: format code (fix-edge-runtime-process-once-bee7e19)
* refactor(i18n): split settings json into smaller files * refactor(i18n): load settings from split module * refactor(i18n): remove legacy settings.json * chore(i18n): update sync-settings-keys for split layout * test(i18n): add split settings guards * chore: align biome schema version * chore(i18n): document messages loading contract * chore(i18n): add settings split verification notes * chore: format code (refactor-i18n-split-settings-3f48fec) * chore: fix i18n request formatting * chore: format code (refactor-i18n-split-settings-a1eff62) * fix: replace settings placeholder translations * chore: verify settings sync script is idempotent * test: run i18n settings split guards * test: add audit for zh-CN placeholder settings strings * chore: apply biome formatting * chore: document manual i18n settings verification * fix: translate all providers filter in ja * fix: translate all providers filter in zh-TW * fix: translate providers section copy in zh-TW * fix: translate providers section copy in ja * feat: extend placeholder audit output * feat: add allowlist for placeholder audit * docs: define i18n translation quality rules * chore: add i18n audit fail commands * docs: add i18n PR checklist * chore: format i18n audit tests * fix: translate dashboard placeholders * fix: translate myUsage placeholders * fix: enforce locale-specific parentheses * fix: start translating provider form strings * fix: translate provider form strings * fix: translate provider guide content * test: add ja dashboard parentheses guard * test: add zh-TW dashboard parentheses guard * test: add zh-TW myUsage parentheses guard * chore: translate ja provider form strings * chore: translate zh-TW provider form strings * chore: translate ja providers guide * chore: translate zh-TW providers guide * chore: refine zh-TW dashboard strings * chore: translate ja providers strings * chore: translate zh-TW providers strings * chore: refine zh-TW api test strings * chore: translate zh-TW settings small modules * chore: translate ja settings small modules * chore: clear i18n placeholders in settings * chore: format code (refactor-i18n-split-settings-2437d19) * test: fix biome formatting in i18n test * chore: verify Biome lint gate (I18NE-030) * chore: add messages emoji audit script (I18NE-010) * fix: remove emoji from messages warnings (I18NE-040) * test: add messages no-emoji audit gate (I18NE-050) * docs: add zh-CN i18n docs (I18NE-020) * docs: add messages no-emoji rule (I18NE-060) * chore: run full regression checks (I18NE-070) * docs: add i18n PR evidence template (I18NE-080) * fix: make messages no-emoji audit path-sep safe * docs: add bun alias for messages no-emoji audit * fix: detect keycap and flag emoji sequences in i18n message audits
…rectifier (#594) - Extend detectThinkingSignatureRectifierTrigger to match 'signature: Field required' - Add Rule 72 for friendly error message when signature field is missing - Add comprehensive test cases for the new detection logic This fixes an issue where switching from non-Anthropic to Anthropic channels with thinking blocks missing signature fields would fail without proper handling.
…ni v1beta (#597) - Add OpenAI GPT-5.2 model configuration with reasoningEffort options - Add GPT-5.2-small variant using medium reasoning effort - Fix Gemini baseURL to use /v1beta endpoint - Update i18n strings to reflect different baseURLs per provider
|
Important Review skippedToo many files! 150 files out of 300 files are above the max files limit of 150. You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
Too many files changed for review. ( |
🧪 测试结果
总体结果: ✅ 所有测试通过 |
Summary of ChangesHello @ding113, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant improvements to the application's internationalization infrastructure, enhancing maintainability and consistency across supported languages. It also includes essential database schema adjustments to support new features and addresses a critical build warning related to Edge Runtime compatibility, ensuring a more robust and future-proof system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant updates across several areas, primarily focusing on internationalization (i18n) improvements, database schema migrations, and minor dependency updates. For i18n, new documentation files (CONTRIBUTING.md, docs/i18n-pr-checklist.md, docs/i18n-pr-checklist.zh-CN.md, docs/i18n-pr-evidence-2026-01-11.md, docs/i18n-settings-split.md, docs/i18n-settings-split.zh-CN.md, docs/i18n-translation-quality.md, docs/i18n-translation-quality.zh-CN.md) have been added to establish clear guidelines, checklists, and quality rules (R1-R4, including no-emoji policy) for translations, especially for settings, dashboard, and myUsage sections. The settings message files for English, Japanese, Russian, Simplified Chinese, and Traditional Chinese locales have been refactored from single JSON files to a split directory structure for better organization, and existing translation strings have been updated to remove emojis and standardize formatting. Additionally, a new document (docs/edge-runtime-process-once.md) details a fix for an Edge Runtime process.once build warning by conditionally initializing AsyncTaskManager and dynamically importing it in cloud-price-updater. Database schema changes include modifying provider_group columns in keys and users tables to varchar(200) with a default of 'default', and adding a new boolean column enable_codex_session_id_completion to the system_settings table. Finally, the biome.json schema version has been updated to 2.3.11.
There was a problem hiding this comment.
Code Review Summary
This is a well-structured release PR (v0.4.2) merging 7 PRs from dev to main. The changes include major i18n infrastructure improvements, Edge Runtime compatibility fixes, Codex session management enhancements, and multiple bug fixes. The code quality is high with comprehensive test coverage and proper error handling throughout.
PR Size: XL
- Lines changed: 31,926 (20,747 additions + 11,179 deletions)
- Files changed: 332
Note on PR Size: This is a release PR consolidating multiple feature PRs. The large size is primarily due to:
- i18n file restructuring (85 JSON files split from monolithic settings.json)
- Drizzle migration snapshots (auto-generated, ~4,700 lines)
- Comprehensive test coverage for new features
For future releases, consider smaller, more frequent releases to reduce review complexity.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 0 | 0 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 0 | 0 |
| Tests | 0 | 0 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
Review Highlights
Codex Session Completer (src/app/v1/_lib/codex/session-completer.ts):
- Proper error handling with fallback to UUID v7 when Redis is unavailable
- Race condition handling with NX flag and re-read pattern
- Comprehensive test coverage (414 lines of tests)
AsyncTaskManager Edge Runtime Fix (src/lib/async-task-manager.ts):
- Lazy initialization pattern correctly defers Node.js APIs
- Environment detection properly skips initialization in Edge/CI/build contexts
- 308 lines of dedicated Edge Runtime tests
Cloud Price Updater (src/lib/price-sync/cloud-price-updater.ts):
- Dynamic import pattern prevents static bundling issues
- Proper scheduling flag prevents concurrent trigger race conditions
- Error handling with logging for scheduling failures
Thinking Signature Rectifier (src/app/v1/_lib/proxy/thinking-signature-rectifier.ts):
- Extended detection for "signature: Field required" error pattern
- Reuses existing trigger type for consistent rectification logic
- New error rule (priority 72) with user-friendly message
Model Multi-Select Fix (src/app/[locale]/settings/providers/_components/model-multi-select.tsx):
- Correctly merges availableModels + selectedModels for display
- Ensures custom whitelisted models can be deselected
Review Coverage
- Logic and correctness - Clean
- Security (OWASP Top 10) - Clean
- Error handling - Comprehensive with proper logging
- Type safety - Clean, no
anyabuse - Documentation accuracy - Comments match code behavior
- Test coverage - Adequate (new features have dedicated tests)
- Code clarity - Good
Standards Compliance
- No emoji in code (CLAUDE.md Rule 1)
- i18n for user-facing strings (CLAUDE.md Rule 3)
- Database migrations follow workflow (CLAUDE.md)
Automated review by Claude AI
| @@ -735,6 +735,27 @@ const DEFAULT_ERROR_RULES = [ | |||
| }, | |||
| }, | |||
| }, | |||
| // Issue #xxx: Missing signature field in thinking block | |||
There was a problem hiding this comment.
[MEDIUM] [COMMENT-INCOMPLETE] Placeholder issue reference left in DEFAULT_ERROR_RULES
Why this is a problem: The comment uses a placeholder (Issue #xxx) which isn’t a real reference and will drift immediately, making future debugging/auditing harder.
Suggested fix:
// Missing signature field in thinking block (cross-channel format incompatibility)There was a problem hiding this comment.
Code Review Summary
This is a release-sized PR with an extremely broad surface area (332 files / 31,926 LOC changed), spanning proxy/session behavior, system settings, price sync, and a large i18n/messages update. The breadth materially increases regression risk and makes it hard to validate interactions within a single review.
PR Size: XL
- Lines changed: 31926
- Files changed: 332
- Split suggestions:
- Extract i18n/messages + docs-only changes into a dedicated PR.
- Extract Codex session-id completion (session completer + session guard + system setting + tests) into a focused PR.
- Extract async task manager + cloud price sync changes (and related tests) into a separate PR.
- Extract thinking-signature rectifier + error-rules updates into their own PR.
- Extract provider-group length change (schema/migrations + UI/forms + validation) into a separate PR.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 0 | 0 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 1 | 0 |
| Tests | 0 | 0 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
Critical Issues (Must Fix)
None.
High Priority Issues (Should Fix)
src/repository/error-rules.ts:738[MEDIUM] [COMMENT-INCOMPLETE] Placeholder comment (Issue #xxx) left in production code (Confidence: 90). Replace with a real issue reference or remove.
Review Coverage
- Logic and correctness
- Security (OWASP Top 10)
- Error handling
- Type safety
- Documentation accuracy
- Test coverage
- Code clarity
Automated review by Codex AI
There was a problem hiding this comment.
- Identified the active PR as
#600(dev→main) and applied thesize/XLlabel. gh pr difffailed withHTTP 406because the PR exceeds GitHub’s 300-file diff limit; reviewed via localgit diffbetweenbaseRefOid=88858848...andheadRefOid=464449ec...instead.- Posted 1 inline review comment:
src/repository/error-rules.ts:738[MEDIUM][COMMENT-INCOMPLETE]placeholderIssue #xxxreference (with a concrete replacement suggestion). - Submitted the required review summary on the PR (including XL split suggestions and the issue table).
* feat: auto-complete Codex session identifiers * fix: avoid Codex metadata injection
🧪 测试结果
总体结果: ✅ 所有测试通过 |
Summary
Release v0.4.2 merging 7 PRs from dev to main, including major i18n infrastructure improvements, Edge Runtime compatibility fixes, Codex session management enhancements, and multiple bug fixes.
Related Issues:
signatureinthinkingblock #518 - Invalidsignatureinthinkingblock (extended detection)Release Highlights
🌍 i18n Infrastructure Overhaul (#588)
Major internationalization refactoring with quality gates:
settings.jsonwith modular directory structure (messages/<locale>/settings/**/){count})messages/**/*.jsonfilesdocs/i18n-pr-checklist.md,docs/i18n-settings-split.md, anddocs/i18n-translation-quality.mdwith Chinese versions🔧 Edge Runtime Compatibility (#589)
Fixed Next.js build warnings for Edge Runtime caused by
process.onceusage:AsyncTaskManagerto defer Node.js APIscloud-price-updaterto prevent static bundling🎯 Codex Session Management (#599)
Auto-completion of Codex session identifiers for improved session stickiness:
header.session_id→header.x-session-id→body.prompt_cache_key→body.metadata.session_idenableCodexSessionIdCompletion(default: true)SESSION_TTLenvironment variableChanges by Category
Features
Provider Management
drizzle/0053_watery_madame_hydra.sqlDocumentation
Bug Fixes
Provider UI (#593)
availableModelslist couldn't be deselectedavailableModels+selectedModelsin rendering logicThinking Block Rectifier (#594)
signature: Field requirederror patternDatabase Migrations
This release includes 2 new migrations:
users.provider_groupandkeys.provider_groupfromvarchar(50)tovarchar(200)system_settings.enable_codex_session_id_completion(default: true)Migration Strategy:
AUTO_MIGRATE=true(recommended)bun run db:migrateBreaking Changes
None. This is a backward-compatible release.
Files Changed
Key Affected Areas
messages/*/settings/- Complete restructure from monolithic to modulardrizzle/- Database schema changessrc/lib/async-task-manager.ts- Edge Runtime compatibilitysrc/app/v1/_lib/codex/session-completer.ts- New session completion logicsrc/app/[locale]/settings/providers/- Provider UI fixesdocs/- New i18n documentation and guidelinesTesting
All PRs in this release passed:
bun run lintbun run typecheckbun run test(with targeted coverage ≥80%)bun run build(Edge Runtime warnings eliminated)bun run i18n:audit-placeholders:failandbun run i18n:audit-messages-no-emoji:failUpgrade Notes
For Deployers
bun run db:migrateor setAUTO_MIGRATE=trueSESSION_TTLremains optionalFor Developers
i18n File Structure Changed:
messages/<locale>/settings.json(removed)messages/<locale>/settings/**/insteadnode scripts/sync-settings-keys.jsafter key changesbun run i18n:audit-placeholders:failandbun run i18n:audit-messages-no-emoji:failNew Documentation:
docs/i18n-pr-checklist.mdfor i18n change guidelinesdocs/edge-runtime-process-once.mdfor Edge Runtime compatibility patternsContributors
This release includes contributions from:
Special thanks to the community for reporting issues #590 and #592!
Full PR List
process.once构建告警(AsyncTaskManager 导入链) #589: PR: 修复 Edge Runtime 下process.once构建告警(AsyncTaskManager 导入链)Target Branch:
main(fromdev)Release Version: v0.4.2
Previous Version: v0.4.1 (820b519)
Description generated by Claude AI