pumuki 6.3.281 → 6.3.283

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.3.283] - 2026-05-19
4
+
5
+ - `PUMUKI-INC-150`: brownfield XCTest specs that satisfy `makeSUT()` and `trackForMemoryLeaks()` are also exempt from Swift Testing migration assertion findings (`skills.ios.no-xctassert` / `skills.ios.no-xctunwrap`). These rules remain active for modern Swift Testing suites and XCTest specs without an explicit brownfield quality contract.
6
+
7
+ ## [6.3.282] - 2026-05-19
8
+
9
+ - `PUMUKI-INC-150`: PRE_WRITE evidence coverage now materializes `skills.ios.critical-test-quality` as active and evaluated for XCTest test scopes that satisfy `makeSUT()` and `trackForMemoryLeaks()`. This removes the false `EVIDENCE_PLATFORM_CRITICAL_SKILLS_RULES_MISSING` block after the brownfield XCTest spec has no quality findings.
10
+
3
11
  ## [6.3.281] - 2026-05-19
4
12
 
5
13
  - `PUMUKI-INC-150`: `skills.ios.prefer-swift-testing` no longer blocks brownfield XCTest specs that already follow the repo quality contract with `makeSUT()` and `trackForMemoryLeaks()`. Swift Testing migration findings remain active for modernizable XCTest suites without an explicit brownfield quality pattern.
