pumuki 6.3.277 → 6.3.278
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 +4 -0
- package/core/facts/detectors/text/ios.test.ts +24 -0
- package/core/facts/detectors/text/ios.ts +11 -0
- package/core/facts/detectors/typescript/index.test.ts +620 -0
- package/core/facts/detectors/typescript/index.ts +777 -0
- package/core/facts/extractHeuristicFacts.ts +27 -1
- package/core/rules/presets/heuristics/ios.test.ts +6 -1
- package/core/rules/presets/heuristics/ios.ts +19 -0
- package/core/rules/presets/heuristics/typescript.test.ts +66 -1
- package/core/rules/presets/heuristics/typescript.ts +204 -0
- package/integrations/config/skillsDetectorRegistry.ts +106 -0
- package/integrations/config/skillsRuleClassification.ts +0 -2
- package/integrations/evidence/blockingCauses.ts +9 -2
- package/integrations/gate/evaluateAiGate.ts +20 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.3.278] - 2026-05-18
|
|
4
|
+
|
|
5
|
+
- `PUMUKI-INC-149`: `EVIDENCE_GATE_BLOCKED` no longer hides the real blocking cause. PRE_WRITE/AI Gate now expands blocked evidence into actionable causes from `snapshot.findings` and `ai_gate.violations`, including rule, code, file, lines and remediation when available, while preserving the PRE_WRITE lease fail-closed contract.
|
|
6
|
+
|
|
3
7
|
## [6.3.277] - 2026-05-18
|
|
4
8
|
|
|
5
9
|
- `PUMUKI-INC-146`: PRE_WRITE now resolves the effective iOS test-quality scope from staged paths first when a staged slice exists, falling back to the worktree only when there is no staged code. This prevents unstaged Swift test files from forcing `skills.ios.critical-test-quality` onto unrelated staged iOS/SwiftUI production commits, while preserving the hard block for staged Swift test slices.
|
|
@@ -55,6 +55,8 @@ import {
|
|
|
55
55
|
hasSwiftLegacyExpectationDescriptionUsage,
|
|
56
56
|
hasSwiftLegacyPreviewProviderUsage,
|
|
57
57
|
hasSwiftLegacySwiftUiObservableWrapperUsage,
|
|
58
|
+
collectSwiftEnvironmentObjectLines,
|
|
59
|
+
hasSwiftEnvironmentObjectUsage,
|
|
58
60
|
hasSwiftLowContrastStaticColorPairUsage,
|
|
59
61
|
hasSwiftMainThreadBlockingSleepUsage,
|
|
60
62
|
hasSwiftMassiveViewControllerResponsibilityUsage,
|
|
@@ -1791,6 +1793,28 @@ struct ContentView: View {
|
|
|
1791
1793
|
assert.equal(hasSwiftLegacySwiftUiObservableWrapperUsage(modernWrapper), false);
|
|
1792
1794
|
});
|
|
1793
1795
|
|
|
1796
|
+
test('hasSwiftEnvironmentObjectUsage detecta @EnvironmentObject y preserva wrappers explicitos', () => {
|
|
1797
|
+
const environmentObject = `
|
|
1798
|
+
struct ProfileView: View {
|
|
1799
|
+
@EnvironmentObject var session: SessionStore
|
|
1800
|
+
|
|
1801
|
+
var body: some View { Text(session.name) }
|
|
1802
|
+
}
|
|
1803
|
+
`;
|
|
1804
|
+
const explicitState = `
|
|
1805
|
+
struct ProfileView: View {
|
|
1806
|
+
@Environment(\\.dismiss) private var dismiss
|
|
1807
|
+
@State private var isPresented = false
|
|
1808
|
+
|
|
1809
|
+
var body: some View { Button("Close") { dismiss() } }
|
|
1810
|
+
}
|
|
1811
|
+
`;
|
|
1812
|
+
|
|
1813
|
+
assert.equal(hasSwiftEnvironmentObjectUsage(environmentObject), true);
|
|
1814
|
+
assert.deepEqual(collectSwiftEnvironmentObjectLines(environmentObject), [3]);
|
|
1815
|
+
assert.equal(hasSwiftEnvironmentObjectUsage(explicitState), false);
|
|
1816
|
+
});
|
|
1817
|
+
|
|
1794
1818
|
test('hasSwiftLegacyPreviewProviderUsage detecta PreviewProvider legacy y preserva #Preview', () => {
|
|
1795
1819
|
const legacyPreview = `
|
|
1796
1820
|
struct CheckoutView_Previews: PreviewProvider {
|
|
@@ -1386,6 +1386,17 @@ export const hasSwiftLegacySwiftUiObservableWrapperUsage = (source: string): boo
|
|
|
1386
1386
|
return hasSwiftSanitizedRegexMatch(source, /@\s*(?:StateObject|ObservedObject)\b/);
|
|
1387
1387
|
};
|
|
1388
1388
|
|
|
1389
|
+
export const collectSwiftEnvironmentObjectLines = (source: string): readonly number[] => {
|
|
1390
|
+
return collectSwiftRegexLines(
|
|
1391
|
+
source,
|
|
1392
|
+
/@\s*EnvironmentObject\s+(?:private\s+)?var\s+[A-Za-z_][A-Za-z0-9_]*/g
|
|
1393
|
+
);
|
|
1394
|
+
};
|
|
1395
|
+
|
|
1396
|
+
export const hasSwiftEnvironmentObjectUsage = (source: string): boolean => {
|
|
1397
|
+
return collectSwiftEnvironmentObjectLines(source).length > 0;
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1389
1400
|
export const hasSwiftNonPrivateStateOwnershipUsage = (source: string): boolean => {
|
|
1390
1401
|
return source.split(/\r?\n/).some((line) => {
|
|
1391
1402
|
const sanitizedLine = stripSwiftLineForSemanticScan(line);
|