Skip to content

fix(eslint): revert apiToken to aPIToken in allowlist - #155

Closed
BillyOutlast wants to merge 207 commits into
developfrom
rebuild
Closed

BillyOutlast wants to merge 207 commits into
developfrom
rebuild

Conversation

@BillyOutlast

Copy link
Copy Markdown
Owner

Summary

Fix regression from commit 2af8edec which incorrectly changed the Prisma delegate name aPITokenapiToken in the no-prisma-delete ESLint rule allowlist.

Root Cause

The Prisma client generates prisma.aPIToken (uppercase P, I) — confirmed by 15 codebase usages and the generated client file at server/prisma/client/models/APIToken.ts. The commit incorrectly "corrected" this to apiToken (all lowercase), causing the allowlist to stop matching → 5 false-positive lint errors across the server codebase.

Changes

File Change
server/rules/no-prisma-delete.ts "apiToken""aPIToken"
server/rules/no-prisma-delete.test.ts "prisma.apiToken""prisma.aPIToken"

Verification

  • pnpm --filter drop lint:fix passes with 0 errors
  • pnpm --filter drop exec vitest run — 31 passed, 1 skipped
  • Pre-commit hooks (lint-staged + typecheck) pass

BillyOutlast and others added 30 commits July 24, 2026 03:52
* ci: add comprehensive CI workflow and SonarCloud configuration

- Add .github/workflows/ci.yml with actionlint validation, typecheck, lint, and test jobs
- Configure for both main and develop branches
- Add sonar-project.properties for SonarCloud analysis
- Set up coverage reporting and file exclusions

* chore: add dev-dependencies for cargo test harness

cli: add tempfile dev-dep
torrential: add tokio-test dev-dep
desktop: no change needed (tempfile already in deps)

* chore: add test dependencies (P1T1, P1T4)

Server: vitest, @nuxt/test-utils, @vue/test-utils, msw, @playwright/test,
@vitest/coverage-v8, happy-dom

Rust: tempfile (cli), tokio-test (torrential)

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: format all Rust crates with cargo fmt (P4T2)

Formatting-only changes across cli, torrential, libraries/native_model,
desktop/src-tauri workspace. No logic changes.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: add .prettierignore to server/ (P4T1)

Exclude node_modules, .nuxt, .output, dist, .data, pnpm-lock.yaml
from prettier formatting.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure vitest workspace (P1T2)

- Add server/vitest.config.ts with @nuxt/test-utils
- Add server/test/setup.ts with msw lifecycle
- Add vitest.workspace.ts at repo root
- Add test, test:watch, coverage scripts to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure Playwright E2E (P1T5)

- Add server/playwright.config.ts with baseURL, retries, webServer
- Add server/test/e2e/.gitkeep placeholder directory
- Add test:e2e script to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add msw mocks for OIDC and metadata (P2T4)

- Add server/test/mocks/oidc.ts with configurable OIDC handlers
- Add server/test/mocks/jwt.ts with test JWT signing/verification
- Add server/test/mocks/metadata.ts with IGDB, Steam, Giantbomb mocks
- Add server/test/mocks/index.ts with setupTestMocks/teardownTestMocks lifecycle

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* ci: add format check to server-ci.yml (P4T3)

- Add format:check step before lint
- Separate format:check from lint:eslint for clarity

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* ci: add stale bot workflow (P5T2)

- Close issues inactive for 90 days
- 14-day warning before closure
- Exempt priority/p0 and priority/p1 labels

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add health endpoint smoke test (P2T1)

- Create GET /api/v1/health endpoint returning { status, timestamp }
- Add smoke test verifying 200 response and shape
- Uses @nuxt/test-utils/e2e for integration testing

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add Rust CLI tests (P2T3)

- Config tests: new, exists, get, get_active, serde roundtrip
- DepotManifest tests: new, append, overwrite, serde roundtrip, variants
- Uses tempfile for test isolation

Note: Tests require libarchive system library to compile.

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure vitest coverage (P3T1)

- Provider: v8
- Reporters: text, lcov
- Reports directory: ./coverage
- Include: server/**/*.ts
- Exclude: test files and directories

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: add pre-commit hooks (P4T4)

- Install husky and lint-staged
- Configure pre-commit hook to run lint-staged
- Lint-staged config: eslint --fix + prettier --write on *.{ts,vue}
- Prettier --write on *.json

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

---------

Co-authored-by: John Smith <you@example.com>
Co-authored-by: BillyOutlast <billy@heretek.dev>
Co-authored-by: Sisyphus <sisyphus@opencode.ai>
John Smith and others added 14 commits July 27, 2026 14:27
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sets llm_extra_body to enable DeepSeek thinking mode with 16k budget
tokens and bumps llm_timeout to 300s for deeper reviews. The previous
empty "{}" caused the API to hang indefinitely.

Co-Authored-By: Claude <noreply@anthropic.com>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai)
Adds pnpm.overrides entries to desktop/main/pnpm-workspace.yaml to lift transitive deps above the vulnerable ranges reported by Dependabot:

- immutable >=5.1.8 (CVE-2026-29063 prototype pollution, CVE-2026-59879 DoS, CVE-2026-59880 hash-collision)

- shell-quote >=1.9.0 (CVE-2026-9277, CVE-2026-13311)

- minimatch 3.x >=3.1.3/4 and 9.x >=9.0.6/7 (CVE-2026-27903, CVE-2026-27904, CVE-2026-26996)

- svgo >=4.0.2 (GHSA-2p49-hgcm-8545)

- ws >=8.21.0 (CVE-2026-48779)

- koa >=2.16.4 (CVE-2026-27959)

- vite >=7.3.5 (CVE-2026-53571)

- esbuild >=0.28.1, @babel/core >=7.29.6, launch-editor >=2.14.1

pnpm audit at desktop/main reports 0 advisories after lockfile regeneration.

Refs #149. Tracked residuals: #150 (5 root-side advisories), #151 (6 Rust advisories).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai)
Updates 11 CI workflows + open-code-review.yml to trigger on the rebuild branch instead of develop:

- ci.yml, cli-ci.yml, codeql.yml, desktop-ci.yml, droplet-ci.yml, e2e.yml, editorconfig-ci.yml, osv-scanner.yml, pages.yml, server-ci.yml: branches filter switched

- ci.yml: sonar-sync github.ref guard updated to refs/heads/rebuild

- open-code-review.yml: PR branches filter switched to [main, rebuild]

Release workflows (server-release, client-release) and stale.yml use workflow_dispatch / schedule and do not pin to a branch — unchanged.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai)
Corrects the Prisma delegate spelling from aPIToken to apiToken and updates the game.delete fixture to reflect the documented hard-delete allowlist.

Fixes the two failing assertions in rules/no-prisma-delete.test.ts from Server CI job 90074871086.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Commit 2af8ede incorrectly changed the Prisma delegate name from
aPIToken (actual property name) to apiToken (wrong case), breaking
the allowlist. All 15 codebase usages use prisma.aPIToken.*.

Fixes 5 false-positive lint errors from drop/no-prisma-delete rule.

@sourcery-ai sourcery-ai 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.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 583

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 29e9bf87-b5d5-4b34-b65b-465e0d0eeedf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rebuild

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

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.

1 participant