slopbrick 0.34.1 → 0.34.2
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/dist/engine/worker.cjs +4 -2
- package/dist/engine/worker.js +4 -2
- package/dist/index.cjs +6 -4
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/engine/worker.cjs
CHANGED
|
@@ -40514,6 +40514,7 @@ var swiftImplicitlyUnwrappedOptionalRule = createRule({
|
|
|
40514
40514
|
// src/rules/swift/print-debug.ts
|
|
40515
40515
|
var PRINT_REGEX = /\bprint\s*\(/g;
|
|
40516
40516
|
var DEFAULT_THRESHOLD2 = 1;
|
|
40517
|
+
var TEST_FILE_REGEX = /(?:\/Tests\/|\/Tests\.swift|\/Test\.swift|Tests\.swift$|Test\.swift$)/;
|
|
40517
40518
|
var swiftPrintDebugRule = createRule({
|
|
40518
40519
|
id: "swift/print-debug",
|
|
40519
40520
|
category: "typo",
|
|
@@ -40528,6 +40529,7 @@ var swiftPrintDebugRule = createRule({
|
|
|
40528
40529
|
const source = facts.v2?._source;
|
|
40529
40530
|
if (!source) return issues;
|
|
40530
40531
|
if (!/\.swift$/i.test(facts.filePath)) return issues;
|
|
40532
|
+
if (TEST_FILE_REGEX.test(facts.filePath)) return issues;
|
|
40531
40533
|
const matches = [];
|
|
40532
40534
|
let m;
|
|
40533
40535
|
PRINT_REGEX.lastIndex = 0;
|
|
@@ -40547,7 +40549,7 @@ var swiftPrintDebugRule = createRule({
|
|
|
40547
40549
|
message: `print(...) at line ${line} \u2014 use Logger (os.log) for production output`,
|
|
40548
40550
|
line,
|
|
40549
40551
|
column: 1,
|
|
40550
|
-
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.
|
|
40552
|
+
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.34.2 (refined to skip test files for higher precision).'
|
|
40551
40553
|
});
|
|
40552
40554
|
}
|
|
40553
40555
|
return issues;
|
|
@@ -45598,7 +45600,7 @@ var signal_strength_default = {
|
|
|
45598
45600
|
precision: 0.3305,
|
|
45599
45601
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45600
45602
|
verdict: "OK",
|
|
45601
|
-
_calibrationNote: "v0.
|
|
45603
|
+
_calibrationNote: "v0.34.2: REFINED \u2014 rule now skips test files (XCTest naming: *Tests.swift, *Test.swift, Tests/ dir). Per-file unique v9 Swift calibration (1300 neg, 568 pos): 39 TP files, 79 FP files, ratio=1.13 (OK). The refinement is expected to push precision from 33% to 50%+ by removing XCTest output and snapshot test fires (which were ~49% of FPs in the v0.32.0 measurement). The full v9 re-calibration is part of the v0.34.5/v0.34.7 pipeline (same refinement applied to kotlin/println-as-log and cpp/printf-debug); see v0.34.1's Four-language validation section. v0.32.0 baseline: 39 TP files / 568 = 6.87% recall, 79 FP files / 1300 = 6.08% fpRate, ratio 1.13, precision 33.05% (just below 50% USEFUL threshold). Same direction as kotlin/println-as-log (1.84) and java/system-out-println (1.73 refined, 3.29 unrefined). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
45602
45604
|
aiSpecific: true,
|
|
45603
45605
|
_v7Verdict: "DORMANT",
|
|
45604
45606
|
_v7Lift: 1,
|
package/dist/engine/worker.js
CHANGED
|
@@ -40485,6 +40485,7 @@ var swiftImplicitlyUnwrappedOptionalRule = createRule({
|
|
|
40485
40485
|
// src/rules/swift/print-debug.ts
|
|
40486
40486
|
var PRINT_REGEX = /\bprint\s*\(/g;
|
|
40487
40487
|
var DEFAULT_THRESHOLD2 = 1;
|
|
40488
|
+
var TEST_FILE_REGEX = /(?:\/Tests\/|\/Tests\.swift|\/Test\.swift|Tests\.swift$|Test\.swift$)/;
|
|
40488
40489
|
var swiftPrintDebugRule = createRule({
|
|
40489
40490
|
id: "swift/print-debug",
|
|
40490
40491
|
category: "typo",
|
|
@@ -40499,6 +40500,7 @@ var swiftPrintDebugRule = createRule({
|
|
|
40499
40500
|
const source = facts.v2?._source;
|
|
40500
40501
|
if (!source) return issues;
|
|
40501
40502
|
if (!/\.swift$/i.test(facts.filePath)) return issues;
|
|
40503
|
+
if (TEST_FILE_REGEX.test(facts.filePath)) return issues;
|
|
40502
40504
|
const matches = [];
|
|
40503
40505
|
let m;
|
|
40504
40506
|
PRINT_REGEX.lastIndex = 0;
|
|
@@ -40518,7 +40520,7 @@ var swiftPrintDebugRule = createRule({
|
|
|
40518
40520
|
message: `print(...) at line ${line} \u2014 use Logger (os.log) for production output`,
|
|
40519
40521
|
line,
|
|
40520
40522
|
column: 1,
|
|
40521
|
-
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.
|
|
40523
|
+
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.34.2 (refined to skip test files for higher precision).'
|
|
40522
40524
|
});
|
|
40523
40525
|
}
|
|
40524
40526
|
return issues;
|
|
@@ -45569,7 +45571,7 @@ var signal_strength_default = {
|
|
|
45569
45571
|
precision: 0.3305,
|
|
45570
45572
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45571
45573
|
verdict: "OK",
|
|
45572
|
-
_calibrationNote: "v0.
|
|
45574
|
+
_calibrationNote: "v0.34.2: REFINED \u2014 rule now skips test files (XCTest naming: *Tests.swift, *Test.swift, Tests/ dir). Per-file unique v9 Swift calibration (1300 neg, 568 pos): 39 TP files, 79 FP files, ratio=1.13 (OK). The refinement is expected to push precision from 33% to 50%+ by removing XCTest output and snapshot test fires (which were ~49% of FPs in the v0.32.0 measurement). The full v9 re-calibration is part of the v0.34.5/v0.34.7 pipeline (same refinement applied to kotlin/println-as-log and cpp/printf-debug); see v0.34.1's Four-language validation section. v0.32.0 baseline: 39 TP files / 568 = 6.87% recall, 79 FP files / 1300 = 6.08% fpRate, ratio 1.13, precision 33.05% (just below 50% USEFUL threshold). Same direction as kotlin/println-as-log (1.84) and java/system-out-println (1.73 refined, 3.29 unrefined). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
45573
45575
|
aiSpecific: true,
|
|
45574
45576
|
_v7Verdict: "DORMANT",
|
|
45575
45577
|
_v7Lift: 1,
|
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var VERSION;
|
|
|
36
36
|
var init_header = __esm({
|
|
37
37
|
"src/types/_header.ts"() {
|
|
38
38
|
"use strict";
|
|
39
|
-
VERSION = "0.34.
|
|
39
|
+
VERSION = "0.34.2";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -41055,13 +41055,14 @@ var init_implicitly_unwrapped_optional = __esm({
|
|
|
41055
41055
|
});
|
|
41056
41056
|
|
|
41057
41057
|
// src/rules/swift/print-debug.ts
|
|
41058
|
-
var PRINT_REGEX, DEFAULT_THRESHOLD2, swiftPrintDebugRule;
|
|
41058
|
+
var PRINT_REGEX, DEFAULT_THRESHOLD2, TEST_FILE_REGEX, swiftPrintDebugRule;
|
|
41059
41059
|
var init_print_debug = __esm({
|
|
41060
41060
|
"src/rules/swift/print-debug.ts"() {
|
|
41061
41061
|
"use strict";
|
|
41062
41062
|
init_rule();
|
|
41063
41063
|
PRINT_REGEX = /\bprint\s*\(/g;
|
|
41064
41064
|
DEFAULT_THRESHOLD2 = 1;
|
|
41065
|
+
TEST_FILE_REGEX = /(?:\/Tests\/|\/Tests\.swift|\/Test\.swift|Tests\.swift$|Test\.swift$)/;
|
|
41065
41066
|
swiftPrintDebugRule = createRule({
|
|
41066
41067
|
id: "swift/print-debug",
|
|
41067
41068
|
category: "typo",
|
|
@@ -41076,6 +41077,7 @@ var init_print_debug = __esm({
|
|
|
41076
41077
|
const source = facts.v2?._source;
|
|
41077
41078
|
if (!source) return issues;
|
|
41078
41079
|
if (!/\.swift$/i.test(facts.filePath)) return issues;
|
|
41080
|
+
if (TEST_FILE_REGEX.test(facts.filePath)) return issues;
|
|
41079
41081
|
const matches = [];
|
|
41080
41082
|
let m;
|
|
41081
41083
|
PRINT_REGEX.lastIndex = 0;
|
|
@@ -41095,7 +41097,7 @@ var init_print_debug = __esm({
|
|
|
41095
41097
|
message: `print(...) at line ${line} \u2014 use Logger (os.log) for production output`,
|
|
41096
41098
|
line,
|
|
41097
41099
|
column: 1,
|
|
41098
|
-
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.
|
|
41100
|
+
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.34.2 (refined to skip test files for higher precision).'
|
|
41099
41101
|
});
|
|
41100
41102
|
}
|
|
41101
41103
|
return issues;
|
|
@@ -51685,7 +51687,7 @@ var init_signal_strength = __esm({
|
|
|
51685
51687
|
precision: 0.3305,
|
|
51686
51688
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51687
51689
|
verdict: "OK",
|
|
51688
|
-
_calibrationNote: "v0.
|
|
51690
|
+
_calibrationNote: "v0.34.2: REFINED \u2014 rule now skips test files (XCTest naming: *Tests.swift, *Test.swift, Tests/ dir). Per-file unique v9 Swift calibration (1300 neg, 568 pos): 39 TP files, 79 FP files, ratio=1.13 (OK). The refinement is expected to push precision from 33% to 50%+ by removing XCTest output and snapshot test fires (which were ~49% of FPs in the v0.32.0 measurement). The full v9 re-calibration is part of the v0.34.5/v0.34.7 pipeline (same refinement applied to kotlin/println-as-log and cpp/printf-debug); see v0.34.1's Four-language validation section. v0.32.0 baseline: 39 TP files / 568 = 6.87% recall, 79 FP files / 1300 = 6.08% fpRate, ratio 1.13, precision 33.05% (just below 50% USEFUL threshold). Same direction as kotlin/println-as-log (1.84) and java/system-out-println (1.73 refined, 3.29 unrefined). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
51689
51691
|
aiSpecific: true,
|
|
51690
51692
|
_v7Verdict: "DORMANT",
|
|
51691
51693
|
_v7Lift: 1,
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var VERSION;
|
|
|
19
19
|
var init_header = __esm({
|
|
20
20
|
"src/types/_header.ts"() {
|
|
21
21
|
"use strict";
|
|
22
|
-
VERSION = "0.34.
|
|
22
|
+
VERSION = "0.34.2";
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -41036,13 +41036,14 @@ var init_implicitly_unwrapped_optional = __esm({
|
|
|
41036
41036
|
});
|
|
41037
41037
|
|
|
41038
41038
|
// src/rules/swift/print-debug.ts
|
|
41039
|
-
var PRINT_REGEX, DEFAULT_THRESHOLD2, swiftPrintDebugRule;
|
|
41039
|
+
var PRINT_REGEX, DEFAULT_THRESHOLD2, TEST_FILE_REGEX, swiftPrintDebugRule;
|
|
41040
41040
|
var init_print_debug = __esm({
|
|
41041
41041
|
"src/rules/swift/print-debug.ts"() {
|
|
41042
41042
|
"use strict";
|
|
41043
41043
|
init_rule();
|
|
41044
41044
|
PRINT_REGEX = /\bprint\s*\(/g;
|
|
41045
41045
|
DEFAULT_THRESHOLD2 = 1;
|
|
41046
|
+
TEST_FILE_REGEX = /(?:\/Tests\/|\/Tests\.swift|\/Test\.swift|Tests\.swift$|Test\.swift$)/;
|
|
41046
41047
|
swiftPrintDebugRule = createRule({
|
|
41047
41048
|
id: "swift/print-debug",
|
|
41048
41049
|
category: "typo",
|
|
@@ -41057,6 +41058,7 @@ var init_print_debug = __esm({
|
|
|
41057
41058
|
const source = facts.v2?._source;
|
|
41058
41059
|
if (!source) return issues;
|
|
41059
41060
|
if (!/\.swift$/i.test(facts.filePath)) return issues;
|
|
41061
|
+
if (TEST_FILE_REGEX.test(facts.filePath)) return issues;
|
|
41060
41062
|
const matches = [];
|
|
41061
41063
|
let m;
|
|
41062
41064
|
PRINT_REGEX.lastIndex = 0;
|
|
@@ -41076,7 +41078,7 @@ var init_print_debug = __esm({
|
|
|
41076
41078
|
message: `print(...) at line ${line} \u2014 use Logger (os.log) for production output`,
|
|
41077
41079
|
line,
|
|
41078
41080
|
column: 1,
|
|
41079
|
-
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.
|
|
41081
|
+
advice: 'Replace with `Logger(subsystem: "...", category: "...").info("...")` (Unified Logging System, os.log). `print` writes to stdout with no level, no redaction, and no way to silence in release builds. The `Logger` API integrates with Console.app and respects the device\'s privacy settings. Multiple `print` calls in one Swift file is an AI fingerprint \u2014 agents reach for `print` because of training-data examples. Reference: swift/print-debug v0.34.2 (refined to skip test files for higher precision).'
|
|
41080
41082
|
});
|
|
41081
41083
|
}
|
|
41082
41084
|
return issues;
|
|
@@ -51663,7 +51665,7 @@ var init_signal_strength = __esm({
|
|
|
51663
51665
|
precision: 0.3305,
|
|
51664
51666
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51665
51667
|
verdict: "OK",
|
|
51666
|
-
_calibrationNote: "v0.
|
|
51668
|
+
_calibrationNote: "v0.34.2: REFINED \u2014 rule now skips test files (XCTest naming: *Tests.swift, *Test.swift, Tests/ dir). Per-file unique v9 Swift calibration (1300 neg, 568 pos): 39 TP files, 79 FP files, ratio=1.13 (OK). The refinement is expected to push precision from 33% to 50%+ by removing XCTest output and snapshot test fires (which were ~49% of FPs in the v0.32.0 measurement). The full v9 re-calibration is part of the v0.34.5/v0.34.7 pipeline (same refinement applied to kotlin/println-as-log and cpp/printf-debug); see v0.34.1's Four-language validation section. v0.32.0 baseline: 39 TP files / 568 = 6.87% recall, 79 FP files / 1300 = 6.08% fpRate, ratio 1.13, precision 33.05% (just below 50% USEFUL threshold). Same direction as kotlin/println-as-log (1.84) and java/system-out-println (1.73 refined, 3.29 unrefined). INSUFFICIENT_DATA: pos arm 568 files (below 10k floor).",
|
|
51667
51669
|
aiSpecific: true,
|
|
51668
51670
|
_v7Verdict: "DORMANT",
|
|
51669
51671
|
_v7Lift: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slopbrick",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "Discovered, modeled, and governed repository structure. SlopBrick scans source code, classifies it against 95+ rules in 15 categories, computes 4 scores (aiSlopScore: lower=cleaner, engineeringHygiene, security, repositoryHealth composite), and persists the structure for AI agents and CI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|