Skip to content

Remove duplicate lowercase db-apikeys-crud.test.ts from tracking - #3125

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.9from
juandisay:hotfix/remove-duplicate-lowercase
Jun 3, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.9from
juandisay:hotfix/remove-duplicate-lowercase

Conversation

@juandisay

Copy link
Copy Markdown
Contributor

This Pull Request resolves a case-sensitivity issue in the Git index where two files with different casings for the database API Keys unit tests (db-apiKeys-crud.test.ts and db-apikeys-crud.test.ts) were both tracked by Git.

On case-insensitive filesystems (like macOS and Windows), this duplication causes conflicts during Git operations, silent test-file truncation (regression from 542 lines to 188 lines), and prevents changes from being staged.

Root Cause

  • Git is case-sensitive: It tracked both tests/unit/db-apiKeys-crud.test.ts and tests/unit/db-apikeys-crud.test.ts as separate files in the repository history.
  • macOS/Windows filesystem is case-insensitive: The OS maps both paths to the same physical file on disk. During checkouts/resets, Git writes the 542-line version and immediately overwrites it with the 188-line duplicate. This leaves the file modified in the working tree and breaks staging (git add).

Proposed Changes

  • Removed the duplicate lowercase tests/unit/db-apikeys-crud.test.ts (188 lines) from the Git index.
  • Restored the full, correct 542-line version of tests/unit/db-apiKeys-crud.test.ts (with all 54 test cases) as the single tracked path.

Behavior Comparison

Expected Behavior

  1. git status remains clean after resets or checkouts.
  2. Modified file changes to tests/unit/db-apiKeys-crud.test.ts stage successfully using git add.
  3. No silent file overwriting or downgrading of test file sizes.
  4. All 54 unit tests (lifecycles, validation, caching, wildcard matching) run and pass successfully.

Actual Behavior (Before Fix)

  1. git status automatically flagged tests/unit/db-apiKeys-crud.test.ts as modified, even immediately after a git reset --hard.
  2. Staging changes using git add failed silently, leaving the file under "Changes not staged for commit".
  3. macOS silently truncated the test suite on disk, deleting 354 lines of newer tests.
  4. Only 8 unit tests were executed instead of the complete 54.

Steps to Reproduce (on macOS/Windows)

  1. Add both file casings to the Git index:
    echo "console.log('542 lines');" > tmp.js
    git hash-object -w tmp.js | xargs -I {} git update-index --add --cacheinfo 100644 {},tests/unit/db-apiKeys-crud.test.ts
    echo "console.log('188 lines');" > tmp.js
    git hash-object -w tmp.js | xargs -I {} git update-index --add --cacheinfo 100644 {},tests/unit/db-apikeys-crud.test.ts
    rm tmp.js
    

Related Issue

#3123

@juandisay
juandisay requested a review from diegosouzapw as a code owner June 3, 2026 19:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes a test file that verified the functionality of the API keys database, including key creation, permission updates, validation, and model access rules. As there are no review comments, I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.9 June 3, 2026 21:01
This hotfix's purpose is removing the duplicate lowercase db-apikeys-crud.test.ts.
The 127.0.0.1 -> localhost OAuth redirect change is unrelated and reverses a
documented decision (Google native-app handoff prefers loopback IP; localhost can
resolve to ::1 and hit firewall/name-resolution edge cases). Keeping only the
test-file removal.
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks, @juandisay! 🙏 Good catch on the case-insensitive collision — db-apikeys-crud.test.ts (lowercase) was a stale duplicate of the canonical db-apiKeys-crud.test.ts (which keeps all 54 tests), so removing it from tracking is correct with no coverage loss. I reverted the unrelated OAuthModal.tsx redirect change (127.0.0.1 → localhost) so this stays a focused cleanup — that loopback-IP choice is deliberate for Google's native-app handoff. Merged into release/v3.8.9.

@diegosouzapw
diegosouzapw merged commit 656e73e into diegosouzapw:release/v3.8.9 Jun 3, 2026
2 checks passed
@kilo-code-bot

kilo-code-bot Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
tests/unit/db-apikeys-crud.test.ts (deleted file) Deletion of test file may reduce test coverage for API key features such as allowedCombos, allowedConnections, maxRequestsPerDay, maxRequestsPerMinute, throttleDelayMs, streamDefaultMode, malformed schedule payload handling, and clearing scopes to empty. Ensure remaining tests (tests/unit/db-apiKeys-crud.test.ts) cover these scenarios or add new tests.
Files Reviewed (1 files)
  • tests/unit/db-apikeys-crud.test.ts

Reviewed by nemotron-3-super-120b-a12b-20230311:free · 581,157 tokens

@diegosouzapw diegosouzapw mentioned this pull request Jun 3, 2026
diegosouzapw added a commit that referenced this pull request Jun 3, 2026
…ors hall

Adds entries for #3097, #3101 (deepseek-web #2942/#2820), #3104, #3105, #3107,
#3109, #3111, #3113, #3115, #3122, #3125, #3127, #3129, plus a Contributors
section crediting all v3.8.9 contributors. Stamps the 3.8.9 release date.
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…gosouzapw#3125)

* remove duplicate lowercase db-apikeys-crud.test.ts from tracking

* Changed redirecURI for google OAuth

* revert: keep Google OAuth redirect on 127.0.0.1 (out-of-scope change)

This hotfix's purpose is removing the duplicate lowercase db-apikeys-crud.test.ts.
The 127.0.0.1 -> localhost OAuth redirect change is unrelated and reverses a
documented decision (Google native-app handoff prefers loopback IP; localhost can
resolve to ::1 and hit firewall/name-resolution edge cases). Keeping only the
test-file removal.

---------

Co-authored-by: juandisay <juandisay@example.com>
Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
…gosouzapw#3125)

* remove duplicate lowercase db-apikeys-crud.test.ts from tracking

* Changed redirecURI for google OAuth

* revert: keep Google OAuth redirect on 127.0.0.1 (out-of-scope change)

This hotfix's purpose is removing the duplicate lowercase db-apikeys-crud.test.ts.
The 127.0.0.1 -> localhost OAuth redirect change is unrelated and reverses a
documented decision (Google native-app handoff prefers loopback IP; localhost can
resolve to ::1 and hit firewall/name-resolution edge cases). Keeping only the
test-file removal.

---------

Co-authored-by: juandisay <juandisay@example.com>
Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…gosouzapw#3125)

* remove duplicate lowercase db-apikeys-crud.test.ts from tracking

* Changed redirecURI for google OAuth

* revert: keep Google OAuth redirect on 127.0.0.1 (out-of-scope change)

This hotfix's purpose is removing the duplicate lowercase db-apikeys-crud.test.ts.
The 127.0.0.1 -> localhost OAuth redirect change is unrelated and reverses a
documented decision (Google native-app handoff prefers loopback IP; localhost can
resolve to ::1 and hit firewall/name-resolution edge cases). Keeping only the
test-file removal.

---------

Co-authored-by: juandisay <juandisay@example.com>
Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants