claude-flow-novice 2.18.13 → 2.18.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417503_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417531_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/metadata.json +8 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/original +3 -0
- package/.backups/unknown/1765417552_2999b9ec66f591dd76075617ec31fcea/revert.sh +7 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/metadata.json +8 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/original +1212 -0
- package/.backups/unknown/1765417613_1f34dbf0fe1ec3b6cb74ba7c4e12a2a4/revert.sh +7 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/metadata.json +8 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/original +1212 -0
- package/.backups/unknown/1765417613_332e9bb223a26270398922640c1c1653/revert.sh +7 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/metadata.json +8 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/original +1212 -0
- package/.backups/unknown/1765417613_45880a7afef063347b701e7e88e2df9c/revert.sh +7 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/metadata.json +8 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/original +1228 -0
- package/.backups/unknown/1765417614_1b6c3b658c2891dbe245aea4bad41661/revert.sh +7 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/metadata.json +8 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/original +1237 -0
- package/.backups/unknown/1765417614_1ed5bd129f0b5d1b297a04ec5267ef62/revert.sh +7 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/metadata.json +8 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/original +1240 -0
- package/.backups/unknown/1765417614_28e032bd1b62dbfcecbd56327a0b0e23/revert.sh +7 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/metadata.json +8 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/original +1216 -0
- package/.backups/unknown/1765417614_40a1ce1b0efa2e1ba1958c27b2cbc557/revert.sh +7 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/metadata.json +8 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/original +1238 -0
- package/.backups/unknown/1765417614_f65dbf58cff7a9aa1c5c3d0d1618074a/revert.sh +7 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/metadata.json +8 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/original +1167 -0
- package/.backups/unknown/1765417615_0f45c28b9b8d5204974421c06075ff74/revert.sh +7 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/metadata.json +8 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/original +1242 -0
- package/.backups/unknown/1765417615_41d36156891ddb6f63d1b4da59d1db4c/revert.sh +7 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/metadata.json +8 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/original +2 -0
- package/.backups/unknown/1765417709_77dda8631459cfc2ab94b8928f7d90b4/revert.sh +7 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/metadata.json +8 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/original +1169 -0
- package/.backups/unknown/1765417775_1405837bacf112ba832a139840fe94e7/revert.sh +7 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/metadata.json +8 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/original +1171 -0
- package/.backups/unknown/1765417775_8044b4a5cfdcb5cd71317831ad53f5a2/revert.sh +7 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/metadata.json +8 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/original +1170 -0
- package/.backups/unknown/1765417775_8eb94d60151e1db262377fbf8a187212/revert.sh +7 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/metadata.json +8 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/original +1173 -0
- package/.backups/unknown/1765417776_a0d4b709e15e0bfa002c4b128f5e4603/revert.sh +7 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/metadata.json +8 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/original +1170 -0
- package/.backups/unknown/1765417776_cb1bc24d98b63564eb73ef782b8c68b3/revert.sh +7 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/metadata.json +8 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/original +1172 -0
- package/.backups/unknown/1765417777_1c4cc8c33f476f0c87c8efd4e34efc22/revert.sh +7 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/metadata.json +8 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/original +1175 -0
- package/.backups/unknown/1765417777_325de83ffd34544909b8b9aa6e18dd05/revert.sh +7 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/metadata.json +8 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/original +1178 -0
- package/.backups/unknown/1765417950_402e7c1a8956b56ac7b88e89f024acb4/revert.sh +7 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/metadata.json +8 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/original +1174 -0
- package/.backups/unknown/1765417950_647e27e4da18ae42c339e04b4d334feb/revert.sh +7 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/metadata.json +8 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/original +1194 -0
- package/.backups/unknown/1765417951_1424d2dd67b8c8a4e7cf649b379d21f2/revert.sh +7 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/metadata.json +8 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/original +1186 -0
- package/.backups/unknown/1765417951_6df070ca287ea94a7f08efc69ec9ea51/revert.sh +7 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/metadata.json +8 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/original +1180 -0
- package/.backups/unknown/1765417951_848919a1365f6536e5ef8d85d0c80fa7/revert.sh +7 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/metadata.json +8 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/original +1198 -0
- package/.backups/unknown/1765417951_b0d1d4ecf85ad10cda0f3900d414b608/revert.sh +7 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/metadata.json +8 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/original +1202 -0
- package/.backups/unknown/1765417952_2b720e213b5197cbaad53f9f0857f23f/revert.sh +7 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/metadata.json +8 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/original +1202 -0
- package/.backups/unknown/1765417952_ef1d15e8b83a802a0c0f0fc03e56a89c/revert.sh +7 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/metadata.json +8 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/original +1209 -0
- package/.backups/unknown/1765418048_ac94238a69a6f86a6ba9d31f623c18a7/revert.sh +7 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/metadata.json +8 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/original +1207 -0
- package/.backups/unknown/1765418048_f3afed98da63fef9ff57fb5646976f63/revert.sh +7 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/metadata.json +8 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/original +1207 -0
- package/.backups/unknown/1765418049_9c392702a4e1cace37d17f6f2dfaf54e/revert.sh +7 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/metadata.json +8 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/original +1193 -0
- package/.backups/unknown/1765418049_9e0777555b51dea4d24d0503b584cfc5/revert.sh +7 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/metadata.json +8 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/original +1194 -0
- package/.backups/unknown/1765418050_22d534bed68f9f5d883bee54e7cbc4d3/revert.sh +7 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/metadata.json +8 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/original +1193 -0
- package/.backups/unknown/1765418051_d9243722dc90dabc851c5767a62ac7f2/revert.sh +7 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/metadata.json +8 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/original +1191 -0
- package/.backups/unknown/1765418177_21a2fa816d25d419b54ef2d429aab474/revert.sh +7 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/metadata.json +8 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/original +1190 -0
- package/.backups/unknown/1765418177_33b673dce1eb59d7eb4f752aec882794/revert.sh +7 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/metadata.json +8 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/original +1191 -0
- package/.backups/unknown/1765418177_72568812ea5a73cf6861a6b14da065fa/revert.sh +7 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/metadata.json +8 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/original +1189 -0
- package/.backups/unknown/1765418178_20c28b95f12194fe4b81cfb35f4f3757/revert.sh +7 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/metadata.json +8 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/original +1197 -0
- package/.backups/unknown/1765418178_cdf68719cc09173769027743e2718ad4/revert.sh +7 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/metadata.json +8 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/original +1190 -0
- package/.backups/unknown/1765418178_eb19e0f8542405480e51af09fad84b71/revert.sh +7 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/metadata.json +8 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/original +1197 -0
- package/.backups/unknown/1765418236_c016507725847318a3c369b047cbb802/revert.sh +7 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/metadata.json +8 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/original +1197 -0
- package/.backups/unknown/1765418237_932c3cc3a5c537b7933c2370b65f4b39/revert.sh +7 -0
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.md +194 -2
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.sh +264 -0
- package/.claude/agents/cfn-dev-team/utility/epic-creator-v2.sh.backup +698 -0
- package/.claude/hooks/README.md +148 -0
- package/.claude/hooks/SessionStart:cfn-load-openai-key.sh +35 -0
- package/.claude/hooks/cfn-invoke-pre-edit.sh +1 -1
- package/.claude/hooks/cfn-load-cerebras-env.sh +65 -0
- package/.claude/hooks/cfn-precompact-enhanced.sh +283 -0
- package/.claude/hooks/deprecated/README.md +27 -0
- package/.claude/settings.json +71 -6
- package/.claude/skills/cfn-cerebras-coordinator/QUICKSTART.md +348 -0
- package/.claude/skills/cfn-cerebras-coordinator/README.md +525 -0
- package/.claude/skills/cfn-cerebras-coordinator/TDD_COORDINATOR_OVERVIEW.md +284 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-py-v2-test-1733854200.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-py-v3-test-1765383241.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-rust-v2-test-1765381361.json +36 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-rust-v3-test-1765383242.json +46 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v2-test-1733864400.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v3-test-1765383238.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v4-test-1765386506.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/conversations/2025-12-10-ts-v5-test-1765393100.json +66 -0
- package/.claude/skills/cfn-cerebras-coordinator/example-usage.sh +206 -0
- package/.claude/skills/cfn-cerebras-coordinator/lib/tdd-conversation-coordinator.ts +569 -0
- package/.claude/skills/cfn-cerebras-coordinator/test-tdd-coordinator.sh +250 -0
- package/.claude/skills/cfn-epic-creator/SKILL.md +392 -0
- package/.claude/skills/cfn-epic-creator/estimate-costs.sh +524 -0
- package/.claude/skills/cfn-epic-creator/invoke.sh +445 -0
- package/.claude/skills/cfn-epic-creator/parse-personas.sh +533 -0
- package/.claude/skills/cfn-epic-creator/security-utils.sh +268 -0
- package/.claude/skills/cfn-epic-creator/security-verification-demo.sh +127 -0
- package/.claude/skills/cfn-epic-creator/test-invoke.sh +620 -0
- package/.claude/skills/cfn-epic-creator/test-security-fixes.sh +195 -0
- package/.claude/skills/cfn-epic-creator/test-security-simple.sh +165 -0
- package/.claude/skills/cfn-epic-creator/validate-epic.sh +474 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/metadata.json +8 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/original +209 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/.backups/unknown/1765358428_2cf0ad7377232c919ff0a65630cb307d/revert.sh +7 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/AGENT_INTEGRATION_PATTERNS.md +255 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/Cargo.toml +8 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/Cargo.toml.backup +47 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/EXTRACTION_EXAMPLES.md +287 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/README.md +2 -563
- package/.claude/skills/cfn-local-ruvector-accelerator/SCHEMA_V2_IMPLEMENTATION.md +151 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/SECURITY_IMPLEMENTATION.md +185 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/SKILL.md +8 -351
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/EXECUTIVE_SUMMARY.txt +90 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/PHASE_4_QUERY_API.md +210 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/RUST_AST_EXTRACTOR_IMPLEMENTATION.md +222 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/TRANSACTION_MANAGEMENT.md +241 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/docs/VALIDATION_FINDINGS.txt +250 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/epic-ast-indexer.json +335 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/index-code.sh +292 -96
- package/.claude/skills/cfn-local-ruvector-accelerator/index-code.sh.backup +249 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/index_all.sh +65 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/find.rs +214 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index.rs +259 -103
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index_ast.rs +767 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/index_modified.rs +37 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/init.rs +17 -12
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/migration.rs +34 -1
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/mod.rs +6 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/cli/refs.rs +209 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/embeddings.rs +82 -33
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/mod.rs +251 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/rust.rs +425 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/rust_placeholder.rs +420 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/text_fallback.rs +490 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/typescript.rs +520 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/extractors/typescript_full.rs +531 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/lib.rs +20 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/main.rs +33 -2
- package/.claude/skills/cfn-local-ruvector-accelerator/src/main.rs.backup +360 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration.rs +325 -318
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration_backup.rs +325 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/migration_tx.rs +513 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/paths.rs +29 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/query_api.rs +609 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/schema_v2.rs +603 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/security_tests.rs +154 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2.rs +583 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_backup.rs +560 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_fixed.rs +0 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/store_v2_tx.rs +397 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/test_schema.rs +228 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/src/transaction_tests.rs +410 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_ast_indexing.rs +59 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_query_api.sh +103 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_schema.sql +158 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/test_schema_v2.sql +147 -0
- package/.claude/skills/cfn-mdap-context-injection/SKILL.md +31 -10
- package/.claude/skills/cfn-mdap-error-fixer/skill.md +15 -205
- package/.claude/skills/cfn-session-handoff/SKILL.md +1 -53
- package/.claude/skills/cfn-task-decomposition/SKILL.md +1 -0
- package/.claude/skills/cfn-task-intelligence/SKILL.md +39 -18
- package/.claude/skills/cfn-task-planning/SKILL.md +37 -12
- package/.claude/skills/cfn-validation-framework/SKILL.md +3 -60
- package/.claude/skills/cfn-vision-analysis/SKILL.md +3 -20
- package/.claude-flow/metrics/performance.json +3 -3
- package/.claude-flow/metrics/task-metrics.json +3 -3
- package/.ruvector/index_v2.db-shm +0 -0
- package/.ruvector/index_v2.db-wal +0 -0
- package/CLAUDE.md +9 -1
- package/README.md +56 -0
- package/docs/AGENT_PRODUCTION_FEEDBACK_PATTERNS.md +389 -0
- package/docs/CEREBRAS_TDD_COORDINATOR_TEST_RESULTS.md +213 -0
- package/docs/CEREBRAS_TDD_ROUND1_VS_ROUND2_COMPARISON.md +225 -0
- package/docs/CEREBRAS_TDD_ROUND3_FINAL_RESULTS.md +264 -0
- package/docs/EPIC_CREATOR_V2_ARCHITECTURE.md +629 -0
- package/docs/HOOKS_IMPLEMENTATION_PRIORITY.md +585 -0
- package/docs/SKILLS_HOOKS_INTEGRATION.md +1074 -0
- package/epic-with-personas-2025-12-09-17-15-13.json +253 -0
- package/package.json +2 -1
- package/test-epic-creator-security.sh +203 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/__pycache__/search_engine_v2.cpython-312.pyc +0 -0
- package/.claude/skills/cfn-local-ruvector-accelerator/search_engine.py +0 -200
- package/jest.config.ts.cjs +0 -17
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/context-analyzer.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-cerebras-code-generator/generate-code.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/execute.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/INTEGRATION.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/SAMPLE_OUTPUTS.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/capture-container-logs.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/enable-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/init-hybrid-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/analytics-summary.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-agent-timeline.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-consensus-history.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-coordination-timeline.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-failed-containers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/queries/query-gate-checks.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/schema.sql +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/sqlite-helpers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/logging/test-hybrid-logging.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/mcp/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/mcp/skill-mcp-selector.js +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/orchestration/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/orchestration/orchestrate.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/spawning/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/spawning/spawn-agent.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/cleanup-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/lib/docker-helpers.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/monitor-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-docker-runtime/lib/waves/spawn-wave.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-node-heap-sizer/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/cfn-node-heap-sizer/task-mode-heap-limiter.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/deprecated/analyze-patterns.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/README.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/SECURITY.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/SKILL.md +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/package.json +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/solve.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test-equation-solver-minimal.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test-equation-solver.sh +0 -0
- /package/.claude/{skills → cfn-extras/skills/deprecated}/equation-solver/test.cjs +0 -0
- /package/.claude/hooks/{cfn-credential-scanner.sh → deprecated/cfn-credential-scanner.sh} +0 -0
- /package/.claude/hooks/{cfn-detect-hardcoded-credentials.sh → deprecated/cfn-detect-hardcoded-credentials.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-post-edit-ts.sh → deprecated/cfn-invoke-post-edit-ts.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-pre-edit-ts.sh → deprecated/cfn-invoke-pre-edit-ts.sh} +0 -0
- /package/.claude/hooks/{cfn-invoke-security-validation.sh → deprecated/cfn-invoke-security-validation.sh} +0 -0
- /package/.claude/hooks/{cfn-lint-sql-injection.sh → deprecated/cfn-lint-sql-injection.sh} +0 -0
- /package/.claude/hooks/{cfn-post-edit.sh → deprecated/cfn-post-edit.sh} +0 -0
- /package/.claude/hooks/{cfn-pre-edit-backup.sh → deprecated/cfn-pre-edit-backup.sh} +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{embeddings_manager.py → embeddings_manager.py.backup} +0 -0
- /package/{.ruvector → .claude/skills/cfn-local-ruvector-accelerator/index}/index.bin +0 -0
- /package/{.ruvector → .claude/skills/cfn-local-ruvector-accelerator/index}/metadata.json +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{search_engine_v2.py → search_engine_v2.py.backup} +0 -0
- /package/.claude/skills/cfn-local-ruvector-accelerator/{sqlite_store.py → sqlite_store.py.backup} +0 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
// Comprehensive tests for transaction behavior
|
|
2
|
+
use anyhow::Result;
|
|
3
|
+
use tempfile::tempdir;
|
|
4
|
+
use rusqlite::Connection;
|
|
5
|
+
use std::path::Path;
|
|
6
|
+
|
|
7
|
+
use crate::store_v2_tx::StoreV2WithTx;
|
|
8
|
+
use crate::schema_v2::{SchemaV2, EntityKind, Visibility};
|
|
9
|
+
use crate::store_v2::{Entity, Reference, TypeUsage};
|
|
10
|
+
|
|
11
|
+
/// Test atomic file indexing with transaction rollback on error
|
|
12
|
+
#[test]
|
|
13
|
+
fn test_atomic_file_indexing_with_rollback() -> Result<()> {
|
|
14
|
+
let dir = tempdir()?;
|
|
15
|
+
let db_path = dir.path().join("test_atomic.db");
|
|
16
|
+
let conn = Connection::open(&db_path)?;
|
|
17
|
+
|
|
18
|
+
// Initialize schema
|
|
19
|
+
SchemaV2::initialize(&conn)?;
|
|
20
|
+
|
|
21
|
+
// Create file hashes table
|
|
22
|
+
conn.execute(
|
|
23
|
+
"CREATE TABLE IF NOT EXISTS file_hashes (
|
|
24
|
+
file_path TEXT PRIMARY KEY,
|
|
25
|
+
file_hash TEXT NOT NULL,
|
|
26
|
+
indexed_at INTEGER NOT NULL
|
|
27
|
+
)",
|
|
28
|
+
[],
|
|
29
|
+
)?;
|
|
30
|
+
|
|
31
|
+
let store = StoreV2WithTx::new(&db_path)?;
|
|
32
|
+
|
|
33
|
+
// Insert initial entity
|
|
34
|
+
let initial_entity = Entity {
|
|
35
|
+
id: 0,
|
|
36
|
+
kind: EntityKind::Function,
|
|
37
|
+
name: "initial_function".to_string(),
|
|
38
|
+
signature: Some("fn initial() -> Result<()>".to_string()),
|
|
39
|
+
visibility: Visibility::Public,
|
|
40
|
+
parent_id: None,
|
|
41
|
+
file_path: "/test.rs".to_string(),
|
|
42
|
+
line_number: 10,
|
|
43
|
+
column_number: Some(0),
|
|
44
|
+
doc_comment: None,
|
|
45
|
+
attributes: None,
|
|
46
|
+
metadata: None,
|
|
47
|
+
created_at: chrono::Utc::now(),
|
|
48
|
+
updated_at: chrono::Utc::now(),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
let initial_id = store.insert_entity(&initial_entity)?;
|
|
52
|
+
assert!(initial_id > 0);
|
|
53
|
+
|
|
54
|
+
// Test atomic file indexing with successful operation
|
|
55
|
+
let result = store.index_file_atomic("/test.rs", "hash1", |tx| {
|
|
56
|
+
// Insert entities
|
|
57
|
+
let entity1 = Entity {
|
|
58
|
+
id: 0,
|
|
59
|
+
kind: EntityKind::Function,
|
|
60
|
+
name: "test_function_1".to_string(),
|
|
61
|
+
signature: Some("fn test1() -> Result<()>".to_string()),
|
|
62
|
+
visibility: Visibility::Public,
|
|
63
|
+
parent_id: None,
|
|
64
|
+
file_path: "/test.rs".to_string(),
|
|
65
|
+
line_number: 1,
|
|
66
|
+
column_number: Some(0),
|
|
67
|
+
doc_comment: None,
|
|
68
|
+
attributes: None,
|
|
69
|
+
metadata: None,
|
|
70
|
+
created_at: chrono::Utc::now(),
|
|
71
|
+
updated_at: chrono::Utc::now(),
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
let entity2 = Entity {
|
|
75
|
+
id: 0,
|
|
76
|
+
kind: EntityKind::Function,
|
|
77
|
+
name: "test_function_2".to_string(),
|
|
78
|
+
signature: Some("fn test2() -> Result<()>".to_string()),
|
|
79
|
+
visibility: Visibility::Public,
|
|
80
|
+
parent_id: None,
|
|
81
|
+
file_path: "/test.rs".to_string(),
|
|
82
|
+
line_number: 2,
|
|
83
|
+
column_number: Some(0),
|
|
84
|
+
doc_comment: None,
|
|
85
|
+
attributes: None,
|
|
86
|
+
metadata: None,
|
|
87
|
+
created_at: chrono::Utc::now(),
|
|
88
|
+
updated_at: chrono::Utc::now(),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
let mut stmt = tx.prepare(
|
|
92
|
+
r#"
|
|
93
|
+
INSERT INTO entities (
|
|
94
|
+
kind, name, signature, visibility, parent_id, file_path,
|
|
95
|
+
line_number, column_number, doc_comment, attributes, metadata
|
|
96
|
+
) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11)
|
|
97
|
+
"#
|
|
98
|
+
)?;
|
|
99
|
+
|
|
100
|
+
stmt.execute([
|
|
101
|
+
entity1.kind.as_str(),
|
|
102
|
+
&entity1.name,
|
|
103
|
+
&entity1.signature.unwrap(),
|
|
104
|
+
entity1.visibility.as_str(),
|
|
105
|
+
&None::<i64>,
|
|
106
|
+
&entity1.file_path,
|
|
107
|
+
&entity1.line_number,
|
|
108
|
+
&entity1.column_number,
|
|
109
|
+
&None::<String>,
|
|
110
|
+
&None::<String>,
|
|
111
|
+
&None::<String>,
|
|
112
|
+
])?;
|
|
113
|
+
|
|
114
|
+
stmt.execute([
|
|
115
|
+
entity2.kind.as_str(),
|
|
116
|
+
&entity2.name,
|
|
117
|
+
&entity2.signature.unwrap(),
|
|
118
|
+
entity2.visibility.as_str(),
|
|
119
|
+
&None::<i64>,
|
|
120
|
+
&entity2.file_path,
|
|
121
|
+
&entity2.line_number,
|
|
122
|
+
&entity2.column_number,
|
|
123
|
+
&None::<String>,
|
|
124
|
+
&None::<String>,
|
|
125
|
+
&None::<String>,
|
|
126
|
+
])?;
|
|
127
|
+
|
|
128
|
+
Ok(())
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
assert!(result.is_ok());
|
|
132
|
+
|
|
133
|
+
// Verify new entities were inserted
|
|
134
|
+
let count: i64 = conn.query_row(
|
|
135
|
+
"SELECT COUNT(*) FROM entities WHERE file_path = ?",
|
|
136
|
+
["/test.rs"],
|
|
137
|
+
|row| row.get(0)
|
|
138
|
+
)?;
|
|
139
|
+
|
|
140
|
+
assert_eq!(count, 2); // Only new entities should remain
|
|
141
|
+
|
|
142
|
+
// Test atomic file indexing with failed operation (should rollback)
|
|
143
|
+
let result = store.index_file_atomic("/test2.rs", "hash2", |tx| {
|
|
144
|
+
// Insert an entity
|
|
145
|
+
let mut stmt = tx.prepare(
|
|
146
|
+
r#"
|
|
147
|
+
INSERT INTO entities (
|
|
148
|
+
kind, name, signature, visibility, parent_id, file_path,
|
|
149
|
+
line_number, column_number, doc_comment, attributes, metadata
|
|
150
|
+
) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11)
|
|
151
|
+
"#
|
|
152
|
+
)?;
|
|
153
|
+
|
|
154
|
+
stmt.execute([
|
|
155
|
+
EntityKind::Function.as_str(),
|
|
156
|
+
"will_fail_function",
|
|
157
|
+
"fn will_fail() -> Result<()>",
|
|
158
|
+
Visibility::Public.as_str(),
|
|
159
|
+
&None::<i64>,
|
|
160
|
+
"/test2.rs",
|
|
161
|
+
1i64,
|
|
162
|
+
&Some(0i64),
|
|
163
|
+
&None::<String>,
|
|
164
|
+
&None::<String>,
|
|
165
|
+
&None::<String>,
|
|
166
|
+
])?;
|
|
167
|
+
|
|
168
|
+
// Simulate an error
|
|
169
|
+
Err(anyhow::anyhow!("Simulated error"))
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
assert!(result.is_err());
|
|
173
|
+
|
|
174
|
+
// Verify no entities were inserted for test2.rs
|
|
175
|
+
let count: i64 = conn.query_row(
|
|
176
|
+
"SELECT COUNT(*) FROM entities WHERE file_path = ?",
|
|
177
|
+
["/test2.rs"],
|
|
178
|
+
|row| row.get(0)
|
|
179
|
+
)?;
|
|
180
|
+
|
|
181
|
+
assert_eq!(count, 0);
|
|
182
|
+
|
|
183
|
+
// Verify file hashes table integrity
|
|
184
|
+
let count: i64 = conn.query_row(
|
|
185
|
+
"SELECT COUNT(*) FROM file_hashes WHERE file_path = ?",
|
|
186
|
+
["/test.rs"],
|
|
187
|
+
|row| row.get(0)
|
|
188
|
+
)?;
|
|
189
|
+
|
|
190
|
+
assert_eq!(count, 1);
|
|
191
|
+
|
|
192
|
+
Ok(())
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/// Test batch insert with partial failure
|
|
196
|
+
#[test]
|
|
197
|
+
fn test_batch_insert_rollback() -> Result<()> {
|
|
198
|
+
let dir = tempdir()?;
|
|
199
|
+
let db_path = dir.path().join("test_batch.db");
|
|
200
|
+
let conn = Connection::open(&db_path)?;
|
|
201
|
+
|
|
202
|
+
// Initialize schema
|
|
203
|
+
SchemaV2::initialize(&conn)?;
|
|
204
|
+
|
|
205
|
+
let store = StoreV2WithTx::new(&db_path)?;
|
|
206
|
+
|
|
207
|
+
// Create entities
|
|
208
|
+
let mut entities = Vec::new();
|
|
209
|
+
for i in 0..5 {
|
|
210
|
+
entities.push(Entity {
|
|
211
|
+
id: 0,
|
|
212
|
+
kind: EntityKind::Function,
|
|
213
|
+
name: format!("batch_function_{}", i),
|
|
214
|
+
signature: Some(format!("fn batch_{}() -> Result<()>", i)),
|
|
215
|
+
visibility: Visibility::Public,
|
|
216
|
+
parent_id: None,
|
|
217
|
+
file_path: "/batch.rs".to_string(),
|
|
218
|
+
line_number: (i * 10) as i64,
|
|
219
|
+
column_number: Some(0),
|
|
220
|
+
doc_comment: None,
|
|
221
|
+
attributes: None,
|
|
222
|
+
metadata: None,
|
|
223
|
+
created_at: chrono::Utc::now(),
|
|
224
|
+
updated_at: chrono::Utc::now(),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Insert batch successfully
|
|
229
|
+
let ids = store.insert_entities_batch(&entities)?;
|
|
230
|
+
assert_eq!(ids.len(), 5);
|
|
231
|
+
|
|
232
|
+
// Count inserted entities
|
|
233
|
+
let count: i64 = conn.query_row(
|
|
234
|
+
"SELECT COUNT(*) FROM entities WHERE file_path = ?",
|
|
235
|
+
["/batch.rs"],
|
|
236
|
+
|row| row.get(0)
|
|
237
|
+
)?;
|
|
238
|
+
|
|
239
|
+
assert_eq!(count, 5);
|
|
240
|
+
|
|
241
|
+
// Test empty batch
|
|
242
|
+
let empty_ids = store.insert_entities_batch(&[])?;
|
|
243
|
+
assert_eq!(empty_ids.len(), 0);
|
|
244
|
+
|
|
245
|
+
Ok(())
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/// Test atomic schema migration
|
|
249
|
+
#[test]
|
|
250
|
+
fn test_schema_migration_atomic() -> Result<()> {
|
|
251
|
+
let dir = tempdir()?;
|
|
252
|
+
let db_path = dir.path().join("test_migration.db");
|
|
253
|
+
let conn = Connection::open(&db_path)?;
|
|
254
|
+
|
|
255
|
+
// Create v1 tables
|
|
256
|
+
conn.execute_batch(
|
|
257
|
+
r#"
|
|
258
|
+
CREATE TABLE old_files (
|
|
259
|
+
id INTEGER PRIMARY KEY,
|
|
260
|
+
path TEXT NOT NULL,
|
|
261
|
+
hash TEXT,
|
|
262
|
+
last_indexed INTEGER,
|
|
263
|
+
patterns_count INTEGER
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
CREATE TABLE old_embeddings (
|
|
267
|
+
id INTEGER PRIMARY KEY,
|
|
268
|
+
pattern TEXT NOT NULL,
|
|
269
|
+
embedding BLOB,
|
|
270
|
+
metadata TEXT,
|
|
271
|
+
created_at INTEGER,
|
|
272
|
+
file_hash TEXT
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
INSERT INTO old_files (path, hash, patterns_count) VALUES
|
|
276
|
+
('/old_file.rs', 'hash123', 3),
|
|
277
|
+
('/old_file2.rs', 'hash456', 5);
|
|
278
|
+
|
|
279
|
+
INSERT INTO old_embeddings (pattern, embedding, metadata, created_at) VALUES
|
|
280
|
+
('fn test1()', x'01020304', '{"path": "/old_file.rs", "line_number": 10}', 1234567890),
|
|
281
|
+
('struct TestStruct', x'05060708', '{"path": "/old_file.rs", "line_number": 20}', 1234567891);
|
|
282
|
+
"#
|
|
283
|
+
)?;
|
|
284
|
+
|
|
285
|
+
// Run atomic migration
|
|
286
|
+
let result = crate::migration_tx::MigrationWithTx::migrate_v1_to_v2_atomic(&conn);
|
|
287
|
+
|
|
288
|
+
assert!(result.is_ok());
|
|
289
|
+
|
|
290
|
+
// Validate migration
|
|
291
|
+
let validation_result = crate::migration_tx::MigrationWithTx::validate_migration(&conn);
|
|
292
|
+
assert!(validation_result.is_ok());
|
|
293
|
+
|
|
294
|
+
// Check v2 tables exist
|
|
295
|
+
let v2_tables = ["entities", "entity_embeddings", "files"];
|
|
296
|
+
for table in &v2_tables {
|
|
297
|
+
let exists = conn.prepare(
|
|
298
|
+
"SELECT 1 FROM sqlite_master WHERE type='table' AND name=?"
|
|
299
|
+
)?.exists([table])?;
|
|
300
|
+
assert!(exists, "Table {} should exist", table);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Check data was migrated
|
|
304
|
+
let entity_count: i64 = conn.query_row(
|
|
305
|
+
"SELECT COUNT(*) FROM entities",
|
|
306
|
+
[],
|
|
307
|
+
|row| row.get(0)
|
|
308
|
+
)?;
|
|
309
|
+
|
|
310
|
+
assert!(entity_count > 0, "Entities should have been migrated");
|
|
311
|
+
|
|
312
|
+
// Check old tables were renamed
|
|
313
|
+
let backup_exists = conn.prepare(
|
|
314
|
+
"SELECT 1 FROM sqlite_master WHERE type='table' AND name='old_embeddings_v1_backup'"
|
|
315
|
+
)?.exists([])?;
|
|
316
|
+
assert!(backup_exists, "Backup table should exist");
|
|
317
|
+
|
|
318
|
+
Ok(())
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/// Test transaction isolation
|
|
322
|
+
#[test]
|
|
323
|
+
fn test_transaction_isolation() -> Result<()> {
|
|
324
|
+
let dir = tempdir()?;
|
|
325
|
+
let db_path = dir.path().join("test_isolation.db");
|
|
326
|
+
let conn = Connection::open(&db_path)?;
|
|
327
|
+
|
|
328
|
+
// Initialize schema
|
|
329
|
+
SchemaV2::initialize(&conn)?;
|
|
330
|
+
|
|
331
|
+
// Start a transaction
|
|
332
|
+
let tx = conn.transaction()?;
|
|
333
|
+
|
|
334
|
+
// Insert entity within transaction
|
|
335
|
+
tx.execute(
|
|
336
|
+
r#"
|
|
337
|
+
INSERT INTO entities (kind, name, file_path, line_number)
|
|
338
|
+
VALUES (?1, ?2, ?3, ?4)
|
|
339
|
+
"#,
|
|
340
|
+
params!["function", "tx_function", "/tx.rs", 1i64]
|
|
341
|
+
)?;
|
|
342
|
+
|
|
343
|
+
// Check from within transaction - should see the entity
|
|
344
|
+
let count_in_tx: i64 = tx.query_row(
|
|
345
|
+
"SELECT COUNT(*) FROM entities WHERE name = ?",
|
|
346
|
+
["tx_function"],
|
|
347
|
+
|row| row.get(0)
|
|
348
|
+
)?;
|
|
349
|
+
assert_eq!(count_in_tx, 1);
|
|
350
|
+
|
|
351
|
+
// Check from main connection - should NOT see the entity yet
|
|
352
|
+
let count_main: i64 = conn.query_row(
|
|
353
|
+
"SELECT COUNT(*) FROM entities WHERE name = ?",
|
|
354
|
+
["tx_function"],
|
|
355
|
+
|row| row.get(0)
|
|
356
|
+
)?;
|
|
357
|
+
assert_eq!(count_main, 0);
|
|
358
|
+
|
|
359
|
+
// Commit the transaction
|
|
360
|
+
tx.commit()?;
|
|
361
|
+
|
|
362
|
+
// Now main connection should see the entity
|
|
363
|
+
let count_main: i64 = conn.query_row(
|
|
364
|
+
"SELECT COUNT(*) FROM entities WHERE name = ?",
|
|
365
|
+
["tx_function"],
|
|
366
|
+
|row| row.get(0)
|
|
367
|
+
)?;
|
|
368
|
+
assert_eq!(count_main, 1);
|
|
369
|
+
|
|
370
|
+
Ok(())
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/// Test concurrent transaction behavior with savepoints
|
|
374
|
+
#[test]
|
|
375
|
+
fn test_savepoint_rollback() -> Result<()> {
|
|
376
|
+
let dir = tempdir()?;
|
|
377
|
+
let db_path = dir.path().join("test_savepoint.db");
|
|
378
|
+
let conn = Connection::open(&db_path)?;
|
|
379
|
+
|
|
380
|
+
// Initialize schema
|
|
381
|
+
SchemaV2::initialize(&conn)?;
|
|
382
|
+
|
|
383
|
+
// Insert initial data
|
|
384
|
+
conn.execute(
|
|
385
|
+
"INSERT INTO entities (kind, name, file_path, line_number) VALUES (?1, ?2, ?3, ?4)",
|
|
386
|
+
params!["function", "initial", "/initial.rs", 1i64]
|
|
387
|
+
)?;
|
|
388
|
+
|
|
389
|
+
// Create a savepoint
|
|
390
|
+
let sp = conn.savepoint()?;
|
|
391
|
+
|
|
392
|
+
// Insert more data
|
|
393
|
+
sp.execute(
|
|
394
|
+
"INSERT INTO entities (kind, name, file_path, line_number) VALUES (?1, ?2, ?3, ?4)",
|
|
395
|
+
params!["function", "savepoint", "/savepoint.rs", 2i64]
|
|
396
|
+
)?;
|
|
397
|
+
|
|
398
|
+
// Check count within savepoint
|
|
399
|
+
let count: i64 = conn.query_row("SELECT COUNT(*) FROM entities", [], |row| row.get(0))?;
|
|
400
|
+
assert_eq!(count, 2);
|
|
401
|
+
|
|
402
|
+
// Rollback savepoint
|
|
403
|
+
sp.rollback()?;
|
|
404
|
+
|
|
405
|
+
// Should only have initial data
|
|
406
|
+
let count: i64 = conn.query_row("SELECT COUNT(*) FROM entities", [], |row| row.get(0))?;
|
|
407
|
+
assert_eq!(count, 1);
|
|
408
|
+
|
|
409
|
+
Ok(())
|
|
410
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Test script for AST-based indexing
|
|
2
|
+
// Run with: cargo run --bin test_ast_indexing
|
|
3
|
+
|
|
4
|
+
use anyhow::Result;
|
|
5
|
+
use std::path::Path;
|
|
6
|
+
use tracing_subscriber;
|
|
7
|
+
|
|
8
|
+
mod embeddings;
|
|
9
|
+
mod sqlite_store;
|
|
10
|
+
mod search_engine;
|
|
11
|
+
mod cli;
|
|
12
|
+
mod extractors;
|
|
13
|
+
mod schema_v2;
|
|
14
|
+
mod migration;
|
|
15
|
+
mod store_v2;
|
|
16
|
+
mod query_api;
|
|
17
|
+
|
|
18
|
+
use cli::index_ast::AstIndexCommand;
|
|
19
|
+
|
|
20
|
+
fn main() -> Result<()> {
|
|
21
|
+
// Initialize logging
|
|
22
|
+
tracing_subscriber::fmt()
|
|
23
|
+
.with_env_filter("debug")
|
|
24
|
+
.with_target(false)
|
|
25
|
+
.init();
|
|
26
|
+
|
|
27
|
+
println!("Testing AST-based indexing...");
|
|
28
|
+
|
|
29
|
+
let project_path = Path::new(".").canonicalize()?;
|
|
30
|
+
|
|
31
|
+
// Create AST index command
|
|
32
|
+
let mut cmd = AstIndexCommand::new(
|
|
33
|
+
&project_path,
|
|
34
|
+
Path::new("."),
|
|
35
|
+
vec!["rs".to_string(), "ts".to_string()],
|
|
36
|
+
None,
|
|
37
|
+
true, // force rebuild
|
|
38
|
+
)?;
|
|
39
|
+
|
|
40
|
+
// Execute indexing
|
|
41
|
+
let stats = cmd.execute()?;
|
|
42
|
+
|
|
43
|
+
// Print results
|
|
44
|
+
println!("\n=== AST Indexing Results ===");
|
|
45
|
+
println!("Files processed: {}", stats.files_processed);
|
|
46
|
+
println!("Entities extracted: {}", stats.entities_extracted);
|
|
47
|
+
println!("References extracted: {}", stats.references_extracted);
|
|
48
|
+
println!("Embeddings generated: {}", stats.embeddings_generated);
|
|
49
|
+
println!("Index time: {}ms", stats.index_time_ms);
|
|
50
|
+
|
|
51
|
+
if !stats.errors.is_empty() {
|
|
52
|
+
println!("\nErrors encountered:");
|
|
53
|
+
for error in &stats.errors {
|
|
54
|
+
println!(" - {}", error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Ok(())
|
|
59
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Test script for Phase 4 Query API
|
|
4
|
+
# This script tests the new query functionality
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
echo "=== Testing Phase 4 Query API Implementation ==="
|
|
9
|
+
echo
|
|
10
|
+
|
|
11
|
+
# Check if the binary was built
|
|
12
|
+
BINARY_PATH="./target/debug/local-ruvector"
|
|
13
|
+
if [ ! -f "$BINARY_PATH" ]; then
|
|
14
|
+
echo "❌ Binary not found at $BINARY_PATH"
|
|
15
|
+
echo "Please build the project first with: cargo build"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "✅ Binary found at $BINARY_PATH"
|
|
20
|
+
echo
|
|
21
|
+
|
|
22
|
+
# Test 1: Check help for new subcommands
|
|
23
|
+
echo "1. Testing help for 'find' subcommand:"
|
|
24
|
+
$BINARY_PATH find --help | head -10
|
|
25
|
+
echo
|
|
26
|
+
|
|
27
|
+
echo "2. Testing help for 'refs' subcommand:"
|
|
28
|
+
$BINARY_PATH refs --help | head -10
|
|
29
|
+
echo
|
|
30
|
+
|
|
31
|
+
# Test 2: Create a simple test case
|
|
32
|
+
echo "3. Creating test data..."
|
|
33
|
+
mkdir -p test_code
|
|
34
|
+
cat > test_code/sample.rs << 'EOF'
|
|
35
|
+
use std::collections::HashMap;
|
|
36
|
+
|
|
37
|
+
pub struct Album {
|
|
38
|
+
pub id: u32,
|
|
39
|
+
pub title: String,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
pub fn create_album(id: u32, title: &str) -> Album {
|
|
43
|
+
Album { id, title: title.to_string() }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
pub fn print_album(album: &Album) {
|
|
47
|
+
println!("Album {}: {}", album.id, album.title);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
fn main() {
|
|
51
|
+
let album = create_album(1, "Test Album");
|
|
52
|
+
print_album(&album);
|
|
53
|
+
}
|
|
54
|
+
EOF
|
|
55
|
+
|
|
56
|
+
echo "✅ Created test_code/sample.rs"
|
|
57
|
+
echo
|
|
58
|
+
|
|
59
|
+
# Test 3: Initialize and index
|
|
60
|
+
echo "4. Initializing ruvector..."
|
|
61
|
+
$BINARY_PATH init --force
|
|
62
|
+
echo
|
|
63
|
+
|
|
64
|
+
echo "5. Indexing test files..."
|
|
65
|
+
$BINARY_PATH index --path test_code --types rs
|
|
66
|
+
echo
|
|
67
|
+
|
|
68
|
+
# Test 4: Test find commands
|
|
69
|
+
echo "6. Testing find commands..."
|
|
70
|
+
|
|
71
|
+
echo "6a. Find functions using type 'Album':"
|
|
72
|
+
$BINARY_PATH find --uses-type Album --limit 10
|
|
73
|
+
echo
|
|
74
|
+
|
|
75
|
+
echo "6b. Find callers of function 'create_album':"
|
|
76
|
+
$BINARY_PATH find --called-by create_album
|
|
77
|
+
echo
|
|
78
|
+
|
|
79
|
+
echo "6c. Find types from test_code/sample.rs used elsewhere:"
|
|
80
|
+
$BINARY_PATH find --types-from test_code/sample.rs
|
|
81
|
+
echo
|
|
82
|
+
|
|
83
|
+
echo "6d. Find public API of test_code module:"
|
|
84
|
+
$BINARY_PATH find --public-api test_code --format detailed
|
|
85
|
+
echo
|
|
86
|
+
|
|
87
|
+
# Test 5: Test refs command
|
|
88
|
+
echo "7. Testing refs command for 'Album':"
|
|
89
|
+
$BINARY_PATH refs Album --format simple
|
|
90
|
+
echo
|
|
91
|
+
|
|
92
|
+
echo "8. Testing refs command with JSON output:"
|
|
93
|
+
$BINARY_PATH refs create_album --format json | jq . 2>/dev/null || echo "(jq not available for pretty printing)"
|
|
94
|
+
echo
|
|
95
|
+
|
|
96
|
+
# Cleanup
|
|
97
|
+
echo "9. Cleaning up test data..."
|
|
98
|
+
rm -rf test_code
|
|
99
|
+
$BINARY_PATH reset --confirm 2>/dev/null || true
|
|
100
|
+
echo "✅ Cleanup complete"
|
|
101
|
+
echo
|
|
102
|
+
|
|
103
|
+
echo "=== Phase 4 Query API Tests Complete ==="
|