Commit 4faab9f
fix: resolve CodeQL syntax errors, type checking issues, and update dependency version bounds (#45)
* fix: resolve CodeQL syntax errors in JavaScript/TypeScript and Python files
- Fix TypeScript syntax errors in contextforgeClient.ts:
- Fix missing JSDoc comment opening
- Fix method call parameter mismatch in shouldRetry
- Implement complete v1Checkpoint method
- Remove orphaned code blocks
- Fix Python syntax errors in test_vulnerability_scripts.py:
- Remove duplicate @patch decorators
- Remove invalid @@ syntax characters
- Fix malformed test structure
- Remove empty test_optional_properties.ts file
- Add test_syntax.py for syntax validation
Resolves CodeQL parse errors for both JavaScript/TypeScript and Python languages
* docs: update cursor rules to prohibit --no-verify usage
- Add strict guidelines against using --no-verify flag
- Emphasize fixing all errors before pushing
- Add detailed explanations of why --no-verify is dangerous
- Provide specific solutions for common pre-commit failures
- Update Python, testing, and general rules with quality gates
- Ensure CI/CD alignment by preventing bypassed checks
This prevents CI failures and maintains code quality standards.
* fix: resolve all type checking issues
- Add type: ignore comments to tiktoken import in openai.py
- Add type: ignore comments to handler imports in test files
- Fix import resolution errors for dynamic path manipulation
- All type checking now passes with 0 errors, 0 warnings
Resolves pyright type checking issues:
- tiktoken import error in src/contextforge_memory/summarize/openai.py
- handlers.json_handler import error in tests/test_json_handler.py
- handlers.toml_handler import error in tests/test_toml_handler.py
* Update clients/typescript/contextforgeClient.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: add metadata validation to v1Checkpoint method
- Add validation guard for metadata parameter in v1Checkpoint method
- Validate that metadata is a non-null object when provided
- Reject arrays and null values to match validateMemoryItem behavior
- Throw descriptive error message for invalid metadata types
- Ensures type safety and consistency across the TypeScript client
* chore: update dependencies
- Update click from 8.1.8 to 8.3.0
- Update rich from 13.5.3 to 14.2.0
- Update tomli from 2.0.2 to 2.3.0
- Addresses potential CI dependency issues
* fix: add mypy dependency and resolve type checking issues
- Add mypy>=1.0.0 to requirements-dev.in
- Regenerate requirements-dev.txt with mypy==1.18.2
- Remove unused type: ignore comments in openai.py
- Fixes CI failure: 'mypy: command not found'
- Resolves mypy strict mode type checking errors
The CI was failing because mypy was not installed in the environment.
This commit adds mypy as a development dependency and removes
unnecessary type suppressions that were causing mypy errors.
* security: add SHA256 integrity hashes to requirements.txt
- Regenerate requirements.txt with pip-compile --generate-hashes
- All 20 dependencies now have corresponding --hash=sha256:... lines
- Ensures package integrity and prevents supply chain attacks
- Meets security requirements for dependency verification
Dependencies updated with hashes:
- click==8.3.0, rich==14.2.0, tomli==2.3.0 (previously missing hashes)
- All other dependencies also regenerated with current hashes
- Maintains exact same versions while adding security verification
* feat: update OpenAI and tiktoken version bounds
- Update openai constraint from <2.0.0 to <3.0.0 to allow 2.x versions
- Update tiktoken constraint from <1.0.0 to <1.0.0 (corrected from <2.0.0)
- Allows OpenAI 2.x versions for latest features and security patches
- Maintains tiktoken 0.x compatibility while preventing breaking 1.x changes
- All functionality tested and verified working
- Code formatting applied to maintain consistency
Resolves version constraint issues and future-proofs dependencies.
* fix: resolve CI hash mismatch by adding setuptools to requirements
- Add setuptools>=65.5.1 to requirements.in to resolve hash mismatch
- Regenerate requirements.txt with proper setuptools hashes
- Fixes CI failure: 'setuptools>=65.5.1' missing from requirements.txt
- Maintains version bounds for openai and tiktoken
* fix: include setuptools in requirements.txt to resolve CI hash mismatch
- Use --allow-unsafe flag with pip-compile to include setuptools
- Add setuptools==80.9.0 with proper hashes to requirements.txt
- Fixes CI failure: 'setuptools>=65.5.1' missing from requirements.txt
- Maintains version bounds for openai and tiktoken
---------
Co-authored-by: Ben De Cock <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>1 parent 0c9e2db commit 4faab9f
File tree
15 files changed
+2072
-61
lines changed- .cursor/rules
- .github/scripts
- clients/typescript
- src/contextforge_memory
- vector_index
- tests
15 files changed
+2072
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
84 | 139 | | |
85 | 140 | | |
86 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
16 | 56 | | |
17 | 57 | | |
18 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
8 | 41 | | |
9 | 42 | | |
10 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 183 | | |
191 | 184 | | |
192 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
250 | | - | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
508 | 552 | | |
509 | 553 | | |
510 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
155 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments