diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 9122ca9..9d76648 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,21 +1,29 @@ +# CodeRabbit configuration — relaxed for a solo-maintainer repo. +# Reviews are helpful but not blocking. Auto-review only on PRs, never on drafts. reviews: - profile: assertive + profile: chill auto_review: enabled: true drafts: false + base_branches: ["main"] path_filters: - "!**/dist/**" - "!**/node_modules/**" - "!**/*.lock" - "!**/graphify-out/**" - "!**/.opencode/**" + - "!**/coverage/**" path_instructions: - path: "src/services/**/*.ts" instructions: | Focus on memory management, SQLite operations, and vector search correctness. Flag unhandled promise rejections or - missing error handling. + missing error handling. Do not nitpick style — Prettier + and DeepSource already enforce formatting and lint rules. - path: "tests/**/*.ts" instructions: | Ensure tests use proper vitest patterns and mock cleanup. Check for test isolation — no shared state between tests. + Do not request tests for trivial one-liners. +chat: + auto_reply: false diff --git a/.deepsource.toml b/.deepsource.toml index f91ed73..f8eaaad 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -5,7 +5,6 @@ name = "javascript" enabled = true [analyzers.meta] - plugins = ["react"] environment = ["nodejs", "bun"] module_system = "es-modules" dialect = "typescript" diff --git a/.gitattributes b/.gitattributes index f8f55c6..58f5eef 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,5 @@ -graphify-out/** linguist-generated=true -graphify-out/obsidian/** linguist-generated=true -graphify-out/wiki/** linguist-generated=true -graphify-out/cache/** linguist-generated=true -graphify-out/*.json linguist-generated=true -graphify-out/*.html linguist-generated=true -graphify-out/*.md linguist-generated=true +# Auto-generated files — excluded from GitHub linguist stats +*.lock linguist-generated=true +bun.lock linguist-generated=true +dist/** linguist-generated=true +coverage/** linguist-generated=true diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 9ab0468..63e3022 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -18,7 +18,7 @@ GitHub repository configuration: CI/CD workflows, release automation, and issue/ - `CONTRIBUTING.md` — Contributor guide including Release Process, Contributor Credits, and Version Numbering sections; the canonical contributor reference is `docs/DEVELOPMENT.md` + `docs/TESTING.md` - `SECURITY.md` — Private vulnerability reporting policy (GitHub security advisory or direct contact to @ZeR020). Supported versions and disclosure timeline - `CODE_OF_CONDUCT.md` — Contributor Covenant -- `banner.png`, `screenshot-*.png` — README assets +- README assets (banner, screenshots) moved to `docs/assets/` ## Local Contracts diff --git a/docs/AGENTS.md b/docs/AGENTS.md index 7f1ad8a..b417536 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -13,6 +13,7 @@ Project documentation set. User-facing and contributor-facing docs covering setu - `DEVELOPMENT.md` — Contributor guide: setup, build commands, code style (Prettier, strict TS, DeepSource lint, JSDoc), branch conventions, PR process, project structure, release process - `TESTING.md` — Test framework, running tests, writing new tests, mocking patterns, HOME isolation, coverage, CI integration - `CHANGELOG.md` — Keep a Changelog format, Semantic Versioning. **Shipped in the published package** (`package.json` `files`). Updated per release +- `assets/` — README screenshots and banner images (moved from `.github/`) ## Local Contracts diff --git a/.github/banner.png b/docs/assets/banner.png similarity index 100% rename from .github/banner.png rename to docs/assets/banner.png diff --git a/.github/screenshot-project-memory.png b/docs/assets/screenshot-project-memory.png similarity index 100% rename from .github/screenshot-project-memory.png rename to docs/assets/screenshot-project-memory.png diff --git a/.github/screenshot-user-profile.png b/docs/assets/screenshot-user-profile.png similarity index 100% rename from .github/screenshot-user-profile.png rename to docs/assets/screenshot-user-profile.png diff --git a/scripts/check-sonarcloud-gate.sh b/scripts/check-sonarcloud-gate.sh index 7b2eb06..cef01b5 100755 --- a/scripts/check-sonarcloud-gate.sh +++ b/scripts/check-sonarcloud-gate.sh @@ -48,8 +48,8 @@ if [ "$STATUS" = "OK" ]; then exit 0 fi -# Gate is ERROR — show failing conditions -echo -e "${RED} ❌ SonarCloud Quality Gate: FAIL${NC}" +# Gate is ERROR — show failing conditions as informational (non-blocking) +echo -e "${YELLOW} ℹ️ SonarCloud Quality Gate: FAIL (non-blocking — does not prevent push)${NC}" echo "" echo " Failing conditions:" @@ -66,13 +66,12 @@ for c in conditions: if 'rating' in mk: actual = rating_map.get(actual, actual) thresh = rating_map.get(thresh, thresh) - print(f' ❌ {mk}: {actual} (threshold: {thresh})') + print(f' • {mk}: {actual} (threshold: {thresh})') else: - print(f' ❌ {mk}: {actual}% (threshold: {thresh}%)') + print(f' • {mk}: {actual}% (threshold: {thresh}%)') " 2>/dev/null echo "" -echo -e "${YELLOW} Fix the failing conditions before pushing to avoid gate failures.${NC}" echo " Dashboard: https://sonarcloud.io/dashboard?id=${PROJECT_KEY}&branch=${BRANCH}" # Non-blocking: warn but don't prevent the push diff --git a/sonar-project.properties b/sonar-project.properties index 60863de..f91cd5d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -9,7 +9,9 @@ sonar.typescript.tsconfigPath=tsconfig.json sonar.exclusions=node_modules/**,dist/**,out/**,coverage/** sonar.test.inclusions=tests/**/*.test.ts -sonar.coverage.exclusions=tests/**,examples/**,src/types/**,src/**/*.types.ts,src/index.ts,src/web/**,src/plugin.ts,src/services/vector-backends/shared.ts,src/services/sqlite/shard-manager.ts,src/services/migration-service.ts,src/services/ai/opencode-provider.ts,src/services/user-prompt/user-prompt-manager.ts,scripts/migrate-v1-to-v2.ts +# Exclude files that are untestable infrastructure (plugin entry, web UI, +# migration scripts, type definitions, thin wrappers) from coverage gate. +sonar.coverage.exclusions=tests/**,examples/**,src/types/**,src/**/*.types.ts,src/index.ts,src/web/**,src/plugin.ts,src/services/vector-backends/shared.ts,src/services/sqlite/shard-manager.ts,src/services/migration-service.ts,src/services/ai/opencode-provider.ts,src/services/user-prompt/user-prompt-manager.ts,src/services/secret-resolver.ts,scripts/migrate-v1-to-v2.ts # Coverage report path (generated by vitest --coverage) sonar.javascript.lcov.reportPaths=coverage/lcov.info