Merged
Conversation
added 18 commits
February 27, 2026 20:12
- Add eslint.config.js with TypeScript rules and prettier integration - Add vitest.config.ts with V8 coverage, thresholds, and include/exclude patterns - Add .editorconfig for consistent editor settings - Add .prettierrc for code formatting - Add .github/workflows/ for CI pipeline - Update tsconfig.json with stricter settings - Update package.json / package-lock.json with new dev dependencies
- New logger.ts utility with debug/info/warn/error levels - Output is newline-delimited JSON to stderr (never stdout, preserves MCP protocol) - Reads LXRAG_LOG_LEVEL env var; defaults to 'info' - Auto-includes sessionId from AsyncLocalStorage request context - Zero runtime deps; normalises Error/string/object contexts uniformly - Update exec-utils.ts and validation.ts to use structured logger
- New contract-validator.ts validates raw arguments against tool inputShape
- Detects missing required fields, extra/unknown fields, and type mismatches
- Returns ContractValidation { valid, errors, missingRequired, extraFields, warnings }
- Used by contract_validate tool and callTool() dispatch pipeline
- Catches common misuse: codeType vs type, elementA vs elementId1, etc.
- Delete src/test-harness.ts — ad-hoc debug harness superseded by vitest - Delete src/test-parser.ts — one-off parser probe, no longer needed
- server.ts: use typed Config instead of Record<string,unknown>, fix error casts - config.ts: tighten Config interface, remove loose index signatures - types/config.ts: export LayerDefinition and related types properly - types/tool-args.ts: replace loose object types with discriminated unions - request-context.ts: fully typed AsyncLocalStorage context - env.ts: typed EnvConfig with explicit fields
- client.ts: String() casts for row.id/type/from/to in node/rel mapping - builder.ts: typed createImportNode/createExportNode/createVariableNode params; cast ArchitectureEngine layers via 'as unknown as LayerDefinition[]' - orchestrator.ts: typed BuildResult, removed any in watcher dispatch - ppr.ts: typed PPRResult and edge-weight map, fix accumulator types - hybrid-retriever.ts: typed QueryResult and scorer inputs - cache.ts, sync-state.ts, docs-builder.ts: replace Index<string,any> with typed Record<string,unknown> mappings
- architecture-engine.ts: typed LayerDefinition, replace any with typed rules - community-detector.ts: typed MemberRow and community map entries - coordination-engine.ts: typed claim/release row shapes, remove implicit any - coordination-types.ts: Claim/ClaimConflict/AgentSummary interfaces tightened - coordination-utils.ts: typed query params and row results - docs-engine.ts: DocSection interface, typed search result rows - episode-engine.ts: EpisodeRow/EpisodeInput types, typed recall scoring - progress-engine.ts: ProgressItem/FeatureStatus typed, typed DB rows - test-engine.ts: typed TestSuite map entries, MirrorTestResult interface - migration-engine.ts: typed migration step runner
parsers: - parser-interface.ts: tighten ParsedFile/ParsedSymbol, add summary field - regex-language-parsers.ts: typed BraceBlock/PythonBlock helpers - typescript-parser.ts, tree-sitter-parser.ts: typed symbol extraction methods - docs-parser.ts: DocNode interface, typed frontmatter result response: - schemas.ts: typed FieldPriority, ProfileBudget with const assertions - shaper.ts: typed ResponseData, fix applyFieldPriority budget pruning - summarizer.ts: typed SummaryContext, fix compact array capping vector: - embedding-engine.ts: Embedding interface, typed store/recall - qdrant-client.ts: typed SearchResult, PayloadFilter
types.ts:
- HandlerBridge method signatures match implementations exactly
- Config type replaces Record<string,unknown> for context.config
- resolveSinceAnchor, adaptWorkspaceForRuntime, getActiveWatcher typed
tool-handler-base.ts:
- ToolContext.config: Config | {}; workspaceInput uses string cast
- ArchitectureEngine layers cast via 'as unknown as LayerDefinition[]'
tool-handlers.ts:
- Registry dispatch: cast 'this as unknown as HandlerBridge'
- context_pack / semantic_slice: const a: any boundary pattern
- coreSymbols typed with local CoreSymbol alias
handlers (all files):
- core-graph-tools: txMetadata/latestTxRow cast as Record<string,unknown>
- core-analysis-tools: 'let matches' extracted, dependencies typed
- docs-tools: removed unused GraphRelationship import, typed row maps
- ref-tools: walk() return type includes null; sort cast as number
- test-tools: GraphRelationship import added; execError cast
- vector-tools: HybridResult local type; typed reduce accumulator
- build.ts: typed BuildOptions, replace process.exit abuse with throw - query.ts: QueryOptions interface, typed Cypher result rows - test-affected.ts: typed changed-files parsing, AffectedResult interface - validate.ts: typed ValidationReport and violation shape
New test files: - community-detector.test.ts: 18 tests — MAGE leiden, directory fallback, communityLabel grouping, central node selection, ID naming convention - episode-engine.test.ts: 30 tests — add(), recall() filters/sorting/metadata, decisionQuery(), reflect() patterns/learnings, Jaccard scoring - test-engine.test.ts: 25 tests — statistics, selectAffectedTests, reload(), categorizeTest() path classification, mirror path fallback Updated existing tests: - architecture-engine.test.ts: align with new LayerDefinition signatures - coordination-engine.test.ts: align with typed claim row shapes - docs-engine.test.ts: align with DocSection interface - progress-engine.test.ts: align with ProgressItem/FeatureStatus types
New test files: - graph/ppr.test.ts: 26 tests — empty seeds guard, MAGE pagerank mode, proximity boosting, JS PPR fallback, edge weight propagation, option clamping - parsers/regex-language-parsers.test.ts: 42 tests — PythonParser, GoParser, RustParser, JavaParser; imports/classes/functions/mixed-files Updated existing tests: - graph/builder.test.ts, client.test.ts, docs-builder.test.ts, hybrid-retriever.test.ts, orchestrator.test.ts: align with new typed APIs - parsers/docs-parser.test.ts, parser-registry.test.ts: align with updated ParsedFile/ParsedSymbol interfaces
New test files:
- tool-handlers.integration.test.ts: 79 tests covering all 36+ registered tools
* Critical bugs: graph_query data loss, contract_validate schema checking,
coordination claim tracking, test_run path resolution
* Significant issues: test_categorize/test_select/suggest_tests coverage,
code_clusters, context_pack, task_update envelope
* Parameter inconsistencies: arch_suggest type vs codeType, impact_analyze
* Response shaping: applyFieldPriority budget pruning, compact profile
* Full coverage of all tool categories: graph, semantic, arch, docs,
memory, progress, coordination, setup, utility
* Cross-cutting: response envelope consistency, session isolation
Updated existing tests:
- tool-handlers.contract.test.ts, tool-handlers.docs.test.ts: align with
new typed APIs
- utils/exec-utils.test.ts, utils/validation.test.ts: align with logger
- vector/embedding-engine.test.ts, vector/qdrant-client.test.ts: typed APIs
- response/budget.test.ts, response/schemas.test.ts: typed FieldPriority
New files: - ROADMAP.md: feature roadmap aligned with 2026 community findings - docs/AUDIT_REPORT_2026-02-27.md: comprehensive tool audit report - docs/RESEARCH_GEMINI_DEEP_SEARCH_2026_02_26.md: architecture research notes - scripts/test-all-tools.mjs: full stdio integration test for all 39 tools (phases: handshake, workspace, empty-state, rebuild, semantic, arch, docs, impact, test, episodes, coordination, one-shot init) Updated: - README.md, ARCHITECTURE.md, QUICK_REFERENCE.md: reflect current state - docs/PLANS_PENDING_ACTIONS_SUMMARY.md: Phase 1 complete, Phase 2 planning - docs/TOOLS_INFORMATION_GUIDE.md, docs/PROJECT_FEATURES_CAPABILITIES.md: enumerate all 39 tools and their corrected parameter names - docs/AUDITS_EVALUATIONS_SUMMARY.md: 2026-02-27 audit summary - docs/INTEGRATION_SUMMARY.md: Claude/Cursor/Copilot integration notes - .github/copilot-instructions.md: correct tool signatures and pitfalls
- Updated HTML coverage reports reflecting new test files and refactored code - Deleted stale clover.xml and coverage-final.json (replaced by lcov format) - .lxrag/cache/file-hashes.json updated to reflect refactored source tree
- validation.ts: add computeProjectFingerprint(workspaceRoot) → stable 4-char base-36 hash (SHA-256 of path, first 6 hex digits mod 36^4) - builder.ts: stamp every FILE node with projectFingerprint on upsert; constructor accepts optional fingerprint param - orchestrator.ts: compute fingerprint from workspaceRoot at build() time; on incremental mode, query stored fingerprint and emit a warning when it differs — catches moved/renamed workspaces before they corrupt the graph - core-graph-tools.ts: import computeProjectFingerprint for graph_rebuild
- Rename all LXRAG_ env vars to LXDIG_ - Update product name lxRAG → lxDIG across source, docs, scripts, configs - Rename .lxrag/ → .lxdig/ cache directory - Rename docs/lxrag-self-audit → docs/lxdig-self-audit - Update README/ARCHITECTURE with DIG branding + RAG SEO keywords - Update package.json description and keywords (dig, rag, graphrag) - Fix unused computeProjectFingerprint import in core-graph-tools.ts - Build passes, 469/469 tests pass
Keep dash only where structurally required: - GitHub URLs and git clone paths - cd/directory references - projectId values in Cypher queries and scripts - Element IDs (lxDIG-MCP:file:...) Build passes, 469/469 tests pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.