Feature/osa package with ai tooling guards #15
Annotations
8 errors
|
OSA Snippets Tests
Process completed with exit code 1.
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should handle empty allowPrefix:
js/__tests__/audit-auto-approve.test.ts#L462
AssertionError: expected "log" to be called with arguments: [ Array(1) ]
Received:
1st log call:
[
- "✅ All autoApprove entries are safe for prefixes: ",
+ "
+ 📊 Prefix Health Report:",
]
2nd log call:
[
- "✅ All autoApprove entries are safe for prefixes: ",
+ "========================",
]
3rd log call:
[
- "✅ All autoApprove entries are safe for prefixes: ",
+ "✅ risky: 1/1 safe (0% risky)",
]
4th log call:
[
- "✅ All autoApprove entries are safe for prefixes: ",
+ "",
]
5th log call:
[
- "✅ All autoApprove entries are safe for prefixes: ",
+ "✅ All autoApprove entries are safe",
]
Number of calls: 5
❯ __tests__/audit-auto-approve.test.ts:462:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should handle multiple settings files:
js/__tests__/audit-auto-approve.test.ts#L444
AssertionError: expected "log" to be called with arguments: [ '⚠️ Found issues in 1 file(s):' ]
Received:
1st log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "⚠️ Found issues in 3 file(s):",
]
2nd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /Users/runner/Library/Application Support/Code/User/settings.json",
]
3rd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :risky-task",
]
4th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /test/.vscode/settings.json",
]
5th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :risky-task",
]
6th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /test/subdir/.vscode/settings.json",
]
7th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :risky-task",
]
8th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "
+ Expected safe pattern:
+ /^:(safe)-[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)?$|^:clean$/",
]
Number of calls: 8
❯ __tests__/audit-auto-approve.test.ts:444:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should handle no settings files found:
js/__tests__/audit-auto-approve.test.ts#L345
AssertionError: expected "log" to be called with arguments: [ Array(1) ]
Received:
1st log call:
[
- "✅ All autoApprove entries are safe for prefixes: test",
+ "⚠️ Found issues in 1 file(s):",
]
2nd log call:
[
- "✅ All autoApprove entries are safe for prefixes: test",
+ "- /Users/runner/Library/Application Support/Code/User/settings.json",
]
3rd log call:
[
- "✅ All autoApprove entries are safe for prefixes: test",
+ " ✖ risky (enabled & not allowed): :safe-task",
]
4th log call:
[
- "✅ All autoApprove entries are safe for prefixes: test",
+ "
+ Expected safe pattern:
+ /^:(test)-[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)?$|^:clean$/",
]
Number of calls: 4
❯ __tests__/audit-auto-approve.test.ts:345:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should detect non-boolean values:
js/__tests__/audit-auto-approve.test.ts#L289
AssertionError: expected "log" to be called with arguments: [ Array(1) ]
Received:
1st log call:
[
"{
\"findings\": [
{
+ \"file\": \"/Users/runner/Library/Application Support/Code/User/settings.json\",
+ \"riskyPatterns\": [],
+ \"nonBoolean\": [
+ \":non-boolean-task\",
+ \":another-non-boolean\"
+ ]
+ },
+ {
\"file\": \"/test/.vscode/settings.json\",
\"riskyPatterns\": [],
\"nonBoolean\": [
\":non-boolean-task\",
\":another-non-boolean\"
]
}
],
\"prefixes\": [
\"safe\"
- ]
+ ],
+ \"prefixHealth\": {
+ \"safe\": {
+ \"prefix\": \"safe\",
+ \"totalPatterns\": 2,
+ \"riskyPatterns\": 0,
+ \"safePatterns\": 2,
+ \"patterns\": [
+ \":safe-task\",
+ \":safe-task\"
+ ],
+ \"riskyList\": []
+ }
+ }
}",
]
Number of calls: 1
❯ __tests__/audit-auto-approve.test.ts:289:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should handle multiple prefixes:
js/__tests__/audit-auto-approve.test.ts#L237
AssertionError: expected "log" to be called with arguments: [ '⚠️ Found issues in 1 file(s):' ]
Received:
1st log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "⚠️ Found issues in 2 file(s):",
]
2nd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /Users/runner/Library/Application Support/Code/User/settings.json",
]
3rd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :unknown-task",
]
4th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /test/.vscode/settings.json",
]
5th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :unknown-task",
]
6th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "
+ Expected safe pattern:
+ /^:(prefix1|prefix2)-[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)?$|^:clean$/",
]
Number of calls: 6
❯ __tests__/audit-auto-approve.test.ts:237:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should output JSON when json option is true:
js/__tests__/audit-auto-approve.test.ts#L193
AssertionError: expected "log" to be called with arguments: [ Array(1) ]
Received:
1st log call:
[
"{
\"findings\": [],
\"prefixes\": [
\"safe\"
- ]
+ ],
+ \"prefixHealth\": {
+ \"safe\": {
+ \"prefix\": \"safe\",
+ \"totalPatterns\": 2,
+ \"riskyPatterns\": 0,
+ \"safePatterns\": 2,
+ \"patterns\": [
+ \":safe-task\",
+ \":safe-task\"
+ ],
+ \"riskyList\": []
+ }
+ }
}",
]
Number of calls: 1
❯ __tests__/audit-auto-approve.test.ts:193:22
|
|
__tests__/audit-auto-approve.test.ts > auditAutoApprove > should detect risky patterns:
js/__tests__/audit-auto-approve.test.ts#L111
AssertionError: expected "log" to be called with arguments: [ '⚠️ Found issues in 1 file(s):' ]
Received:
1st log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "⚠️ Found issues in 2 file(s):",
]
2nd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /Users/runner/Library/Application Support/Code/User/settings.json",
]
3rd log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :unknown-task",
]
4th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "- /test/.vscode/settings.json",
]
5th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ " ✖ risky (enabled & not allowed): :unknown-task",
]
6th log call:
[
- "⚠️ Found issues in 1 file(s):",
+ "
+ Expected safe pattern:
+ /^:(tachyon)-[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)?$|^:clean$/",
]
Number of calls: 6
❯ __tests__/audit-auto-approve.test.ts:111:22
|