slopbrick 0.32.0 → 0.33.0

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.
@@ -4381,6 +4381,18 @@ function parseSource(source, filePath) {
4381
4381
  // are regex-based and gate themselves on `/\.swift$/i.test(filePath)`
4382
4382
  // inside their `analyze()`. Same trade-off as Java/Kotlin.
4383
4383
  case "swift":
4384
+ // v0.33.0: C++ files get the same parseBlankModule path.
4385
+ // All 5 `cpp/*` rules (using-namespace-std, raw-new-delete,
4386
+ // c-style-cast, printf-debug, magic-numbers) are regex-based
4387
+ // and gate themselves on `/\.c(c|pp|xx)?$|^\.h(pp|xx)?$/i.test(filePath)`
4388
+ // inside their `analyze()`. Same trade-off as Java/Kotlin/Swift.
4389
+ case "cpp":
4390
+ case "cc":
4391
+ case "cxx":
4392
+ case "c":
4393
+ case "h":
4394
+ case "hpp":
4395
+ case "hxx":
4384
4396
  return parseBlankModule(source);
4385
4397
  default:
4386
4398
  return parseWithSwc(source, filePath);
@@ -45673,12 +45685,12 @@ var signal_strength_default = {
45673
45685
  },
45674
45686
  "cpp/using-namespace-std": {
45675
45687
  recall: 0,
45676
- fpRate: 0,
45677
- ratio: 1,
45688
+ fpRate: 2e-4,
45689
+ ratio: 0,
45678
45690
  precision: 0,
45679
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45691
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45680
45692
  verdict: "DORMANT",
45681
- _calibrationNote: "v0.24: new rule (`using namespace std;` in C++ header \u2014 pollutes every consumer). DORMANT until v9 C++ corpus calibration.",
45693
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). 1 fire total (in neg). Pre-2022 C++ used `using namespace std;` extensively (it's idiomatic in tutorials); modern C++ deprecated it. INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
45682
45694
  aiSpecific: true,
45683
45695
  _v7Verdict: "DORMANT",
45684
45696
  _v7Lift: 1,
@@ -45687,16 +45699,21 @@ var signal_strength_default = {
45687
45699
  _v7Precision: 0,
45688
45700
  _v8Verdict: "DORMANT",
45689
45701
  _v8Lift: 1,
45702
+ _v9Verdict: "DORMANT",
45703
+ _v9Lift: 0,
45704
+ _v9Recall: 0,
45705
+ _v9FpRate: 2e-4,
45706
+ _v9Precision: 0,
45690
45707
  defaultOff: true
45691
45708
  },
45692
45709
  "cpp/raw-new-delete": {
45693
- recall: 0,
45694
- fpRate: 0,
45695
- ratio: 1,
45696
- precision: 0,
45697
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45710
+ recall: 967e-5,
45711
+ fpRate: 0.01077,
45712
+ ratio: 0.9,
45713
+ precision: 0.2254,
45714
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45698
45715
  verdict: "DORMANT",
45699
- _calibrationNote: "v0.24: new rule (manual `new` / `delete` pairing in C++ \u2014 use std::make_unique / std::unique_ptr). DORMANT until v9 C++ corpus calibration.",
45716
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 16 TP, 55 FP, ratio=0.90. Era-confounded: pre-2022 C++ used raw new/delete extensively; modern C++ uses std::make_unique. INSUFFICIENT_DATA: pos arm 1655 files.",
45700
45717
  aiSpecific: true,
45701
45718
  _v7Verdict: "DORMANT",
45702
45719
  _v7Lift: 1,
@@ -45705,16 +45722,21 @@ var signal_strength_default = {
45705
45722
  _v7Precision: 0,
45706
45723
  _v8Verdict: "DORMANT",
45707
45724
  _v8Lift: 1,
45725
+ _v9Verdict: "DORMANT",
45726
+ _v9Lift: 0.9,
45727
+ _v9Recall: 967e-5,
45728
+ _v9FpRate: 0.01077,
45729
+ _v9Precision: 0.2254,
45708
45730
  defaultOff: true
45709
45731
  },
45710
45732
  "cpp/c-style-cast": {
45711
- recall: 0,
45712
- fpRate: 0,
45713
- ratio: 1,
45714
- precision: 0,
45715
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45733
+ recall: 0.5281,
45734
+ fpRate: 0.56491,
45735
+ ratio: 0.93,
45736
+ precision: 0.2325,
45737
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45716
45738
  verdict: "DORMANT",
45717
- _calibrationNote: "v0.24: new rule (C-style cast `(int)x` in C++ \u2014 use static_cast / reinterpret_cast / const_cast). DORMANT until v9 C++ corpus calibration.",
45739
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 874 TP, 2885 FP, ratio=0.93. Total fires were 32265 TP, 39954 FP \u2014 the regex is too broad and fires on every C-style cast including static_cast in template code. The per-file measurement (874/1655 = 53%) is more meaningful \u2014 both arms have similar proportions of files using C-style casts. INSUFFICIENT_DATA: pos arm 1655 files.",
45718
45740
  aiSpecific: true,
45719
45741
  _v7Verdict: "DORMANT",
45720
45742
  _v7Lift: 1,
@@ -45723,16 +45745,21 @@ var signal_strength_default = {
45723
45745
  _v7Precision: 0,
45724
45746
  _v8Verdict: "DORMANT",
45725
45747
  _v8Lift: 1,
45748
+ _v9Verdict: "DORMANT",
45749
+ _v9Lift: 0.93,
45750
+ _v9Recall: 0.5281,
45751
+ _v9FpRate: 0.56491,
45752
+ _v9Precision: 0.2325,
45726
45753
  defaultOff: true
45727
45754
  },
45728
45755
  "cpp/printf-debug": {
45729
- recall: 0,
45730
- fpRate: 0,
45731
- ratio: 1,
45732
- precision: 0,
45733
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45734
- verdict: "DORMANT",
45735
- _calibrationNote: "v0.24: new rule (printf family / std::cout debug printing in C++ \u2014 use spdlog / glog / AbslLog). DORMANT until v9 C++ corpus calibration.",
45756
+ recall: 0.09426,
45757
+ fpRate: 0.03877,
45758
+ ratio: 2.43,
45759
+ precision: 0.4407,
45760
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45761
+ verdict: "OK",
45762
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 156 TP files, 198 FP files, ratio=2.43 (\u22651.5) \u2014 fourth positive-signal rule in v9 history (and the strongest ratio so far). precision=44.07% (just below 50% USEFUL threshold); verdict=OK. Total fires: 182 TP, 198 FP. The signal is real: post-2024 C++ (mostly AI-generated demos in llama.cpp, whisper.cpp, openai-cpp) uses printf/cout for output; pre-2022 production C++ (folly, protobuf, abseil) uses spdlog / glog / AbslLog. Same direction as kotlin/println-as-log (1.84), java/system-out-println (1.73 refined), swift/print-debug (1.13). INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
45736
45763
  aiSpecific: true,
45737
45764
  _v7Verdict: "DORMANT",
45738
45765
  _v7Lift: 1,
@@ -45741,16 +45768,21 @@ var signal_strength_default = {
45741
45768
  _v7Precision: 0,
45742
45769
  _v8Verdict: "DORMANT",
45743
45770
  _v8Lift: 1,
45771
+ _v9Verdict: "OK",
45772
+ _v9Lift: 2.43,
45773
+ _v9Recall: 0.09426,
45774
+ _v9FpRate: 0.03877,
45775
+ _v9Precision: 0.4407,
45744
45776
  defaultOff: true
45745
45777
  },
45746
45778
  "cpp/magic-numbers": {
45747
- recall: 0,
45748
- fpRate: 0,
45749
- ratio: 1,
45750
- precision: 0,
45751
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45779
+ recall: 0.13293,
45780
+ fpRate: 0.15391,
45781
+ ratio: 0.86,
45782
+ precision: 0.2187,
45783
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45752
45784
  verdict: "DORMANT",
45753
- _calibrationNote: "v0.24: new rule (magic-number literal in C++ comparison / return \u2014 name it `constexpr int MAX = ...`). DORMANT until v9 C++ corpus calibration.",
45785
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 220 TP, 786 FP, ratio=0.86. Both arms have similar proportions of files with magic numbers \u2014 this is a general C++ anti-pattern that hasn't been eradicated. INSUFFICIENT_DATA: pos arm 1655 files.",
45754
45786
  aiSpecific: true,
45755
45787
  _v7Verdict: "DORMANT",
45756
45788
  _v7Lift: 1,
@@ -45759,6 +45791,11 @@ var signal_strength_default = {
45759
45791
  _v7Precision: 0,
45760
45792
  _v8Verdict: "DORMANT",
45761
45793
  _v8Lift: 1,
45794
+ _v9Verdict: "DORMANT",
45795
+ _v9Lift: 0.86,
45796
+ _v9Recall: 0.13293,
45797
+ _v9FpRate: 0.15391,
45798
+ _v9Precision: 0.2187,
45762
45799
  defaultOff: true
45763
45800
  }
45764
45801
  };
@@ -45811,13 +45848,6 @@ async function scanFile(filePath, config, registry, cwd = process.cwd()) {
45811
45848
  const ext = (0, import_node_path9.extname)(filePath).toLowerCase();
45812
45849
  const UNSUPPORTED_LANGS = /* @__PURE__ */ new Set([
45813
45850
  ".dart",
45814
- ".cpp",
45815
- ".cc",
45816
- ".cxx",
45817
- ".c",
45818
- ".h",
45819
- ".hpp",
45820
- ".hxx",
45821
45851
  ".rb",
45822
45852
  ".php"
45823
45853
  ]);
@@ -4352,6 +4352,18 @@ function parseSource(source, filePath) {
4352
4352
  // are regex-based and gate themselves on `/\.swift$/i.test(filePath)`
4353
4353
  // inside their `analyze()`. Same trade-off as Java/Kotlin.
4354
4354
  case "swift":
4355
+ // v0.33.0: C++ files get the same parseBlankModule path.
4356
+ // All 5 `cpp/*` rules (using-namespace-std, raw-new-delete,
4357
+ // c-style-cast, printf-debug, magic-numbers) are regex-based
4358
+ // and gate themselves on `/\.c(c|pp|xx)?$|^\.h(pp|xx)?$/i.test(filePath)`
4359
+ // inside their `analyze()`. Same trade-off as Java/Kotlin/Swift.
4360
+ case "cpp":
4361
+ case "cc":
4362
+ case "cxx":
4363
+ case "c":
4364
+ case "h":
4365
+ case "hpp":
4366
+ case "hxx":
4355
4367
  return parseBlankModule(source);
4356
4368
  default:
4357
4369
  return parseWithSwc(source, filePath);
@@ -45644,12 +45656,12 @@ var signal_strength_default = {
45644
45656
  },
45645
45657
  "cpp/using-namespace-std": {
45646
45658
  recall: 0,
45647
- fpRate: 0,
45648
- ratio: 1,
45659
+ fpRate: 2e-4,
45660
+ ratio: 0,
45649
45661
  precision: 0,
45650
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45662
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45651
45663
  verdict: "DORMANT",
45652
- _calibrationNote: "v0.24: new rule (`using namespace std;` in C++ header \u2014 pollutes every consumer). DORMANT until v9 C++ corpus calibration.",
45664
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). 1 fire total (in neg). Pre-2022 C++ used `using namespace std;` extensively (it's idiomatic in tutorials); modern C++ deprecated it. INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
45653
45665
  aiSpecific: true,
45654
45666
  _v7Verdict: "DORMANT",
45655
45667
  _v7Lift: 1,
@@ -45658,16 +45670,21 @@ var signal_strength_default = {
45658
45670
  _v7Precision: 0,
45659
45671
  _v8Verdict: "DORMANT",
45660
45672
  _v8Lift: 1,
45673
+ _v9Verdict: "DORMANT",
45674
+ _v9Lift: 0,
45675
+ _v9Recall: 0,
45676
+ _v9FpRate: 2e-4,
45677
+ _v9Precision: 0,
45661
45678
  defaultOff: true
45662
45679
  },
45663
45680
  "cpp/raw-new-delete": {
45664
- recall: 0,
45665
- fpRate: 0,
45666
- ratio: 1,
45667
- precision: 0,
45668
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45681
+ recall: 967e-5,
45682
+ fpRate: 0.01077,
45683
+ ratio: 0.9,
45684
+ precision: 0.2254,
45685
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45669
45686
  verdict: "DORMANT",
45670
- _calibrationNote: "v0.24: new rule (manual `new` / `delete` pairing in C++ \u2014 use std::make_unique / std::unique_ptr). DORMANT until v9 C++ corpus calibration.",
45687
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 16 TP, 55 FP, ratio=0.90. Era-confounded: pre-2022 C++ used raw new/delete extensively; modern C++ uses std::make_unique. INSUFFICIENT_DATA: pos arm 1655 files.",
45671
45688
  aiSpecific: true,
45672
45689
  _v7Verdict: "DORMANT",
45673
45690
  _v7Lift: 1,
@@ -45676,16 +45693,21 @@ var signal_strength_default = {
45676
45693
  _v7Precision: 0,
45677
45694
  _v8Verdict: "DORMANT",
45678
45695
  _v8Lift: 1,
45696
+ _v9Verdict: "DORMANT",
45697
+ _v9Lift: 0.9,
45698
+ _v9Recall: 967e-5,
45699
+ _v9FpRate: 0.01077,
45700
+ _v9Precision: 0.2254,
45679
45701
  defaultOff: true
45680
45702
  },
45681
45703
  "cpp/c-style-cast": {
45682
- recall: 0,
45683
- fpRate: 0,
45684
- ratio: 1,
45685
- precision: 0,
45686
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45704
+ recall: 0.5281,
45705
+ fpRate: 0.56491,
45706
+ ratio: 0.93,
45707
+ precision: 0.2325,
45708
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45687
45709
  verdict: "DORMANT",
45688
- _calibrationNote: "v0.24: new rule (C-style cast `(int)x` in C++ \u2014 use static_cast / reinterpret_cast / const_cast). DORMANT until v9 C++ corpus calibration.",
45710
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 874 TP, 2885 FP, ratio=0.93. Total fires were 32265 TP, 39954 FP \u2014 the regex is too broad and fires on every C-style cast including static_cast in template code. The per-file measurement (874/1655 = 53%) is more meaningful \u2014 both arms have similar proportions of files using C-style casts. INSUFFICIENT_DATA: pos arm 1655 files.",
45689
45711
  aiSpecific: true,
45690
45712
  _v7Verdict: "DORMANT",
45691
45713
  _v7Lift: 1,
@@ -45694,16 +45716,21 @@ var signal_strength_default = {
45694
45716
  _v7Precision: 0,
45695
45717
  _v8Verdict: "DORMANT",
45696
45718
  _v8Lift: 1,
45719
+ _v9Verdict: "DORMANT",
45720
+ _v9Lift: 0.93,
45721
+ _v9Recall: 0.5281,
45722
+ _v9FpRate: 0.56491,
45723
+ _v9Precision: 0.2325,
45697
45724
  defaultOff: true
45698
45725
  },
45699
45726
  "cpp/printf-debug": {
45700
- recall: 0,
45701
- fpRate: 0,
45702
- ratio: 1,
45703
- precision: 0,
45704
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45705
- verdict: "DORMANT",
45706
- _calibrationNote: "v0.24: new rule (printf family / std::cout debug printing in C++ \u2014 use spdlog / glog / AbslLog). DORMANT until v9 C++ corpus calibration.",
45727
+ recall: 0.09426,
45728
+ fpRate: 0.03877,
45729
+ ratio: 2.43,
45730
+ precision: 0.4407,
45731
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45732
+ verdict: "OK",
45733
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 156 TP files, 198 FP files, ratio=2.43 (\u22651.5) \u2014 fourth positive-signal rule in v9 history (and the strongest ratio so far). precision=44.07% (just below 50% USEFUL threshold); verdict=OK. Total fires: 182 TP, 198 FP. The signal is real: post-2024 C++ (mostly AI-generated demos in llama.cpp, whisper.cpp, openai-cpp) uses printf/cout for output; pre-2022 production C++ (folly, protobuf, abseil) uses spdlog / glog / AbslLog. Same direction as kotlin/println-as-log (1.84), java/system-out-println (1.73 refined), swift/print-debug (1.13). INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
45707
45734
  aiSpecific: true,
45708
45735
  _v7Verdict: "DORMANT",
45709
45736
  _v7Lift: 1,
@@ -45712,16 +45739,21 @@ var signal_strength_default = {
45712
45739
  _v7Precision: 0,
45713
45740
  _v8Verdict: "DORMANT",
45714
45741
  _v8Lift: 1,
45742
+ _v9Verdict: "OK",
45743
+ _v9Lift: 2.43,
45744
+ _v9Recall: 0.09426,
45745
+ _v9FpRate: 0.03877,
45746
+ _v9Precision: 0.4407,
45715
45747
  defaultOff: true
45716
45748
  },
45717
45749
  "cpp/magic-numbers": {
45718
- recall: 0,
45719
- fpRate: 0,
45720
- ratio: 1,
45721
- precision: 0,
45722
- lastCalibratedAt: "2026-07-02T00:00:00Z",
45750
+ recall: 0.13293,
45751
+ fpRate: 0.15391,
45752
+ ratio: 0.86,
45753
+ precision: 0.2187,
45754
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
45723
45755
  verdict: "DORMANT",
45724
- _calibrationNote: "v0.24: new rule (magic-number literal in C++ comparison / return \u2014 name it `constexpr int MAX = ...`). DORMANT until v9 C++ corpus calibration.",
45756
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 220 TP, 786 FP, ratio=0.86. Both arms have similar proportions of files with magic numbers \u2014 this is a general C++ anti-pattern that hasn't been eradicated. INSUFFICIENT_DATA: pos arm 1655 files.",
45725
45757
  aiSpecific: true,
45726
45758
  _v7Verdict: "DORMANT",
45727
45759
  _v7Lift: 1,
@@ -45730,6 +45762,11 @@ var signal_strength_default = {
45730
45762
  _v7Precision: 0,
45731
45763
  _v8Verdict: "DORMANT",
45732
45764
  _v8Lift: 1,
45765
+ _v9Verdict: "DORMANT",
45766
+ _v9Lift: 0.86,
45767
+ _v9Recall: 0.13293,
45768
+ _v9FpRate: 0.15391,
45769
+ _v9Precision: 0.2187,
45733
45770
  defaultOff: true
45734
45771
  }
45735
45772
  };
@@ -45782,13 +45819,6 @@ async function scanFile(filePath, config, registry, cwd = process.cwd()) {
45782
45819
  const ext = extname4(filePath).toLowerCase();
45783
45820
  const UNSUPPORTED_LANGS = /* @__PURE__ */ new Set([
45784
45821
  ".dart",
45785
- ".cpp",
45786
- ".cc",
45787
- ".cxx",
45788
- ".c",
45789
- ".h",
45790
- ".hpp",
45791
- ".hxx",
45792
45822
  ".rb",
45793
45823
  ".php"
45794
45824
  ]);
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.32.0";
39
+ VERSION = "0.33.0";
40
40
  }
41
41
  });
42
42
 
@@ -36615,6 +36615,18 @@ function parseSource(source, filePath) {
36615
36615
  // are regex-based and gate themselves on `/\.swift$/i.test(filePath)`
36616
36616
  // inside their `analyze()`. Same trade-off as Java/Kotlin.
36617
36617
  case "swift":
36618
+ // v0.33.0: C++ files get the same parseBlankModule path.
36619
+ // All 5 `cpp/*` rules (using-namespace-std, raw-new-delete,
36620
+ // c-style-cast, printf-debug, magic-numbers) are regex-based
36621
+ // and gate themselves on `/\.c(c|pp|xx)?$|^\.h(pp|xx)?$/i.test(filePath)`
36622
+ // inside their `analyze()`. Same trade-off as Java/Kotlin/Swift.
36623
+ case "cpp":
36624
+ case "cc":
36625
+ case "cxx":
36626
+ case "c":
36627
+ case "h":
36628
+ case "hpp":
36629
+ case "hxx":
36618
36630
  return parseBlankModule(source);
36619
36631
  default:
36620
36632
  return parseWithSwc(source, filePath);
@@ -51760,12 +51772,12 @@ var init_signal_strength = __esm({
51760
51772
  },
51761
51773
  "cpp/using-namespace-std": {
51762
51774
  recall: 0,
51763
- fpRate: 0,
51764
- ratio: 1,
51775
+ fpRate: 2e-4,
51776
+ ratio: 0,
51765
51777
  precision: 0,
51766
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51778
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51767
51779
  verdict: "DORMANT",
51768
- _calibrationNote: "v0.24: new rule (`using namespace std;` in C++ header \u2014 pollutes every consumer). DORMANT until v9 C++ corpus calibration.",
51780
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). 1 fire total (in neg). Pre-2022 C++ used `using namespace std;` extensively (it's idiomatic in tutorials); modern C++ deprecated it. INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
51769
51781
  aiSpecific: true,
51770
51782
  _v7Verdict: "DORMANT",
51771
51783
  _v7Lift: 1,
@@ -51774,16 +51786,21 @@ var init_signal_strength = __esm({
51774
51786
  _v7Precision: 0,
51775
51787
  _v8Verdict: "DORMANT",
51776
51788
  _v8Lift: 1,
51789
+ _v9Verdict: "DORMANT",
51790
+ _v9Lift: 0,
51791
+ _v9Recall: 0,
51792
+ _v9FpRate: 2e-4,
51793
+ _v9Precision: 0,
51777
51794
  defaultOff: true
51778
51795
  },
51779
51796
  "cpp/raw-new-delete": {
51780
- recall: 0,
51781
- fpRate: 0,
51782
- ratio: 1,
51783
- precision: 0,
51784
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51797
+ recall: 967e-5,
51798
+ fpRate: 0.01077,
51799
+ ratio: 0.9,
51800
+ precision: 0.2254,
51801
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51785
51802
  verdict: "DORMANT",
51786
- _calibrationNote: "v0.24: new rule (manual `new` / `delete` pairing in C++ \u2014 use std::make_unique / std::unique_ptr). DORMANT until v9 C++ corpus calibration.",
51803
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 16 TP, 55 FP, ratio=0.90. Era-confounded: pre-2022 C++ used raw new/delete extensively; modern C++ uses std::make_unique. INSUFFICIENT_DATA: pos arm 1655 files.",
51787
51804
  aiSpecific: true,
51788
51805
  _v7Verdict: "DORMANT",
51789
51806
  _v7Lift: 1,
@@ -51792,16 +51809,21 @@ var init_signal_strength = __esm({
51792
51809
  _v7Precision: 0,
51793
51810
  _v8Verdict: "DORMANT",
51794
51811
  _v8Lift: 1,
51812
+ _v9Verdict: "DORMANT",
51813
+ _v9Lift: 0.9,
51814
+ _v9Recall: 967e-5,
51815
+ _v9FpRate: 0.01077,
51816
+ _v9Precision: 0.2254,
51795
51817
  defaultOff: true
51796
51818
  },
51797
51819
  "cpp/c-style-cast": {
51798
- recall: 0,
51799
- fpRate: 0,
51800
- ratio: 1,
51801
- precision: 0,
51802
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51820
+ recall: 0.5281,
51821
+ fpRate: 0.56491,
51822
+ ratio: 0.93,
51823
+ precision: 0.2325,
51824
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51803
51825
  verdict: "DORMANT",
51804
- _calibrationNote: "v0.24: new rule (C-style cast `(int)x` in C++ \u2014 use static_cast / reinterpret_cast / const_cast). DORMANT until v9 C++ corpus calibration.",
51826
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 874 TP, 2885 FP, ratio=0.93. Total fires were 32265 TP, 39954 FP \u2014 the regex is too broad and fires on every C-style cast including static_cast in template code. The per-file measurement (874/1655 = 53%) is more meaningful \u2014 both arms have similar proportions of files using C-style casts. INSUFFICIENT_DATA: pos arm 1655 files.",
51805
51827
  aiSpecific: true,
51806
51828
  _v7Verdict: "DORMANT",
51807
51829
  _v7Lift: 1,
@@ -51810,16 +51832,21 @@ var init_signal_strength = __esm({
51810
51832
  _v7Precision: 0,
51811
51833
  _v8Verdict: "DORMANT",
51812
51834
  _v8Lift: 1,
51835
+ _v9Verdict: "DORMANT",
51836
+ _v9Lift: 0.93,
51837
+ _v9Recall: 0.5281,
51838
+ _v9FpRate: 0.56491,
51839
+ _v9Precision: 0.2325,
51813
51840
  defaultOff: true
51814
51841
  },
51815
51842
  "cpp/printf-debug": {
51816
- recall: 0,
51817
- fpRate: 0,
51818
- ratio: 1,
51819
- precision: 0,
51820
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51821
- verdict: "DORMANT",
51822
- _calibrationNote: "v0.24: new rule (printf family / std::cout debug printing in C++ \u2014 use spdlog / glog / AbslLog). DORMANT until v9 C++ corpus calibration.",
51843
+ recall: 0.09426,
51844
+ fpRate: 0.03877,
51845
+ ratio: 2.43,
51846
+ precision: 0.4407,
51847
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51848
+ verdict: "OK",
51849
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 156 TP files, 198 FP files, ratio=2.43 (\u22651.5) \u2014 fourth positive-signal rule in v9 history (and the strongest ratio so far). precision=44.07% (just below 50% USEFUL threshold); verdict=OK. Total fires: 182 TP, 198 FP. The signal is real: post-2024 C++ (mostly AI-generated demos in llama.cpp, whisper.cpp, openai-cpp) uses printf/cout for output; pre-2022 production C++ (folly, protobuf, abseil) uses spdlog / glog / AbslLog. Same direction as kotlin/println-as-log (1.84), java/system-out-println (1.73 refined), swift/print-debug (1.13). INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
51823
51850
  aiSpecific: true,
51824
51851
  _v7Verdict: "DORMANT",
51825
51852
  _v7Lift: 1,
@@ -51828,16 +51855,21 @@ var init_signal_strength = __esm({
51828
51855
  _v7Precision: 0,
51829
51856
  _v8Verdict: "DORMANT",
51830
51857
  _v8Lift: 1,
51858
+ _v9Verdict: "OK",
51859
+ _v9Lift: 2.43,
51860
+ _v9Recall: 0.09426,
51861
+ _v9FpRate: 0.03877,
51862
+ _v9Precision: 0.4407,
51831
51863
  defaultOff: true
51832
51864
  },
51833
51865
  "cpp/magic-numbers": {
51834
- recall: 0,
51835
- fpRate: 0,
51836
- ratio: 1,
51837
- precision: 0,
51838
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51866
+ recall: 0.13293,
51867
+ fpRate: 0.15391,
51868
+ ratio: 0.86,
51869
+ precision: 0.2187,
51870
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51839
51871
  verdict: "DORMANT",
51840
- _calibrationNote: "v0.24: new rule (magic-number literal in C++ comparison / return \u2014 name it `constexpr int MAX = ...`). DORMANT until v9 C++ corpus calibration.",
51872
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 220 TP, 786 FP, ratio=0.86. Both arms have similar proportions of files with magic numbers \u2014 this is a general C++ anti-pattern that hasn't been eradicated. INSUFFICIENT_DATA: pos arm 1655 files.",
51841
51873
  aiSpecific: true,
51842
51874
  _v7Verdict: "DORMANT",
51843
51875
  _v7Lift: 1,
@@ -51846,6 +51878,11 @@ var init_signal_strength = __esm({
51846
51878
  _v7Precision: 0,
51847
51879
  _v8Verdict: "DORMANT",
51848
51880
  _v8Lift: 1,
51881
+ _v9Verdict: "DORMANT",
51882
+ _v9Lift: 0.86,
51883
+ _v9Recall: 0.13293,
51884
+ _v9FpRate: 0.15391,
51885
+ _v9Precision: 0.2187,
51849
51886
  defaultOff: true
51850
51887
  }
51851
51888
  };
@@ -51926,13 +51963,6 @@ async function scanFile(filePath, config, registry, cwd = process.cwd()) {
51926
51963
  const ext = (0, import_node_path12.extname)(filePath).toLowerCase();
51927
51964
  const UNSUPPORTED_LANGS = /* @__PURE__ */ new Set([
51928
51965
  ".dart",
51929
- ".cpp",
51930
- ".cc",
51931
- ".cxx",
51932
- ".c",
51933
- ".h",
51934
- ".hpp",
51935
- ".hxx",
51936
51966
  ".rb",
51937
51967
  ".php"
51938
51968
  ]);
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.32.0";
22
+ VERSION = "0.33.0";
23
23
  }
24
24
  });
25
25
 
@@ -36605,6 +36605,18 @@ function parseSource(source, filePath) {
36605
36605
  // are regex-based and gate themselves on `/\.swift$/i.test(filePath)`
36606
36606
  // inside their `analyze()`. Same trade-off as Java/Kotlin.
36607
36607
  case "swift":
36608
+ // v0.33.0: C++ files get the same parseBlankModule path.
36609
+ // All 5 `cpp/*` rules (using-namespace-std, raw-new-delete,
36610
+ // c-style-cast, printf-debug, magic-numbers) are regex-based
36611
+ // and gate themselves on `/\.c(c|pp|xx)?$|^\.h(pp|xx)?$/i.test(filePath)`
36612
+ // inside their `analyze()`. Same trade-off as Java/Kotlin/Swift.
36613
+ case "cpp":
36614
+ case "cc":
36615
+ case "cxx":
36616
+ case "c":
36617
+ case "h":
36618
+ case "hpp":
36619
+ case "hxx":
36608
36620
  return parseBlankModule(source);
36609
36621
  default:
36610
36622
  return parseWithSwc(source, filePath);
@@ -51738,12 +51750,12 @@ var init_signal_strength = __esm({
51738
51750
  },
51739
51751
  "cpp/using-namespace-std": {
51740
51752
  recall: 0,
51741
- fpRate: 0,
51742
- ratio: 1,
51753
+ fpRate: 2e-4,
51754
+ ratio: 0,
51743
51755
  precision: 0,
51744
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51756
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51745
51757
  verdict: "DORMANT",
51746
- _calibrationNote: "v0.24: new rule (`using namespace std;` in C++ header \u2014 pollutes every consumer). DORMANT until v9 C++ corpus calibration.",
51758
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). 1 fire total (in neg). Pre-2022 C++ used `using namespace std;` extensively (it's idiomatic in tutorials); modern C++ deprecated it. INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
51747
51759
  aiSpecific: true,
51748
51760
  _v7Verdict: "DORMANT",
51749
51761
  _v7Lift: 1,
@@ -51752,16 +51764,21 @@ var init_signal_strength = __esm({
51752
51764
  _v7Precision: 0,
51753
51765
  _v8Verdict: "DORMANT",
51754
51766
  _v8Lift: 1,
51767
+ _v9Verdict: "DORMANT",
51768
+ _v9Lift: 0,
51769
+ _v9Recall: 0,
51770
+ _v9FpRate: 2e-4,
51771
+ _v9Precision: 0,
51755
51772
  defaultOff: true
51756
51773
  },
51757
51774
  "cpp/raw-new-delete": {
51758
- recall: 0,
51759
- fpRate: 0,
51760
- ratio: 1,
51761
- precision: 0,
51762
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51775
+ recall: 967e-5,
51776
+ fpRate: 0.01077,
51777
+ ratio: 0.9,
51778
+ precision: 0.2254,
51779
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51763
51780
  verdict: "DORMANT",
51764
- _calibrationNote: "v0.24: new rule (manual `new` / `delete` pairing in C++ \u2014 use std::make_unique / std::unique_ptr). DORMANT until v9 C++ corpus calibration.",
51781
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 16 TP, 55 FP, ratio=0.90. Era-confounded: pre-2022 C++ used raw new/delete extensively; modern C++ uses std::make_unique. INSUFFICIENT_DATA: pos arm 1655 files.",
51765
51782
  aiSpecific: true,
51766
51783
  _v7Verdict: "DORMANT",
51767
51784
  _v7Lift: 1,
@@ -51770,16 +51787,21 @@ var init_signal_strength = __esm({
51770
51787
  _v7Precision: 0,
51771
51788
  _v8Verdict: "DORMANT",
51772
51789
  _v8Lift: 1,
51790
+ _v9Verdict: "DORMANT",
51791
+ _v9Lift: 0.9,
51792
+ _v9Recall: 967e-5,
51793
+ _v9FpRate: 0.01077,
51794
+ _v9Precision: 0.2254,
51773
51795
  defaultOff: true
51774
51796
  },
51775
51797
  "cpp/c-style-cast": {
51776
- recall: 0,
51777
- fpRate: 0,
51778
- ratio: 1,
51779
- precision: 0,
51780
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51798
+ recall: 0.5281,
51799
+ fpRate: 0.56491,
51800
+ ratio: 0.93,
51801
+ precision: 0.2325,
51802
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51781
51803
  verdict: "DORMANT",
51782
- _calibrationNote: "v0.24: new rule (C-style cast `(int)x` in C++ \u2014 use static_cast / reinterpret_cast / const_cast). DORMANT until v9 C++ corpus calibration.",
51804
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 874 TP, 2885 FP, ratio=0.93. Total fires were 32265 TP, 39954 FP \u2014 the regex is too broad and fires on every C-style cast including static_cast in template code. The per-file measurement (874/1655 = 53%) is more meaningful \u2014 both arms have similar proportions of files using C-style casts. INSUFFICIENT_DATA: pos arm 1655 files.",
51783
51805
  aiSpecific: true,
51784
51806
  _v7Verdict: "DORMANT",
51785
51807
  _v7Lift: 1,
@@ -51788,16 +51810,21 @@ var init_signal_strength = __esm({
51788
51810
  _v7Precision: 0,
51789
51811
  _v8Verdict: "DORMANT",
51790
51812
  _v8Lift: 1,
51813
+ _v9Verdict: "DORMANT",
51814
+ _v9Lift: 0.93,
51815
+ _v9Recall: 0.5281,
51816
+ _v9FpRate: 0.56491,
51817
+ _v9Precision: 0.2325,
51791
51818
  defaultOff: true
51792
51819
  },
51793
51820
  "cpp/printf-debug": {
51794
- recall: 0,
51795
- fpRate: 0,
51796
- ratio: 1,
51797
- precision: 0,
51798
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51799
- verdict: "DORMANT",
51800
- _calibrationNote: "v0.24: new rule (printf family / std::cout debug printing in C++ \u2014 use spdlog / glog / AbslLog). DORMANT until v9 C++ corpus calibration.",
51821
+ recall: 0.09426,
51822
+ fpRate: 0.03877,
51823
+ ratio: 2.43,
51824
+ precision: 0.4407,
51825
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51826
+ verdict: "OK",
51827
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 156 TP files, 198 FP files, ratio=2.43 (\u22651.5) \u2014 fourth positive-signal rule in v9 history (and the strongest ratio so far). precision=44.07% (just below 50% USEFUL threshold); verdict=OK. Total fires: 182 TP, 198 FP. The signal is real: post-2024 C++ (mostly AI-generated demos in llama.cpp, whisper.cpp, openai-cpp) uses printf/cout for output; pre-2022 production C++ (folly, protobuf, abseil) uses spdlog / glog / AbslLog. Same direction as kotlin/println-as-log (1.84), java/system-out-println (1.73 refined), swift/print-debug (1.13). INSUFFICIENT_DATA: pos arm 1655 files (below 10k floor).",
51801
51828
  aiSpecific: true,
51802
51829
  _v7Verdict: "DORMANT",
51803
51830
  _v7Lift: 1,
@@ -51806,16 +51833,21 @@ var init_signal_strength = __esm({
51806
51833
  _v7Precision: 0,
51807
51834
  _v8Verdict: "DORMANT",
51808
51835
  _v8Lift: 1,
51836
+ _v9Verdict: "OK",
51837
+ _v9Lift: 2.43,
51838
+ _v9Recall: 0.09426,
51839
+ _v9FpRate: 0.03877,
51840
+ _v9Precision: 0.4407,
51809
51841
  defaultOff: true
51810
51842
  },
51811
51843
  "cpp/magic-numbers": {
51812
- recall: 0,
51813
- fpRate: 0,
51814
- ratio: 1,
51815
- precision: 0,
51816
- lastCalibratedAt: "2026-07-02T00:00:00Z",
51844
+ recall: 0.13293,
51845
+ fpRate: 0.15391,
51846
+ ratio: 0.86,
51847
+ precision: 0.2187,
51848
+ lastCalibratedAt: "2026-07-03T00:00:00Z",
51817
51849
  verdict: "DORMANT",
51818
- _calibrationNote: "v0.24: new rule (magic-number literal in C++ comparison / return \u2014 name it `constexpr int MAX = ...`). DORMANT until v9 C++ corpus calibration.",
51850
+ _calibrationNote: "v0.33: v9 C++ calibration (5107 neg, 1655 pos). Per-file unique: 220 TP, 786 FP, ratio=0.86. Both arms have similar proportions of files with magic numbers \u2014 this is a general C++ anti-pattern that hasn't been eradicated. INSUFFICIENT_DATA: pos arm 1655 files.",
51819
51851
  aiSpecific: true,
51820
51852
  _v7Verdict: "DORMANT",
51821
51853
  _v7Lift: 1,
@@ -51824,6 +51856,11 @@ var init_signal_strength = __esm({
51824
51856
  _v7Precision: 0,
51825
51857
  _v8Verdict: "DORMANT",
51826
51858
  _v8Lift: 1,
51859
+ _v9Verdict: "DORMANT",
51860
+ _v9Lift: 0.86,
51861
+ _v9Recall: 0.13293,
51862
+ _v9FpRate: 0.15391,
51863
+ _v9Precision: 0.2187,
51827
51864
  defaultOff: true
51828
51865
  }
51829
51866
  };
@@ -51908,13 +51945,6 @@ async function scanFile(filePath, config, registry, cwd = process.cwd()) {
51908
51945
  const ext = extname5(filePath).toLowerCase();
51909
51946
  const UNSUPPORTED_LANGS = /* @__PURE__ */ new Set([
51910
51947
  ".dart",
51911
- ".cpp",
51912
- ".cc",
51913
- ".cxx",
51914
- ".c",
51915
- ".h",
51916
- ".hpp",
51917
- ".hxx",
51918
51948
  ".rb",
51919
51949
  ".php"
51920
51950
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slopbrick",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
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": {