Skip to content

Commit 10dc992

Browse files
authored
fix: resolve 3 bugs — cacheHitRate overflow, null depth count, checkpoint TypeError (SynkraAI#581)
fix: resolve 3 bugs — cacheHitRate denominator, null depth guard, checkpoint TypeError
1 parent de9ee7b commit 10dc992

4 files changed

Lines changed: 61 additions & 61 deletions

File tree

.aiox-core/core/config/config-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ function clearCache() {
221221
function getPerformanceMetrics() {
222222
return {
223223
...performanceMetrics,
224-
cacheHitRate: performanceMetrics.loads > 0
225-
? ((performanceMetrics.cacheHits / performanceMetrics.loads) * 100).toFixed(1) + '%'
224+
cacheHitRate: (performanceMetrics.cacheHits + performanceMetrics.cacheMisses) > 0
225+
? ((performanceMetrics.cacheHits / (performanceMetrics.cacheHits + performanceMetrics.cacheMisses)) * 100).toFixed(1) + '%'
226226
: '0%',
227227
avgLoadTimeMs: Math.round(performanceMetrics.avgLoadTime),
228228
};

.aiox-core/core/execution/build-state-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ class BuildStateManager {
397397
* @returns {Object|null} Last checkpoint or null
398398
*/
399399
getLastCheckpoint() {
400-
if (!this._state || this._state.checkpoints.length === 0) {
400+
if (!this._state || !this._state.checkpoints || this._state.checkpoints.length === 0) {
401401
return null;
402402
}
403403
return this._state.checkpoints[this._state.checkpoints.length - 1];

.aiox-core/core/utils/yaml-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class YAMLValidator {
261261

262262
let maxDepth = currentDepth;
263263
for (const value of Object.values(obj)) {
264-
if (typeof value === 'object') {
264+
if (typeof value === 'object' && value !== null) {
265265
const depth = this.getMaxDepth(value, currentDepth + 1);
266266
maxDepth = Math.max(maxDepth, depth);
267267
}

.aiox-core/install-manifest.yaml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# - File types for categorization
99
#
1010
version: 5.0.3
11-
generated_at: "2026-03-10T17:08:07.160Z"
11+
generated_at: "2026-03-10T23:52:53.758Z"
1212
generator: scripts/generate-install-manifest.js
1313
file_count: 1089
1414
files:
@@ -241,9 +241,9 @@ files:
241241
type: core
242242
size: 4704
243243
- path: core/config/config-loader.js
244-
hash: sha256:e19fee885b060c85ee75df71a016259b8e4c21e6c7045a58514afded3a2386a8
244+
hash: sha256:bbc6a9e57e9db7a74ae63c901b199f8b8a79eb093f23a280b6420d1aa5f7f813
245245
type: core
246-
size: 8456
246+
size: 8534
247247
- path: core/config/config-resolver.js
248248
hash: sha256:3b29df6954cec440debef87cb4e4e7610c94dc74e562d32c74b8ec57d893213b
249249
type: core
@@ -405,9 +405,9 @@ files:
405405
type: core
406406
size: 31780
407407
- path: core/execution/build-state-manager.js
408-
hash: sha256:595523caf6db26624e7a483489345b9498ae15d99c2568073a2c0c45d5b46a54
408+
hash: sha256:415fca3ad3d750db1f41f14f33971cf661ee9d6073a570175d695bb3c1be655c
409409
type: core
410-
size: 48948
410+
size: 48976
411411
- path: core/execution/context-injector.js
412412
hash: sha256:a183255eb4831f701086f23f371f94a9ce10c46ea18c8369ec0fd756777f042f
413413
type: core
@@ -1205,9 +1205,9 @@ files:
12051205
type: core
12061206
size: 9061
12071207
- path: core/utils/yaml-validator.js
1208-
hash: sha256:41e3715845262c2e49f58745a773e81f4feaaa2325e54bcb0226e4bf08f709dd
1208+
hash: sha256:05084596198634dd2a670a752d5c451edfe268e16e3bae511db52184f895366f
12091209
type: core
1210-
size: 10916
1210+
size: 10934
12111211
- path: data/agent-config-requirements.yaml
12121212
hash: sha256:68e87b5777d1872c4fed6644dd3c7e3c3e8fd590df7d2b58c36d541cf8e38dd3
12131213
type: data
@@ -2583,47 +2583,47 @@ files:
25832583
- path: development/templates/service-template/__tests__/index.test.ts.hbs
25842584
hash: sha256:4617c189e75ab362d4ef2cabcc3ccce3480f914fd915af550469c17d1b68a4fe
25852585
type: template
2586-
size: 9810
2586+
size: 9573
25872587
- path: development/templates/service-template/client.ts.hbs
25882588
hash: sha256:f342c60695fe611192002bdb8c04b3a0dbce6345b7fa39834ea1898f71689198
25892589
type: template
2590-
size: 12213
2590+
size: 11810
25912591
- path: development/templates/service-template/errors.ts.hbs
25922592
hash: sha256:e0be40d8be19b71b26e35778eadffb20198e7ca88e9d140db9da1bfe12de01ec
25932593
type: template
2594-
size: 5395
2594+
size: 5213
25952595
- path: development/templates/service-template/index.ts.hbs
25962596
hash: sha256:d44012d54b76ab98356c7163d257ca939f7fed122f10fecf896fe1e7e206d10a
25972597
type: template
2598-
size: 3206
2598+
size: 3086
25992599
- path: development/templates/service-template/jest.config.js
26002600
hash: sha256:1681bfd7fbc0d330d3487d3427515847c4d57ef300833f573af59e0ad69ed159
26012601
type: template
26022602
size: 1750
26032603
- path: development/templates/service-template/package.json.hbs
26042604
hash: sha256:d89d35f56992ee95c2ceddf17fa1d455c18007a4d24af914ba83cf4abc38bca9
26052605
type: template
2606-
size: 2314
2606+
size: 2227
26072607
- path: development/templates/service-template/README.md.hbs
26082608
hash: sha256:2c3dd4c2bf6df56b9b6db439977be7e1cc35820438c0e023140eccf6ccd227a0
26092609
type: template
2610-
size: 3584
2610+
size: 3426
26112611
- path: development/templates/service-template/tsconfig.json
26122612
hash: sha256:8b465fcbdd45c4d6821ba99aea62f2bd7998b1bca8de80486a1525e77d43c9a1
26132613
type: template
26142614
size: 1135
26152615
- path: development/templates/service-template/types.ts.hbs
26162616
hash: sha256:3e52e0195003be8cd1225a3f27f4d040686c8b8c7762f71b41055f04cd1b841b
26172617
type: template
2618-
size: 2661
2618+
size: 2516
26192619
- path: development/templates/squad-template/agents/example-agent.yaml
26202620
hash: sha256:824a1b349965e5d4ae85458c231b78260dc65497da75dada25b271f2cabbbe67
26212621
type: agent
26222622
size: 736
26232623
- path: development/templates/squad-template/LICENSE
26242624
hash: sha256:ff7017aa403270cf2c440f5ccb4240d0b08e54d8bf8a0424d34166e8f3e10138
26252625
type: template
2626-
size: 1092
2626+
size: 1071
26272627
- path: development/templates/squad-template/package.json
26282628
hash: sha256:8f68627a0d74e49f94ae382d0c2b56ecb5889d00f3095966c742fb5afaf363db
26292629
type: template
@@ -3367,11 +3367,11 @@ files:
33673367
- path: infrastructure/templates/aiox-sync.yaml.template
33683368
hash: sha256:0040ad8a9e25716a28631b102c9448b72fd72e84f992c3926eb97e9e514744bb
33693369
type: template
3370-
size: 8567
3370+
size: 8385
33713371
- path: infrastructure/templates/coderabbit.yaml.template
33723372
hash: sha256:91a4a76bbc40767a4072fb6a87c480902bb800cfb0a11e9fc1b3183d8f7f3a80
33733373
type: template
3374-
size: 8321
3374+
size: 8042
33753375
- path: infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml
33763376
hash: sha256:9bdb0c0e09c765c991f9f142921f7f8e2c0d0ada717f41254161465dc0622d02
33773377
type: template
@@ -3383,35 +3383,35 @@ files:
33833383
- path: infrastructure/templates/github-workflows/ci.yml.template
33843384
hash: sha256:acbfa2a8a84141fd6a6b205eac74719772f01c221c0afe22ce951356f06a605d
33853385
type: template
3386-
size: 5089
3386+
size: 4920
33873387
- path: infrastructure/templates/github-workflows/pr-automation.yml.template
33883388
hash: sha256:c236077b4567965a917e48df9a91cc42153ff97b00a9021c41a7e28179be9d0f
33893389
type: template
3390-
size: 10939
3390+
size: 10609
33913391
- path: infrastructure/templates/github-workflows/README.md
33923392
hash: sha256:6b7b5cb32c28b3e562c81a96e2573ea61849b138c93ccac6e93c3adac26cadb5
33933393
type: template
33943394
size: 2654
33953395
- path: infrastructure/templates/github-workflows/release.yml.template
33963396
hash: sha256:b771145e61a254a88dc6cca07869e4ece8229ce18be87132f59489cdf9a66ec6
33973397
type: template
3398-
size: 6791
3398+
size: 6595
33993399
- path: infrastructure/templates/gitignore/gitignore-aiox-base.tmpl
34003400
hash: sha256:9088975ee2bf4d88e23db6ac3ea5d27cccdc72b03db44450300e2f872b02e935
34013401
type: template
3402-
size: 851
3402+
size: 788
34033403
- path: infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl
34043404
hash: sha256:ce4291a3cf5677050c9dafa320809e6b0ca5db7e7f7da0382d2396e32016a989
34053405
type: template
3406-
size: 506
3406+
size: 488
34073407
- path: infrastructure/templates/gitignore/gitignore-node.tmpl
34083408
hash: sha256:5179f78de7483274f5d7182569229088c71934db1fd37a63a40b3c6b815c9c8e
34093409
type: template
3410-
size: 1036
3410+
size: 951
34113411
- path: infrastructure/templates/gitignore/gitignore-python.tmpl
34123412
hash: sha256:d7aac0b1e6e340b774a372a9102b4379722588449ca82ac468cf77804bbc1e55
34133413
type: template
3414-
size: 1725
3414+
size: 1580
34153415
- path: infrastructure/templates/project-docs/coding-standards-tmpl.md
34163416
hash: sha256:377acf85463df8ac9923fc59d7cfeba68a82f8353b99948ea1d28688e88bc4a9
34173417
type: template
@@ -3507,43 +3507,43 @@ files:
35073507
- path: monitor/hooks/lib/__init__.py
35083508
hash: sha256:bfab6ee249c52f412c02502479da649b69d044938acaa6ab0aa39dafe6dee9bf
35093509
type: monitor
3510-
size: 30
3510+
size: 29
35113511
- path: monitor/hooks/lib/enrich.py
35123512
hash: sha256:20dfa73b4b20d7a767e52c3ec90919709c4447c6e230902ba797833fc6ddc22c
35133513
type: monitor
3514-
size: 1702
3514+
size: 1644
35153515
- path: monitor/hooks/lib/send_event.py
35163516
hash: sha256:59d61311f718fb373a5cf85fd7a01c23a4fd727e8e022ad6930bba533ef4615d
35173517
type: monitor
3518-
size: 1237
3518+
size: 1190
35193519
- path: monitor/hooks/notification.py
35203520
hash: sha256:8a1a6ce0ff2b542014de177006093b9caec9b594e938a343dc6bd62df2504f22
35213521
type: monitor
3522-
size: 528
3522+
size: 499
35233523
- path: monitor/hooks/post_tool_use.py
35243524
hash: sha256:47dbe37073d432c55657647fc5b907ddb56efa859d5c3205e8362aa916d55434
35253525
type: monitor
3526-
size: 1185
3526+
size: 1140
35273527
- path: monitor/hooks/pre_compact.py
35283528
hash: sha256:f287cf45e83deed6f1bc0e30bd9348dfa1bf08ad770c5e58bb34e3feb210b30b
35293529
type: monitor
3530-
size: 529
3530+
size: 500
35313531
- path: monitor/hooks/pre_tool_use.py
35323532
hash: sha256:a4d1d3ffdae9349e26a383c67c9137effff7d164ac45b2c87eea9fa1ab0d6d98
35333533
type: monitor
3534-
size: 1021
3534+
size: 981
35353535
- path: monitor/hooks/stop.py
35363536
hash: sha256:edb382f0cf46281a11a8588bc20eafa7aa2b5cc3f4ad775d71b3d20a7cfab385
35373537
type: monitor
3538-
size: 519
3538+
size: 490
35393539
- path: monitor/hooks/subagent_stop.py
35403540
hash: sha256:fa5357309247c71551dba0a19f28dd09bebde749db033d6657203b50929c0a42
35413541
type: monitor
3542-
size: 541
3542+
size: 512
35433543
- path: monitor/hooks/user_prompt_submit.py
35443544
hash: sha256:af57dca79ef55cdf274432f4abb4c20a9778b95e107ca148f47ace14782c5828
35453545
type: monitor
3546-
size: 856
3546+
size: 818
35473547
- path: package.json
35483548
hash: sha256:9fdf0dcee2dcec6c0643634ee384ba181ad077dcff1267d8807434d4cb4809c7
35493549
type: other
@@ -3691,7 +3691,7 @@ files:
36913691
- path: product/templates/adr.hbs
36923692
hash: sha256:d68653cae9e64414ad4f58ea941b6c6e337c5324c2c7247043eca1461a652d10
36933693
type: template
3694-
size: 2337
3694+
size: 2212
36953695
- path: product/templates/agent-template.yaml
36963696
hash: sha256:98676fcc493c0d5f09264dcc52fcc2cf1129f9a195824ecb4c2ec035c2515121
36973697
type: template
@@ -3743,7 +3743,7 @@ files:
37433743
- path: product/templates/dbdr.hbs
37443744
hash: sha256:5a2781ffaa3da9fc663667b5a63a70b7edfc478ed14cad02fc6ed237ff216315
37453745
type: template
3746-
size: 4380
3746+
size: 4139
37473747
- path: product/templates/design-story-tmpl.yaml
37483748
hash: sha256:2bfefc11ae2bcfc679dbd924c58f8b764fa23538c14cb25344d6edef41968f29
37493749
type: template
@@ -3807,7 +3807,7 @@ files:
38073807
- path: product/templates/epic.hbs
38083808
hash: sha256:dcbcc26f6dd8f3782b3ef17aee049b689f1d6d92931615c3df9513eca0de2ef7
38093809
type: template
3810-
size: 4080
3810+
size: 3868
38113811
- path: product/templates/eslintrc-security.json
38123812
hash: sha256:657d40117261d6a52083984d29f9f88e79040926a64aa4c2058a602bfe91e0d5
38133813
type: template
@@ -3915,19 +3915,19 @@ files:
39153915
- path: product/templates/pmdr.hbs
39163916
hash: sha256:d529cebbb562faa82c70477ece70de7cda871eaa6896f2962b48b2a8b67b1cbe
39173917
type: template
3918-
size: 3425
3918+
size: 3239
39193919
- path: product/templates/prd-tmpl.yaml
39203920
hash: sha256:25c239f40e05f24aee1986601a98865188dbe3ea00a705028efc3adad6d420f3
39213921
type: template
39223922
size: 11952
39233923
- path: product/templates/prd-v2.0.hbs
39243924
hash: sha256:21a20ef5333a85a11f5326d35714e7939b51bab22bd6e28d49bacab755763bea
39253925
type: template
3926-
size: 4728
3926+
size: 4512
39273927
- path: product/templates/prd.hbs
39283928
hash: sha256:4a1a030a5388c6a8bf2ce6ea85e54cae6cf1fe64f1bb2af7f17d349d3c24bf1d
39293929
type: template
3930-
size: 3626
3930+
size: 3425
39313931
- path: product/templates/project-brief-tmpl.yaml
39323932
hash: sha256:b8d388268c24dc5018f48a87036d591b11cb122fafe9b59c17809b06ea5d9d58
39333933
type: template
@@ -3975,7 +3975,7 @@ files:
39753975
- path: product/templates/story.hbs
39763976
hash: sha256:3f0ac8b39907634a2b53f43079afc33663eee76f46e680d318ff253e0befc2c4
39773977
type: template
3978-
size: 5846
3978+
size: 5583
39793979
- path: product/templates/task-execution-report.md
39803980
hash: sha256:e0f08a3e199234f3d2207ba8f435786b7d8e1b36174f46cb82fc3666b9a9309e
39813981
type: template
@@ -3987,67 +3987,67 @@ files:
39873987
- path: product/templates/task.hbs
39883988
hash: sha256:621e987e142c455cd290dc85d990ab860faa0221f66cf1f57ac296b076889ea5
39893989
type: template
3990-
size: 2875
3990+
size: 2705
39913991
- path: product/templates/tmpl-comment-on-examples.sql
39923992
hash: sha256:254002c3fbc63cfcc5848b1d4b15822ce240bf5f57e6a1c8bb984e797edc2691
39933993
type: template
3994-
size: 6373
3994+
size: 6215
39953995
- path: product/templates/tmpl-migration-script.sql
39963996
hash: sha256:44ef63ea475526d21a11e3c667c9fdb78a9fddace80fdbaa2312b7f2724fbbb5
39973997
type: template
3998-
size: 3038
3998+
size: 2947
39993999
- path: product/templates/tmpl-rls-granular-policies.sql
40004000
hash: sha256:36c2fd8c6d9eebb5d164acb0fb0c87bc384d389264b4429ce21e77e06318f5f3
40014001
type: template
4002-
size: 3426
4002+
size: 3322
40034003
- path: product/templates/tmpl-rls-kiss-policy.sql
40044004
hash: sha256:5210d37fce62e5a9a00e8d5366f5f75653cd518be73fbf96333ed8a6712453c7
40054005
type: template
4006-
size: 309
4006+
size: 299
40074007
- path: product/templates/tmpl-rls-roles.sql
40084008
hash: sha256:2d032a608a8e87440c3a430c7d69ddf9393d8813d8d4129270f640dd847425c3
40094009
type: template
4010-
size: 4727
4010+
size: 4592
40114011
- path: product/templates/tmpl-rls-simple.sql
40124012
hash: sha256:f67af0fa1cdd2f2af9eab31575ac3656d82457421208fd9ccb8b57ca9785275e
40134013
type: template
4014-
size: 2992
4014+
size: 2915
40154015
- path: product/templates/tmpl-rls-tenant.sql
40164016
hash: sha256:36629ed87a2c72311809cc3fb96298b6f38716bba35bc56c550ac39d3321757a
40174017
type: template
4018-
size: 5130
4018+
size: 4978
40194019
- path: product/templates/tmpl-rollback-script.sql
40204020
hash: sha256:8b84046a98f1163faf7350322f43831447617c5a63a94c88c1a71b49804e022b
40214021
type: template
4022-
size: 2734
4022+
size: 2657
40234023
- path: product/templates/tmpl-seed-data.sql
40244024
hash: sha256:a65e73298f46cd6a8e700f29b9d8d26e769e12a57751a943a63fd0fe15768615
40254025
type: template
4026-
size: 5716
4026+
size: 5576
40274027
- path: product/templates/tmpl-smoke-test.sql
40284028
hash: sha256:aee7e48bb6d9c093769dee215cacc9769939501914e20e5ea8435b25fad10f3c
40294029
type: template
4030-
size: 739
4030+
size: 723
40314031
- path: product/templates/tmpl-staging-copy-merge.sql
40324032
hash: sha256:55988caeb47cc04261665ba7a37f4caa2aa5fac2e776fdbc5964e0587af24450
40334033
type: template
4034-
size: 4220
4034+
size: 4081
40354035
- path: product/templates/tmpl-stored-proc.sql
40364036
hash: sha256:2b205ff99dc0adfade6047a4d79f5b50109e50ceb45386e5c886437692c7a2a3
40374037
type: template
4038-
size: 3979
4038+
size: 3839
40394039
- path: product/templates/tmpl-trigger.sql
40404040
hash: sha256:93abdc92e1b475d1370094e69a9d1b18afd804da6acb768b878355c798bd8e0e
40414041
type: template
4042-
size: 5424
4042+
size: 5272
40434043
- path: product/templates/tmpl-view-materialized.sql
40444044
hash: sha256:47935510f03d4ad9b2200748e65441ce6c2d6a7c74750395eca6831d77c48e91
40454045
type: template
4046-
size: 4496
4046+
size: 4363
40474047
- path: product/templates/tmpl-view.sql
40484048
hash: sha256:22557b076003a856b32397f05fa44245a126521de907058a95e14dd02da67aff
40494049
type: template
4050-
size: 5093
4050+
size: 4916
40514051
- path: product/templates/token-exports-css-tmpl.css
40524052
hash: sha256:d937b8d61cdc9e5b10fdff871c6cb41c9f756004d060d671e0ae26624a047f62
40534053
type: template

0 commit comments

Comments
 (0)