diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8413f9db..150e68d9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -48,9 +48,9 @@ jobs: - language: go build-mode: autobuild - language: javascript-typescript - build-mode: autobuild + build-mode: none - language: rust - build-mode: autobuild + build-mode: none # No Swift project in repo — remove entry. Re-add when Swift files need analysis. # - language: swift # build-mode: autobuild diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml index 48838610..95fb9de7 100644 --- a/.github/workflows/osv-scanner.yml +++ b/.github/workflows/osv-scanner.yml @@ -11,13 +11,16 @@ on: branches: ["develop"] permissions: - security-events: write contents: read jobs: scan-scheduled: if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} runs-on: ubuntu-latest + permissions: + actions: read + security-events: write + contents: read steps: - name: Checkout uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 @@ -31,10 +34,20 @@ jobs: -r --skip-git ./ + --output=osv-scanner-results.sarif + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@adfda868f108ac4222129de456ea554034a27db7 # v4 + with: + sarif_file: osv-scanner-results.sarif scan-pr: if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} - uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.3.8" + permissions: + actions: read + contents: read + security-events: write + uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@9a498708959aeaef5ef730655706c5a1df1edbc2" # v2.3.8 with: scan-args: |- -r diff --git a/AGENTS.md b/AGENTS.md index c0b95cf7..131ccf7f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -99,6 +99,7 @@ cargo clippy --all-targets --all-features -- -D warnings ## Pre-commit Hooks (ACTUAL BEHAVIOR) + ## Fallow local gate Before any `git commit` or `git push`, run `fallow audit --format json --quiet --explain --gate-marker agent`. If the verdict is `fail`, fix the reported findings before retrying. Treat JSON runtime errors like `{ "error": true, ... }` as non-blocking. @@ -109,20 +110,21 @@ For non-skill agents, treat the task map below as the local onboarding source: r ## Fallow task map -| When the agent is about to... | Run | -|---|---| -| delete an "unused" export or file | `fallow dead-code --trace :` | -| delete an "unused" dependency | `fallow dead-code --trace-dependency ` | -| commit or open a PR | `fallow audit --base ` | -| prioritize refactoring | `fallow health --hotspots --targets` | -| ask who owns code | `fallow health --ownership` | -| check untested-but-reachable code | `fallow health --coverage-gaps` | -| consolidate duplication | `fallow dupes --trace dup:` | -| find feature flags | `fallow flags` | -| check which architecture rules apply to a file before changing it | `fallow guard ` | -| surface security candidates | `fallow security` | -| understand a finding | `fallow explain ` | -| scope a monorepo | `--workspace / --changed-workspaces ` (global flags, prefix any command) | +| When the agent is about to... | Run | +| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| delete an "unused" export or file | `fallow dead-code --trace :` | +| delete an "unused" dependency | `fallow dead-code --trace-dependency ` | +| commit or open a PR | `fallow audit --base ` | +| prioritize refactoring | `fallow health --hotspots --targets` | +| ask who owns code | `fallow health --ownership` | +| check untested-but-reachable code | `fallow health --coverage-gaps` | +| consolidate duplication | `fallow dupes --trace dup:` | +| find feature flags | `fallow flags` | +| check which architecture rules apply to a file before changing it | `fallow guard ` | +| surface security candidates | `fallow security` | +| understand a finding | `fallow explain ` | +| scope a monorepo | `--workspace / --changed-workspaces ` (global flags, prefix any command) | + - `.husky/pre-commit` (root, ACTIVE): runs `pnpm --filter drop lint-staged && pnpm --filter drop typecheck` @@ -169,16 +171,43 @@ Coverage 1.17% lines / 2.09% funcs (server, no gates). See `docs/coverage-baseli Bugs caught during this sequence: `prioritylist.ts:34` (`a.priority == a.priority`); `database/Cargo.toml` missing `serde/derive` (53 errs); `cli/` binary-only, no `lib.rs`. +## GitHub Issues & SonarCloud + +**Repo**: `BillyOutlast/drop` (fork). Upstream is `Drop-OSS/drop`. Always use `--repo BillyOutlast/drop` for issues/PRs. + +**Checking SonarCloud issues:** + +```bash +gh issue list --repo BillyOutlast/drop --label sonarcloud --state open +``` + +**SonarCloud project key**: `BillyOutlast_drop`. Use MCP sonarqube tools to query issues directly: + +```text +search_sonar_issues_in_projects(projects=["BillyOutlast_drop"], issueStatuses=["OPEN"]) +``` + +**Issue labels**: `sonarcloud`, `critical`, `major`, `minor`, `a11y`, `security`, `vue`, `react`, `readability`, `performance`, `code-quality`, `refactoring` + +**Working SonarCloud issues:** + +1. List issues: `gh issue list --repo BillyOutlast/drop --label sonarcloud --state open` +2. Fix issues in code, referencing the SonarCloud rule and file:line +3. Link fixed issues in PR body with `Closes #N` syntax +4. One PR can close multiple related issues (e.g., all `:key` binding fixes in one PR) + +**Creating issues**: Use `gh issue create --repo BillyOutlast/drop --label sonarcloud` for new findings. + ## Deferred Work Backlog (2026-07-24) -Captured at PR #22 (https://github.com/BillyOutlast/drop/pull/22) close-out. Repo issues disabled — document here instead of filing GitHub issues. **Re-evaluate when coverage >30% or as bandwidth allows.** +Captured at PR #22 (https://github.com/BillyOutlast/drop/pull/22) close-out. **Re-evaluate when coverage >30% or as bandwidth allows.** | Item | Trigger | Why deferred | | ---------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Codecov test-results reporting | Coverage >30% | JUnit analytics produce zero signal at 32 tests. Use `codecov-action@v5` with `report_type: test_results` (NOT `codecov/test-results-action@v1` which is DEPRECATED). | | `.codecov.yml` with `target: auto` | Coverage >30% | At 1.17% baseline, ANY new uncovered code drops percentage and blocks every PR. Contradicts current "no gates" policy. | | gitleaks-action v2→v3 migration | Pre-Sept 2026 | v2 uses Node 20; GitHub deprecates Node 20 default in Sept 2026. Also unlocks v3's native fork-PR base-SHA resolution. | -| SonarCloud C rating fix | Needs SonarCloud auth | Cannot view findings via GitHub API. Likely test-only noise (90% of PR #22 is test code). | +| SonarCloud C rating fix | Ongoing | 130 open issues tracked via GitHub labels. Use `gh issue list --repo BillyOutlast/drop --label sonarcloud` to query. Fix batches by category (a11y, vue, react, code-quality). | | `noUncheckedIndexedAccess` enable | After latent-error fixup | 30+ latent TS errors in `server/api/v1/{admin/import/massversion, auth/mfa/webauthn, auth/passkey}/`, `server/internal/{auth/totp, clients/event-handler, metadata/pcgamingwiki, system-data/index, utils/prioritylist}.ts`. Each requires explicit `if (!arr[i]) return` guard. | | CLI integration tests refactor | Post lib.rs unblock | `cli/tests/*.rs` now compile (commit 35b63960), but real coverage of `commands/upload/` and `commands/connect/` flows needs fixture data setup. | | E2E user-flow data fixtures | Post test DB infra | 5 page-flow E2E tests were added then removed in PR #22: they return 500 in CI because the app needs DB + auth setup to render pages. The tailwindcss v4 vite plugin recursion is fixed (`E2E=true` guard in `server/nuxt.config.ts`), but the application itself can't render without services. Re-add page tests when test DB + auth fixtures are available. | @@ -203,12 +232,14 @@ This file is a cache. Before trusting any fact, verify with a direct command: When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge. How to use skills: + - Invoke: `npx openskills read ` (run in your shell) - For multiple: `npx openskills read skill-one,skill-two` - The skill content will load with detailed instructions on how to complete the task - Base directory provided in output for resolving bundled resources (references/, scripts/, assets/) Usage notes: + - Only use skills listed in below - Do not invoke a skill that is already loaded in your context - Each skill invocation is stateless diff --git a/desktop/main/components/Header.vue b/desktop/main/components/Header.vue index 7af7cd23..8b8e1223 100644 --- a/desktop/main/components/Header.vue +++ b/desktop/main/components/Header.vue @@ -9,6 +9,7 @@
    window.startDragging()" - class="flex cursor-pointer grow h-full" - /> +
      -
    1. - +
    2. +
    3. @@ -43,7 +38,7 @@
    - + diff --git a/desktop/main/components/HeaderUserWidget.vue b/desktop/main/components/HeaderUserWidget.vue index d3d16424..f498e2e2 100644 --- a/desktop/main/components/HeaderUserWidget.vue +++ b/desktop/main/components/HeaderUserWidget.vue @@ -45,7 +45,7 @@ Admin Dashboard - + diff --git a/server/components/CodeInput.vue b/server/components/CodeInput.vue index b31782a9..80ae4e73 100644 --- a/server/components/CodeInput.vue +++ b/server/components/CodeInput.vue @@ -51,7 +51,7 @@ function input(index: number) { codeElements.value[index + 1].focus(); } - if (!(index - 1 < 0) && !v) { + if (index >= 1 && !v) { codeElements.value[index - 1].focus(); } diff --git a/server/components/GameEditor/Metadata.vue b/server/components/GameEditor/Metadata.vue index af857476..e5804afe 100644 --- a/server/components/GameEditor/Metadata.vue +++ b/server/components/GameEditor/Metadata.vue @@ -53,7 +53,10 @@
    -