@voidh4x0r/slopgate 0.1.14 → 0.1.15
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 +11 -0
- package/README.md +5 -5
- package/dist/mcp.js +15 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,17 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
9
9
|
- Go and Rust grammars.
|
|
10
10
|
- VS Code diagnostics.
|
|
11
11
|
|
|
12
|
+
## [0.1.15] - 2026-11-22
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- MCP `scan_path` now normalizes findings to MCP-root-relative paths inside `defaultMcpDeps.scan` before applying the root baseline, so a baseline written by `slopgate . --write-baseline` suppresses findings for subdirectory and single-file scans too. `scan_diff` is unchanged because it scans the root (empty prefix).
|
|
16
|
+
- Removed the duplicate path prefixing from `scan_path`; normalization has one owner and cannot double-prefix.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- 267 tests, including root-baseline suppression for MCP directory/file/root scans and no-double-prefix coverage.
|
|
20
|
+
- Documented that the MCP server root must be the repository root; select subdirectories with `scan_path`.
|
|
21
|
+
- Benchmark unchanged at **29 high-confidence findings across 991,705 lines of CPython, 96.6% labeled precision (28/29), 14/14 seeded defects, 0 high findings on 601 JavaScript files**; `staleLabels: []`, `unlabeledHigh: []`.
|
|
22
|
+
|
|
12
23
|
## [0.1.14] - 2026-11-22
|
|
13
24
|
|
|
14
25
|
### Fixed
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ AI writes code that *looks* right. `slopgate` finds the parts that only look rig
|
|
|
14
14
|
```console
|
|
15
15
|
$ npx @voidh4x0r/slopgate .
|
|
16
16
|
|
|
17
|
-
slopgate 0.1.
|
|
17
|
+
slopgate 0.1.15 · 4 files · 39ms
|
|
18
18
|
|
|
19
19
|
app.py
|
|
20
20
|
4:1 error high py/phantom-import `helper` is imported but not declared in any manifest and not present in this repository
|
|
@@ -190,7 +190,7 @@ npx @voidh4x0r/slopgate . --diff origin/main --fail-on high
|
|
|
190
190
|
| `scan_path` | findings in a file or directory |
|
|
191
191
|
| `list_rules` | the rule table, so the agent knows what is checked |
|
|
192
192
|
|
|
193
|
-
Reports are compact text: `file:line:col severity confidence rule-id message`, evidence included, capped at 50 findings per call. Paths are relative to the MCP server root, and config is resolved per requested path with the same nearest-config rule as the CLI. The server reads `.slopgate.json` and `.slopgate-baseline.json` like the CLI does, so an agent never re-reports debt you already accepted. It runs locally, makes no network calls, and writes nothing to disk.
|
|
193
|
+
Reports are compact text: `file:line:col severity confidence rule-id message`, evidence included, capped at 50 findings per call. Paths are relative to the MCP server root, and config is resolved per requested path with the same nearest-config rule as the CLI. Point the MCP server at the repository root; use `scan_path` to select subdirectories. The server reads `.slopgate.json` and `.slopgate-baseline.json` like the CLI does, so an agent never re-reports debt you already accepted. It runs locally, makes no network calls, and writes nothing to disk.
|
|
194
194
|
|
|
195
195
|
Full details: [docs/mcp.md](https://github.com/VoidH4x0r/slopgate/blob/main/docs/mcp.md).
|
|
196
196
|
|
|
@@ -210,7 +210,7 @@ jobs:
|
|
|
210
210
|
- uses: actions/checkout@v4
|
|
211
211
|
- uses: actions/setup-node@v4
|
|
212
212
|
with: { node-version: 22 }
|
|
213
|
-
- run: npx --yes @voidh4x0r/slopgate@0.1.
|
|
213
|
+
- run: npx --yes @voidh4x0r/slopgate@0.1.15 . --fail-on high
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
For GitHub code scanning, use `--format sarif` and upload with `github/codeql-action/upload-sarif`.
|
|
@@ -218,7 +218,7 @@ For GitHub code scanning, use `--format sarif` and upload with `github/codeql-ac
|
|
|
218
218
|
For inline pull-request annotations **without** code scanning, use `--format github`, which emits [workflow commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions):
|
|
219
219
|
|
|
220
220
|
```yaml
|
|
221
|
-
- run: npx --yes @voidh4x0r/slopgate@0.1.
|
|
221
|
+
- run: npx --yes @voidh4x0r/slopgate@0.1.15 . --format github --fail-on high
|
|
222
222
|
```
|
|
223
223
|
|
|
224
224
|
Each finding becomes an `error` / `warning` / `notice` annotation on the exact line, followed by a summary notice.
|
|
@@ -303,7 +303,7 @@ Issues and pull requests are welcome. Start with [CONTRIBUTING.md](https://githu
|
|
|
303
303
|
git clone https://github.com/VoidH4x0r/slopgate
|
|
304
304
|
cd slopgate
|
|
305
305
|
npm install
|
|
306
|
-
npm test #
|
|
306
|
+
npm test # 267 tests; the tests themselves make no network or child-process calls
|
|
307
307
|
npm run typecheck
|
|
308
308
|
npm run verify # all release gates in one command
|
|
309
309
|
```
|
package/dist/mcp.js
CHANGED
|
@@ -133,13 +133,7 @@ export function createMcpServer(deps) {
|
|
|
133
133
|
return textResult(`No files matched under ${target} (check include/exclude patterns)`, true);
|
|
134
134
|
}
|
|
135
135
|
const visible = result.findings.filter((finding) => meetsConfidence(finding.confidence, confidence));
|
|
136
|
-
|
|
137
|
-
const base = targetInfo?.isFile() ? path.dirname(target) : target;
|
|
138
|
-
const prefix = prefixForRoot(deps.root, base);
|
|
139
|
-
const output = prefix
|
|
140
|
-
? visible.map((finding) => ({ ...finding, file: `${prefix}/${finding.file}` }))
|
|
141
|
-
: visible;
|
|
142
|
-
return textResult(formatFindings(output, result, deps.version, max));
|
|
136
|
+
return textResult(formatFindings(visible, result, deps.version, max));
|
|
143
137
|
}
|
|
144
138
|
if (name === 'scan_diff') {
|
|
145
139
|
const base = typeof params.base === 'string' && params.base.length > 0 ? params.base : 'HEAD';
|
|
@@ -230,11 +224,22 @@ export function defaultMcpDeps(root, version) {
|
|
|
230
224
|
async scan(scanRoot) {
|
|
231
225
|
const config = await configFor(scanRoot);
|
|
232
226
|
const result = await scanProject({ root: scanRoot, config });
|
|
227
|
+
// Findings and baseline fingerprints are MCP-root-relative. Normalize
|
|
228
|
+
// here, before partitioning, so a root baseline matches subdirectory and
|
|
229
|
+
// single-file scans too.
|
|
230
|
+
const target = path.resolve(scanRoot);
|
|
231
|
+
const info = await stat(target).catch(() => undefined);
|
|
232
|
+
const base = info?.isFile() ? path.dirname(target) : target;
|
|
233
|
+
const prefix = prefixForRoot(root, base);
|
|
234
|
+
const normalized = prefix
|
|
235
|
+
? result.findings.map((finding) => ({ ...finding, file: `${prefix}/${finding.file}` }))
|
|
236
|
+
: result.findings;
|
|
233
237
|
// Respect a baseline if one exists, so agents do not re-report known debt.
|
|
234
238
|
const baseline = await loadBaseline(path.join(root, '.slopgate-baseline.json'));
|
|
235
|
-
if (baseline)
|
|
236
|
-
return { ...result, findings: partitionByBaseline(
|
|
237
|
-
|
|
239
|
+
if (baseline) {
|
|
240
|
+
return { ...result, findings: partitionByBaseline(normalized, baseline).fresh };
|
|
241
|
+
}
|
|
242
|
+
return { ...result, findings: normalized };
|
|
238
243
|
},
|
|
239
244
|
diff: diffSince,
|
|
240
245
|
};
|