tewip-ai 0.72.0 → 0.73.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.
|
@@ -14,6 +14,14 @@ const CHECKS = [
|
|
|
14
14
|
/\bshould\s*\.\s*not\b/,
|
|
15
15
|
/\bassert\b\s*[.(]/,
|
|
16
16
|
/\bassert(Equals?|True|False|Null|NotNull|That|Throws|Match|Contains|Rejects|Fails)\b/i,
|
|
17
|
+
// Any call named assertSomething. The list above needs the suffix to end on a word boundary, so
|
|
18
|
+
// keycloak's own `assertNullAdditionalJdbcProperty(config, null, prop)` matched nothing: `Null` is
|
|
19
|
+
// followed by `A`. Four of its ConfigurationTest tests delegate to a helper built out of those
|
|
20
|
+
// calls, and the helper was being credited only because the *string* `--db-tls-mode=verify-server`
|
|
21
|
+
// happened to contain the word `verify` - so narrowing `verify` to a call turned four correct
|
|
22
|
+
// verdicts into accusations. The corpus caught it. A call named `assertX(` is the universal
|
|
23
|
+
// convention for a custom assertion, and reading it as one is both broader and the actual reason.
|
|
24
|
+
/\bassert[A-Z]\w*\s*\(/,
|
|
17
25
|
/\.\s*to\s*\.\s*(equal|be|deep|have|include|throw|match|exist)\b/,
|
|
18
26
|
/\btoMatch(Snapshot|InlineSnapshot|ImageSnapshot)\s*\(/,
|
|
19
27
|
/\bexpect(Type|TypeOf)\s*[<(]/,
|
package/dist/engine/walk.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
//
|
|
8
8
|
// The cap now counts the files the caller actually wants. A budget spent on files the caller will
|
|
9
9
|
// discard is not a budget.
|
|
10
|
-
import {
|
|
10
|
+
import { lstatSync, readdirSync } from 'node:fs';
|
|
11
11
|
import { join } from 'node:path';
|
|
12
12
|
const SKIP_DIR = new Set(['node_modules', '.git', 'dist', 'build', 'out', 'coverage', 'target', 'vendor', '__pycache__', '.venv', 'venv', '.tewip', '.next', '.cache']);
|
|
13
13
|
const BINARY = /\.(?:png|jpe?g|gif|webp|ico|svg|pdf|zip|gz|tar|exe|dll|so|dylib|woff2?|ttf|eot|mp4|mp3|wav|class|jar|pyc|lock)$/i;
|
|
@@ -39,11 +39,29 @@ export function scanSourceFiles(root, limit = 5000, keep) {
|
|
|
39
39
|
const path = join(dir, entry);
|
|
40
40
|
let info;
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
// `lstat`, not `stat`: a symlink must be seen as a symlink. See below.
|
|
43
|
+
info = lstatSync(path);
|
|
43
44
|
}
|
|
44
45
|
catch {
|
|
45
46
|
continue;
|
|
46
47
|
}
|
|
48
|
+
// A symlink is neither walked nor read.
|
|
49
|
+
//
|
|
50
|
+
// `stat` follows them, so a link to a directory looked like a directory and was walked. In
|
|
51
|
+
// immich, `fastlane/metadata` points at `../mobile/android/fastlane/metadata` inside the same
|
|
52
|
+
// repository: following it read 77 files a second time, under a path they do not really have.
|
|
53
|
+
// A finding in one of them would have been reported twice, at two different paths, and the
|
|
54
|
+
// file count no longer meant what the report said it meant.
|
|
55
|
+
//
|
|
56
|
+
// Worse than the double count: a link pointing out of the project would have Tewip reading
|
|
57
|
+
// files outside the directory it was given, which it must never do whatever is on the other
|
|
58
|
+
// end. Anything genuinely inside the project is still reached by its real path.
|
|
59
|
+
//
|
|
60
|
+
// Windows was already doing the right thing by accident - git writes a symlink there as a
|
|
61
|
+
// small text file - which is exactly why this hid: the numbers were recorded on Windows and
|
|
62
|
+
// only the Linux corpus run disagreed.
|
|
63
|
+
if (info.isSymbolicLink())
|
|
64
|
+
continue;
|
|
47
65
|
if (info.isDirectory()) {
|
|
48
66
|
if (!SKIP_DIR.has(entry))
|
|
49
67
|
walk(path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tewip-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"mcpName": "io.github.hmamut39/tewip",
|
|
5
5
|
"description": "Tewip finds why each failing test failed - real bug, flaky test, environment, test data or changed selector - for any stack, from the command line, CI, or your editor.",
|
|
6
6
|
"keywords": [
|