Skip to content

Commit 2ebdbe4

Browse files
authored
chore: improve project consistency and add pre-commit hook (#1105)
## Summary Address consistency issues identified during project review. ## Changes - **Pre-commit hook**: Added `.git/hooks/pre-commit` that runs `format.sh` and `build.sh` before commits (per AGENTS.md requirement) - **clean.sh**: Now includes Main.Tests bin/obj/TestResults cleanup - **km.sh**: Fixed shebang to use portable `/usr/bin/env bash` - **KNOWN-ISSUES.md**: Documented 2 configuration limitations (hardcoded index ID and index weights) ## Test plan - [x] All 520 tests pass (306 Core + 214 Main) - [x] Zero skipped tests - [x] Code coverage at 83.82% (above 80% threshold) - [x] `build.sh` passes with 0 warnings - [x] `format.sh` passes - [x] `coverage.sh` passes - [x] Pre-commit hook runs successfully on commit ## Note The pre-commit hook is created in `.git/hooks/` which is not tracked by git. New clones will need to set up the hook.
1 parent 58c9e47 commit 2ebdbe4

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

KNOWN-ISSUES.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,36 @@ km search 'content:"user:password"'
8484

8585
---
8686

87+
## Configuration Limitations
88+
89+
### 4. Index ID Hardcoded
90+
91+
**Status:** Known limitation
92+
93+
**Issue:** Index ID is hardcoded as `"fts-main"` instead of being loaded from configuration.
94+
95+
**Location:** `src/Core/Search/NodeSearchService.cs:77`
96+
97+
**Impact:** Cannot configure multiple indexes per node.
98+
99+
**Fix Required:** Load index configuration from node settings.
100+
101+
---
102+
103+
### 5. Index Weights Not Configurable
104+
105+
**Status:** Known limitation
106+
107+
**Issue:** Index weights for reranking use hardcoded defaults instead of configuration.
108+
109+
**Location:** `src/Core/Search/SearchService.cs:223`
110+
111+
**Impact:** Cannot tune relevance scoring per index.
112+
113+
**Fix Required:** Load index weights from configuration file.
114+
115+
---
116+
87117
## Testing Gaps
88118

89119
These bugs were discovered through comprehensive E2E testing. Previous tests only verified:

clean.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@ rm -rf src/Core/obj
1313
rm -rf src/Main/bin
1414
rm -rf src/Main/obj
1515

16+
rm -rf tests/Core.Tests/bin
17+
rm -rf tests/Core.Tests/obj
1618
rm -rf tests/Core.Tests/TestResults
19+
20+
rm -rf tests/Main.Tests/bin
21+
rm -rf tests/Main.Tests/obj
22+
rm -rf tests/Main.Tests/TestResults

km.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
dotnet run --project src/Main/Main.csproj -- "$@"

0 commit comments

Comments
 (0)