Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<img src="https://img.shields.io/badge/Storage-IndexedDB_v8-F59E0B" alt="IndexedDB v8">
<img src="https://img.shields.io/badge/PWA-v3.0-5BB974?logo=pwa" alt="PWA v3.0">
<img src="https://img.shields.io/badge/i18n-19_locales-2925_keys-0EA5E9" alt="i18n 19 locales — 2925 keys">
<img src="https://img.shields.io/badge/Tests-7205%2B_%2F_589_files-22C55E" alt="7205+ tests / 589 files">
<img src="https://img.shields.io/badge/Tests-7217%2B_%2F_589_files-22C55E" alt="7217+ tests / 589 files">
<img src="https://img.shields.io/codecov/c/github/qnbs/WorldScript-Studio?logo=codecov&label=Coverage" alt="Codecov Coverage">
<img src="https://img.shields.io/badge/License-MIT-22C55E" alt="License MIT">
<img src="https://img.shields.io/github/actions/workflow/status/qnbs/WorldScript-Studio/.github/workflows/ci.yml?branch=main&logo=github" alt="CI Status">
Expand Down Expand Up @@ -511,7 +511,7 @@ The Settings → AI panel shows a live GPU status badge with adapter details and
| **Document Export** | docx + jszip | Word-compatible `.docx` generation (lazy-loaded) |
| **PWA** | Service Worker + Web App Manifest v3 | Offline support, installability, Workbox chunking |
| **i18n** | Custom React Context (`I18nContext.tsx`) | 2925 keys × 19 locales (de/en/es/fr/it + ar/he/fa RTL Beta + ja/zh/pt/el/fi/sv/hu/is/eu/ru/ko Beta); EN fallback; `localStorage` persistence |
| **Testing** | Vitest 4.x (7205+ tests / 589 files) + Playwright E2E | Unit/integration + cross-browser E2E; Stryker mutation (manual workflow) |
| **Testing** | Vitest 4.x (7217+ tests / 589 files) + Playwright E2E | Unit/integration + cross-browser E2E; Stryker mutation (manual workflow) |
| **Code Quality** | Biome (lint + format) + TypeScript 7 (tsgo) strict | `--error-on-warnings` in CI; zero `any` policy |
| **Visualization** | Force-directed graph | Interactive character relationship network |
| **Desktop** | Tauri v2 | Cross-platform installer; auto-updater via `latest.json` |
Expand Down Expand Up @@ -549,7 +549,7 @@ WorldScript-Studio/
│ ├── sw.js # PWA Service Worker
│ └── manifest.json # PWA Web App Manifest v3
├── tests/
│ ├── unit/ # Vitest unit tests (7205+ tests, 589 files) — count spans tests/, components/, packages/*/tests/, not just this folder
│ ├── unit/ # Vitest unit tests (7217+ tests, 589 files) — count spans tests/, components/, packages/*/tests/, not just this folder
│ │ ├── ai/ # aiSmallModules, aiCoreFallbackPaths
│ │ └── settings/ # WebLlmPanel, AiSections
│ └── e2e/ # Playwright specs + helpers.ts
Expand Down Expand Up @@ -711,7 +711,7 @@ The main pipeline is [`.github/workflows/ci.yml`](.github/workflows/ci.yml). Opt
| `scorecard` | weekly + `main` push | OpenSSF Scorecard — SARIF uploaded to GitHub Code Scanning |

**Current test metrics (2026-08-27, source-synchronized; CI remains authoritative for pass/fail):**
- **7205+ unit tests** across **589 test files** — CI is authoritative for pass/fail
- **7217+ unit tests** across **589 test files** — CI is authoritative for pass/fail
- Coverage thresholds: lines ≥ 80 · branches ≥ 66 · functions ≥ 72 · statements ≥ 78 — enforced in CI (see Codecov badge for live metrics)
- i18n: **2925 keys × 19 locales** (en/de/fr/es/it + ar/he/fa RTL Beta + ja/zh/pt/el/fi/sv/hu/is/eu/ru/ko Beta)