package/VERSION CHANGED
@@ -1 +1 @@
1
- v6.3.281
1
+ v6.3.283
@@ -2030,6 +2030,8 @@ final class BuyerOnboardingStringsTests: XCTestCase {
2030
2030
  func testTitle() {
2031
2031
  let sut = makeSUT()
2032
2032
  XCTAssertEqual(sut.title, "Comprar cerca")
2033
+ let required = try XCTUnwrap(sut.title)
2034
+ XCTAssertFalse(required.isEmpty)
2033
2035
  }
2034
2036
 
2035
2037
  private func makeSUT() -> BuyerOnboardingStrings {
@@ -2041,7 +2043,11 @@ final class BuyerOnboardingStringsTests: XCTestCase {
2041
2043
  `;
2042
2044
 
2043
2045
  assert.equal(hasSwiftModernizableXCTestSuiteUsage(brownfieldSpec), false);
2046
+ assert.equal(hasSwiftXCTestAssertionUsage(brownfieldSpec), false);
2047
+ assert.equal(hasSwiftXCTUnwrapUsage(brownfieldSpec), false);
2044
2048
  assert.deepEqual(collectSwiftModernizableXCTestSuiteLines(brownfieldSpec), []);
2049
+ assert.deepEqual(collectSwiftXCTestAssertionLines(brownfieldSpec), []);
2050
+ assert.deepEqual(collectSwiftXCTUnwrapLines(brownfieldSpec), []);
2045
2051
  });
2046
2052
 
2047
2053
  test('hasSwiftMixedTestingFrameworksUsage detecta mezcla XCTestCase y Testing/@Test', () => {
@@ -1697,6 +1697,10 @@ export const collectSwiftQuickNimbleLines = (source: string): readonly number[]
1697
1697
  };
1698
1698
 
1699
1699
  export const hasSwiftXCTestAssertionUsage = (source: string): boolean => {
1700
+ if (hasSwiftBrownfieldXCTestQualityPattern(source)) {
1701
+ return false;
1702
+ }
1703
+
1700
1704
  return (
1701
1705
  collectSwiftRegexLines(source, /\bXCTAssert[A-Za-z0-9_]*\s*\(/).length > 0 ||
1702
1706
  collectSwiftRegexLines(source, /\bXCTFail\s*\(/).length > 0
@@ -1715,10 +1719,18 @@ export const collectSwiftXCTestAssertionLines = (source: string): readonly numbe
1715
1719
  };
1716
1720
 
1717
1721
  export const hasSwiftXCTUnwrapUsage = (source: string): boolean => {
1722
+ if (hasSwiftBrownfieldXCTestQualityPattern(source)) {
1723
+ return false;
1724
+ }
1725
+
1718
1726
  return collectSwiftRegexLines(source, /\bXCTUnwrap\s*\(/).length > 0;
1719
1727
  };
1720
1728
 
1721
1729
  export const collectSwiftXCTUnwrapLines = (source: string): readonly number[] => {
1730
+ if (!hasSwiftXCTUnwrapUsage(source)) {
1731
+ return [];
1732
+ }
1733
+
1722
1734
  return sortedUniqueLines(collectSwiftRegexLines(source, /\bXCTUnwrap\s*\(/));
1723
1735
  };
1724
1736
 
@@ -485,6 +485,21 @@ const hasMakeSUTPattern = (content: string): boolean => /\bmakeSUT\s*\(/.test(co
485
485
  const hasTrackForMemoryLeaksPattern = (content: string): boolean =>
486
486
  /\btrackForMemoryLeaks\s*\(/.test(content);
487
487
 
488
+ const IOS_CRITICAL_TEST_QUALITY_RULE_ID = 'skills.ios.critical-test-quality';
489
+
490
+ const hasIosTestQualityScope = (facts: ReadonlyArray<Fact>): boolean =>
491
+ collectIosTestFileContents(facts).some((testFile) => isXCTestSource(testFile.content));
492
+
493
+ const appendUniqueRuleId = (
494
+ ruleIds: ReadonlyArray<string>,
495
+ ruleId: string
496
+ ): readonly string[] => {
497
+ if (ruleIds.includes(ruleId)) {
498
+ return [...ruleIds];
499
+ }
500
+ return [...ruleIds, ruleId].sort((left, right) => left.localeCompare(right));
501
+ };
502
+
488
503
  const toIosTestsQualityBlockingFinding = (params: {
489
504
  stage: 'PRE_COMMIT' | 'PRE_PUSH' | 'CI';
490
505
  facts: ReadonlyArray<Fact>;
@@ -1187,14 +1202,22 @@ export async function runPlatformGate(params: {
1187
1202
  }
1188
1203
  }
1189
1204
  const degradedModeBlocks = params.policyTrace?.degraded?.action === 'block';
1205
+ const coverageActiveRuleIds =
1206
+ coverage && hasIosTestQualityScope(facts)
1207
+ ? appendUniqueRuleId(coverage.activeRuleIds, IOS_CRITICAL_TEST_QUALITY_RULE_ID)
1208
+ : coverage?.activeRuleIds;
1209
+ const coverageEvaluatedRuleIds =
1210
+ coverage && hasIosTestQualityScope(facts)
1211
+ ? appendUniqueRuleId(coverage.evaluatedRuleIds, IOS_CRITICAL_TEST_QUALITY_RULE_ID)
1212
+ : coverage?.evaluatedRuleIds;
1190
1213
  const rulesCoverage = coverage
1191
1214
  ? {
1192
1215
  stage: params.policy.stage,
1193
1216
  contract: skillsRuleSet.registryCoverage?.contract ?? 'AUTO_RUNTIME_RULES_FOR_STAGE',
1194
1217
  scope_note:
1195
1218
  'rules_coverage reports AUTO runtime rules applicable to this stage; it does not claim full DECLARATIVE registry execution.',
1196
- active_rule_ids: [...coverage.activeRuleIds],
1197
- evaluated_rule_ids: [...coverage.evaluatedRuleIds],
1219
+ active_rule_ids: [...(coverageActiveRuleIds ?? coverage.activeRuleIds)],
1220
+ evaluated_rule_ids: [...(coverageEvaluatedRuleIds ?? coverage.evaluatedRuleIds)],
1198
1221
  matched_rule_ids: [...coverage.matchedRuleIds],
1199
1222
  unevaluated_rule_ids: [...coverage.unevaluatedRuleIds],
1200
1223
  ...(skillsRuleSet.registryCoverage
@@ -1214,8 +1237,8 @@ export async function runPlatformGate(params: {
1214
1237
  }
1215
1238
  : {}),
1216
1239
  counts: {
1217
- active: coverage.activeRuleIds.length,
1218
- evaluated: coverage.evaluatedRuleIds.length,
1240
+ active: (coverageActiveRuleIds ?? coverage.activeRuleIds).length,
1241
+ evaluated: (coverageEvaluatedRuleIds ?? coverage.evaluatedRuleIds).length,
1219
1242
  matched: coverage.matchedRuleIds.length,
1220
1243
  unevaluated: coverage.unevaluatedRuleIds.length,
1221
1244
  ...(skillsRuleSet.registryCoverage
@@ -1235,9 +1258,14 @@ export async function runPlatformGate(params: {
1235
1258
  : {}),
1236
1259
  },
1237
1260
  coverage_ratio:
1238
- coverage.activeRuleIds.length === 0
1261
+ (coverageActiveRuleIds ?? coverage.activeRuleIds).length === 0
1239
1262
  ? 1
1240
- : Number((coverage.evaluatedRuleIds.length / coverage.activeRuleIds.length).toFixed(6)),
1263
+ : Number(
1264
+ (
1265
+ (coverageEvaluatedRuleIds ?? coverage.evaluatedRuleIds).length /
1266
+ (coverageActiveRuleIds ?? coverage.activeRuleIds).length
1267
+ ).toFixed(6)
1268
+ ),
1241
1269
  }
1242
1270
  : createEmptySnapshotRulesCoverage(params.policy.stage);
1243
1271
  const brownfieldHotspotFindings = dependencies.evaluateBrownfieldHotspotFindings({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.281",
3
+ "version": "6.3.283",
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": {