Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/scripts/check-case-collisions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { execSync } from 'child_process';
import path from 'path';

const REPO_ROOT = path.resolve(__dirname, '..', '..');

function getTrackedPaths(): string[] {
const output = execSync('git ls-files', {
cwd: REPO_ROOT,
encoding: 'utf-8',
});
return output.split('\n').filter((line) => line.length > 0);
}

function findCaseCollisions(paths: string[]): string[][] {
const byLowerCasePath = new Map<string, string[]>();

for (const filePath of paths) {
const key = filePath.toLowerCase();
const group = byLowerCasePath.get(key);
if (group) {
group.push(filePath);
} else {
byLowerCasePath.set(key, [filePath]);
}
}

return [...byLowerCasePath.values()].filter((group) => group.length > 1);
}

function main(): void {
const paths = getTrackedPaths();
const collisions = findCaseCollisions(paths);

if (collisions.length > 0) {
console.error(
`Found ${collisions.length} path(s) that collide when compared case-insensitively:\n`,
);
for (const group of collisions) {
console.error(` - ${group.join('\n - ')}`);
}
console.error(
'\nTracked paths that differ only by letter case break `git clone`/`git checkout` on ' +
'case-insensitive filesystems (macOS, Windows) and can make CI (Linux, case-sensitive) ' +
'silently ship duplicate or divergent records for the same file. Rename or remove one ' +
'path from each group above so every tracked path is unique case-insensitively.',
);
process.exit(1);
}

console.log(`Checked ${paths.length} tracked paths, no case collisions found.`);
}

main();
19 changes: 19 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,22 @@ jobs:
- name: Run validation
run: ./.github/test/validate.sh

check-case-collisions:
name: Check for case-colliding paths
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm ci

- name: Run check
run: npm run check:case-collisions

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"validate": "./.github/test/validate.sh",
"check:case-collisions": "ts-node --project .github/scripts/tsconfig.json .github/scripts/check-case-collisions.ts",
"generate:types": "ts-node --project .github/scripts/tsconfig.json .github/scripts/generate-types.ts",
"build:json": "ts-node --project .github/scripts/tsconfig.json .github/scripts/build-unified-json.ts",
"lint:yaml": "yamllint -c .yamllint.yml providers/",
Expand Down
3 changes: 0 additions & 3 deletions providers/together-ai/salesforce/Llama-Rank-V1.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions providers/wafer/DeepSeek-V4-Pro.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions providers/wafer/deepseek-v4-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ features:
- function_calling
limits:
context_window: 1000000
modalities:
input:
- text
output:
- text
mode: chat
model: deepseek-v4-pro
params:
Expand Down