pumuki-ast-hooks 5.6.14 → 5.6.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki-ast-hooks",
3
- "version": "5.6.14",
3
+ "version": "5.6.15",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -10,3 +10,4 @@
10
10
  {"timestamp":"2026-01-11T18:54:50.282Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
11
11
  {"timestamp":"2026-01-11T19:08:34.232Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
12
12
  {"timestamp":"2026-01-11T20:43:24.310Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
13
+ {"timestamp":"2026-01-11T21:27:16.722Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
@@ -46,3 +46,7 @@
46
46
  {"timestamp":"2026-01-11T20:43:24.460Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_CONFIG_EXISTS","data":{"configPath":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.hook-system/config.json"},"context":{}}
47
47
  {"timestamp":"2026-01-11T20:43:24.461Z","level":"error","component":"InstallWizard","event":"INSTALL_WIZARD_SYMLINK_FAILED","data":{"error":"EEXIST: file already exists, symlink '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/scripts/hooks-system/bin/guard-supervisor.js' -> '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.git/hooks/guard-supervisor'"},"context":{}}
48
48
  {"timestamp":"2026-01-11T20:43:24.461Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
49
+ {"timestamp":"2026-01-11T21:27:16.554Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_START","data":{"repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"},"context":{}}
50
+ {"timestamp":"2026-01-11T21:27:16.569Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_CONFIG_EXISTS","data":{"configPath":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.hook-system/config.json"},"context":{}}
51
+ {"timestamp":"2026-01-11T21:27:16.571Z","level":"error","component":"InstallWizard","event":"INSTALL_WIZARD_SYMLINK_FAILED","data":{"error":"EEXIST: file already exists, symlink '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/scripts/hooks-system/bin/guard-supervisor.js' -> '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.git/hooks/guard-supervisor'"},"context":{}}
52
+ {"timestamp":"2026-01-11T21:27:16.572Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
@@ -530,3 +530,27 @@
530
530
  {"timestamp":1768164204310,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
531
531
  {"timestamp":1768164204310,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
532
532
  {"timestamp":1768164204310,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
533
+ {"timestamp":1768166836716,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
534
+ {"timestamp":1768166836720,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
535
+ {"timestamp":1768166836720,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
536
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
537
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
538
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
539
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
540
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
541
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
542
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
543
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
544
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
545
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
546
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
547
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
548
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
549
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
550
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
551
+ {"timestamp":1768166836721,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
552
+ {"timestamp":1768166836722,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
553
+ {"timestamp":1768166836722,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
554
+ {"timestamp":1768166836722,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
555
+ {"timestamp":1768166836722,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
556
+ {"timestamp":1768166836722,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
@@ -88,7 +88,7 @@ describe('AST Common Module', () => {
88
88
  expect(findings.some(f => f.ruleId === 'common.testing.missing_track_for_memory_leaks')).toBe(false);
89
89
  });
90
90
 
91
- it('does not report false positives for simple value type tests (Ruralgo case)', () => {
91
+ it('does report missing_makesut/missing_track_for_memory_leaks for value type tests unless explicitly ignored (Ruralgo case)', () => {
92
92
  const project = new Project({
93
93
  useInMemoryFileSystem: true,
94
94
  skipAddingFilesFromTsConfig: true,
@@ -119,8 +119,8 @@ final class DomainAPIEndpointTests: XCTestCase {
119
119
  const findings = [];
120
120
  runCommonIntelligence(project, findings);
121
121
 
122
- expect(findings.some(f => f.ruleId === 'common.testing.missing_makesut')).toBe(false);
123
- expect(findings.some(f => f.ruleId === 'common.testing.missing_track_for_memory_leaks')).toBe(false);
122
+ expect(findings.some(f => f.ruleId === 'common.testing.missing_makesut')).toBe(true);
123
+ expect(findings.some(f => f.ruleId === 'common.testing.missing_track_for_memory_leaks')).toBe(true);
124
124
  });
125
125
 
126
126
  it('does apply rules to complex tests with async/classes', () => {
@@ -184,6 +184,42 @@ final class SomeTests: XCTestCase {
184
184
  expect(findings.some(f => f.ruleId === 'common.testing.missing_makesut')).toBe(false);
185
185
  expect(findings.some(f => f.ruleId === 'common.testing.missing_track_for_memory_leaks')).toBe(false);
186
186
  });
187
+
188
+ it('allows explicit ignore for Ruralgo value type tests via ast-ignore comment', () => {
189
+ const project = new Project({
190
+ useInMemoryFileSystem: true,
191
+ skipAddingFilesFromTsConfig: true,
192
+ });
193
+
194
+ const swiftPath = '/tmp/DomainAPIEndpointTests.spec.swift';
195
+ const ignoredValueTypeTest = `import Domain
196
+ import XCTest
197
+ // ast-ignore: missing_makesut, missing_track_for_memory_leaks
198
+
199
+ final class DomainAPIEndpointTests: XCTestCase {
200
+ func test_givenCustomInit_whenAccessingProperties_thenReturnsExpectedValues() {
201
+ let body = Data([0x01, 0x02])
202
+ let queryItems = [URLQueryItem(name: "page", value: "1")]
203
+
204
+ let endpointPatch = APIEndpoint(
205
+ path: "/any", method: .patch, body: body, queryItems: queryItems)
206
+
207
+ XCTAssertEqual(endpointPatch.path, "/any")
208
+ XCTAssertEqual(endpointPatch.method, .patch)
209
+ XCTAssertEqual(endpointPatch.body, body)
210
+ XCTAssertEqual(endpointPatch.queryItems, queryItems)
211
+ }
212
+ }`;
213
+
214
+ const sf = project.createSourceFile(swiftPath, ignoredValueTypeTest);
215
+ jest.spyOn(fs, 'readFileSync').mockReturnValue(ignoredValueTypeTest);
216
+
217
+ const findings = [];
218
+ runCommonIntelligence(project, findings);
219
+
220
+ expect(findings.some(f => f.ruleId === 'common.testing.missing_makesut')).toBe(false);
221
+ expect(findings.some(f => f.ruleId === 'common.testing.missing_track_for_memory_leaks')).toBe(false);
222
+ });
187
223
  });
188
224
 
189
225
  describe('exports', () => {
@@ -288,11 +288,8 @@ function runCommonIntelligence(project, findings) {
288
288
  }
289
289
 
290
290
  if (isSwiftOrKotlinTest) {
291
- const isSimple = isSimpleValueTypeTest(content);
292
-
293
291
  if (!shouldSkipMakeSUTRule(filePath) &&
294
292
  !hasMakeSUT(content) &&
295
- !isSimple &&
296
293
  !hasAstIgnoreComment(content, 'missing_makesut')) {
297
294
  pushFinding(
298
295
  'common.testing.missing_makesut',
@@ -306,7 +303,6 @@ function runCommonIntelligence(project, findings) {
306
303
 
307
304
  if (!shouldSkipTrackForMemoryLeaksRule(filePath) &&
308
305
  !hasTrackForMemoryLeaksEvidence(content) &&
309
- !isSimple &&
310
306
  !hasAstIgnoreComment(content, 'missing_track_for_memory_leaks')) {
311
307
  pushFinding(
312
308
  'common.testing.missing_track_for_memory_leaks',
@@ -28,3 +28,6 @@
28
28
  {"timestamp":"2026-01-11T20:43:25.680Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":10,"tokensUsed":100000,"maxTokens":1000000,"source":"realtime","stale":false},"context":{"message":"Result level=ok percent=10% used=100000/1000000 source=realtime"}}
29
29
  {"timestamp":"2026-01-11T20:43:25.683Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"warning","percentUsed":91,"tokensUsed":910000,"maxTokens":1000000,"source":"fallback","stale":false},"context":{"message":"Result level=warning percent=91% used=910000/1000000 source=fallback"}}
30
30
  {"timestamp":"2026-01-11T20:43:25.683Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"critical","percentUsed":98,"tokensUsed":980000,"maxTokens":1000000,"source":"realtime","stale":true},"context":{"message":"Result level=critical percent=98% used=980000/1000000 source=realtime (stale)"}}
31
+ {"timestamp":"2026-01-11T21:27:20.297Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":10,"tokensUsed":100000,"maxTokens":1000000,"source":"realtime","stale":false},"context":{"message":"Result level=ok percent=10% used=100000/1000000 source=realtime"}}
32
+ {"timestamp":"2026-01-11T21:27:20.301Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"warning","percentUsed":91,"tokensUsed":910000,"maxTokens":1000000,"source":"fallback","stale":false},"context":{"message":"Result level=warning percent=91% used=910000/1000000 source=fallback"}}
33
+ {"timestamp":"2026-01-11T21:27:20.301Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"critical","percentUsed":98,"tokensUsed":980000,"maxTokens":1000000,"source":"realtime","stale":true},"context":{"message":"Result level=critical percent=98% used=980000/1000000 source=realtime (stale)"}}