Skip to content

ci: coverage, dependabot, stale bot, PR size labeler, ESLint, Semgrep SAST, and Gremlin custom provider#23

Open
silvertakana wants to merge 10 commits into
mainfrom
fix/gremlin-custom-provider
Open

ci: coverage, dependabot, stale bot, PR size labeler, ESLint, Semgrep SAST, and Gremlin custom provider#23
silvertakana wants to merge 10 commits into
mainfrom
fix/gremlin-custom-provider

Conversation

@silvertakana

@silvertakana silvertakana commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Tier 2 CI improvements (coverage, dependabot, stale bot, PR size labeler), ESLint + Semgrep static analysis tooling, and fixes the Gremlin OpenCode fix workflow to use a custom LiteLLM provider via OPENCODE_CONFIG_CONTENT.

Changes

Coverage Reporting

  • Added @vitest/coverage-v8 to devDependencies
  • Updated test job in ci.yml to run vitest --coverage and upload to Codecov

Dependency Management

  • .github/dependabot.yml — Scheduled weekly updates for npm, docker, and GitHub Actions dependencies (minor/patch grouped)

Stale Bot

  • .github/workflows/stale.yml — Marks issues/PRs as stale after 60 days of inactivity, closes after 14 more days. Exempts \good first issue, \help wanted, and \P0-critical\ labels.

PR Size Labeler

  • .github/workflows/size-labeler.yml — Automatically labels PRs as XS/S/M/L/XL based on number of additions (thresholds: 50/500/2000/5000+)

ESLint Flat Config

  • eslint.config.mjs — Modern flat config with @eslint/js + typescript-eslint recommended rules
  • Rules: no-explicit-any (warn), no-unused-vars (warn, ignore ^_), no-console (off) — demoted to warnings to pass CI on first introduction
  • Added \lint\ and \lint:fix\ scripts to package.json
  • Updated ci.yml with a \lint\ job

Semgrep SAST

  • .semgrep/backend-security.yaml — 6 custom rules: command injection, SQL injection (better-sqlite3), hardcoded secrets, path traversal, weak crypto, unsafe deserialization
  • Updated ci.yml with a \semgrep\ job (continue-on-error: true)

Gremlin Custom Provider (existing, updated)

  • Changed model from \deepseek/deepseek-v4-flash\ to \litellm/deepseek-v4-flash\
  • Changed API key env from \DEEPSEEK_API_KEY\ to \OPENAI_API_KEY\ (uses same \LITELLM_API_KEY\ secret)
  • Added \OPENCODE_CONFIG_CONTENT\ defining a custom LiteLLM provider with @ai-sdk/openai-compatible, baseURL \https://llm2.worldwideview.dev/v1\, and model \deepseek-v4-flash\

Housekeeping

  • Added \Dockerfile.dev\ to .gitignore to prevent accidental commits

…WS_AUTH mode

- Added authBypassed flag to track whether authentication was established via
  SKIP_WS_AUTH bypass (no real JWT verification)
- When authBypassed is true, auth messages are accepted for post-welcome JWT
  verification but the connection is never closed on failure
- Valid JWT in bypass mode logs 'Auth verified post-welcome for userId: {sub}'
  and upgrades authBypassed to false
- Invalid JWT in bypass mode logs warning and keeps connection open
- Normal mode (SKIP_WS_AUTH=false) behavior unchanged
- Added websocket-skip-auth.spec.ts with 5 tests covering:
  - Immediate welcome without auth in SKIP_WS_AUTH mode
  - Valid JWT auth post-welcome (logs verified, stays open)
  - Invalid JWT auth post-welcome (logs warning, stays open)
  - Subscribe without auth in SKIP_WS_AUTH mode
  - Re-auth forbidden after JWT upgrade
- All 29 tests pass (4 test files)
- TypeScript build succeeds with no errors
- Switch model from deepseek/deepseek-v4-flash to litellm/deepseek-v4-flash
- Replace DEEPSEEK_API_KEY with OPENAI_API_KEY (same LITELLM_API_KEY secret)
- Add OPENCODE_CONFIG_CONTENT defining litellm provider routing through
  https://llm2.worldwideview.dev/v1
@silvertakana silvertakana changed the title fix: use OPENCODE_CONFIG_CONTENT for LiteLLM custom provider ci: coverage, dependabot, stale bot, PR size labeler, and Gremlin custom provider Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@silvertakana silvertakana changed the title ci: coverage, dependabot, stale bot, PR size labeler, and Gremlin custom provider ci: coverage, dependabot, stale bot, PR size labeler, ESLint, Semgrep SAST, and Gremlin custom provider Jul 6, 2026
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