Expand Down
54 changes: 54 additions & 0 deletions config/pr-size-exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schemaVersion": 1,
"exceptions": [
{
"id": "pr-539-dual-graph-report-regeneration",
"repository": "qnbs/WorldScript-Studio",
"prNumber": 539,
"baseRef": "main",
"headRef": "chore/dual-graph-solo-local-optimization",
"maxFiles": 30,
"maxCommits": 15,
"maxNonExemptMeaningfulLines": 3000,
"supplementalLineAllowances": [
{
"path": "graphify-out/GRAPH_REPORT.md",
"maxMeaningfulLines": 5050
},
{
"path": ".codegraph/CODEGRAPH_REPORT.md",
"maxMeaningfulLines": 150
}
],
"allowedPaths": [
".codegraph/CODEGRAPH_REPORT.md",
".gitignore",
".graphifyignore",
".vscode/tasks.json",
"AUDIT.md",
"CLAUDE.md",
"README.md",
"config/graph-tools-versions.json",
"docs/codegraph.md",
"docs/dual-graph-setup.md",
"docs/graphify.md",
"graphify-out/GRAPH_REPORT.md",
"package.json",
"scripts/codegraph-bootstrap.mjs",
"scripts/codegraph-report.d.mts",
"scripts/codegraph-report.mjs",
"scripts/dual-graph-update.mjs",
"scripts/graphSourceFingerprint.d.mts",
"scripts/graphSourceFingerprint.mjs",
"scripts/graphify-bootstrap.mjs",
"scripts/graphify-report.mjs",
"scripts/graphs-cli.mjs",
"scripts/pre-commit-codegraph.mjs",
"tests/unit/scripts/codegraphReport.test.ts",
"tests/unit/scripts/graphSourceFingerprint.test.ts",
"turbo.json"
],
"reason": "One-time deterministic replacement of stale committed graph reports; executable tooling remains governed by the ordinary absolute meaningful-line ceiling."
}
]
}
43 changes: 43 additions & 0 deletions scripts/check-pr-size.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export interface GitDependencies {
args: string[],
options: { encoding: 'utf8' },
) => { status: number | null; stdout: string; stderr: string; error?: Error };
readFileSync?: (path: string, encoding: 'utf8') => string;
existsSync?: (path: string) => boolean;
writeFileSync?: (path: string, content: string) => void;
unlinkSync?: (path: string) => void;
env?: NodeJS.ProcessEnv;
}

export function getChangedFilesNumstat(
Expand All @@ -28,6 +33,35 @@ export function parseNumstat(numstatOutput: string): NumstatRow[];

export function computeMeaningfulLines(rows: NumstatRow[]): number;

export interface SupplementalLineAllowance {
path: string;
maxMeaningfulLines: number;
}

export interface PrSizeException {
id: string;
repository: string;
prNumber: number;
baseRef: string;
headRef: string;
maxFiles: number;
maxCommits: number;
maxNonExemptMeaningfulLines: number;
supplementalLineAllowances: SupplementalLineAllowance[];
allowedPaths: string[];
reason: string;
}

export function computeNonExemptMeaningfulLines(
rows: NumstatRow[],
exception?: PrSizeException,
): number;

export function computeSupplementalReportLines(
rows: NumstatRow[],
exception: PrSizeException,
): Record<string, number>;

export function computeGovernedFileCount(rows: NumstatRow[]): number;

export function isAllDocs(rows: NumstatRow[]): boolean;
Expand Down Expand Up @@ -70,6 +104,15 @@ export interface PrSizeEvaluation {
lineCount?: number;
commitCount?: number;
allDocs?: boolean;
nonExemptLineCount?: number;
supplementalReportLines?: Record<string, number>;
exception?: {
applied: boolean;
id?: string;
identityMatch: boolean;
pathScopeMatch: boolean;
baseGoverned: boolean;
};
severity?: SizeSeverity;
report?: string;
}
Expand Down
Loading
Loading