Skip to content

Commit e4b84bd

Browse files
authored
fix: MPI cycle — CLI 0.19 docs, brace-expansion audit, AGENTS refresh (#217)
* fix: align CLI 0.19.0 docs, clear brace-expansion audit, refresh counts - Override brace-expansion to 5.0.8 (CVE-2026-14257 / GHSA-mh99-v99m-4gvg) - Recommend Patchloom CLI 0.19.0; document already_exists create/rename recovery - Unit test formatCliOutput for already_exists JSON envelopes - Refresh AGENTS.md unit test counts (patchloomCli 39, initializeProject 30) Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> * chore: refresh @types/vscode lock to 1.125.0 Keep package.json range at ^1.90.0 so vsce package stays compatible with engines.vscode, while resolving newer typings for local compile. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> * docs: list verifyMcp.ts and release-merge guard in AGENTS structure Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> --------- Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent cf63f40 commit e4b84bd

5 files changed

Lines changed: 30 additions & 30 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ src/
3737
batchApply.ts Batch Apply command: atomic multi-operation plan via JSON
3838
setupWorkspace.ts Setup Workspace command: guided readiness walkthrough
3939
showStatus.ts Show Status command: diagnostics display
40+
verifyMcp.ts Verify MCP Server command: JSON-RPC initialize probe
4041
autoUpdate.ts Auto-update check on activation: compare installed vs latest release
4142
install/managed.ts Managed install safety: checksum, staging, promotion, rollback, persistence
4243
logging/outputChannel.ts Output channel wrapper: log, logCommand, logResult, show, dispose
@@ -50,11 +51,11 @@ test/
5051
batchApply.test.ts Batch template and operation count parsing (15 tests)
5152
binary.test.ts Binary discovery, managed install, compatibility, workspace env (59 tests)
5253
binaryDiscovery.test.ts Real executable discovery on PATH (13 tests)
53-
initializeProject.test.ts Status display, agents file classification, formatError (29 tests)
54+
initializeProject.test.ts Status display, agents file classification, formatError (30 tests)
5455
managedLifecycle.test.ts Managed install with real file I/O (22 tests)
5556
mcpConfig.test.ts MCP config with real temp directories (9 tests)
5657
outputChannel.test.ts Output channel logging wrapper (10 tests)
57-
patchloomCli.test.ts Patchloom CLI integration with real binary + managed install e2e MCP (37 tests incl. e2e)
58+
patchloomCli.test.ts Patchloom CLI integration with real binary + managed install e2e MCP (39 tests incl. e2e)
5859
propertyBased.test.ts Property-based tests with fast-check (13 tests)
5960
quickActions.test.ts Quick action command building, path containment, patch merge (57 tests)
6061
verifyMcp.test.ts MCP server verify and JSON-RPC response parsing (15 tests)
@@ -66,6 +67,7 @@ test/
6667
extension.test.ts ExTester UI tests (status bar, command palette)
6768
scripts/
6869
hide-test-vscode.sh macOS: patch test VS Code to suppress window activation
70+
guard-no-release-merge.sh Hard abort if agent tries to merge a release PR without approval
6971
.github/
7072
CODEOWNERS Owner for all files
7173
copilot-instructions.md Pointer to AGENTS.md for GitHub Copilot

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,17 @@ The extension detects outdated CLI builds and warns with upgrade guidance. It re
170170
Set `patchloom.path` in settings, or add the CLI to your `PATH`.
171171

172172
**CLI compatibility warning**
173-
Run `Patchloom: Open Releases` to download the latest release. The extension requires 0.3.0 or newer; 0.18.0 is recommended.
173+
Run `Patchloom: Open Releases` to download the latest release. The extension requires 0.3.0 or newer; 0.19.0 is recommended.
174174

175175
**Path rejected by workspace guard**
176176
Quick Actions and Batch Apply pass `--contain` so paths stay inside the open workspace folder. On CLI 0.18+, sandbox escapes report `error_kind: guard_rejected` (not a generic `invalid_input`). Keep targets under the workspace root, or open the folder that owns the files.
177177

178178
**Batch replace shape**
179179
Batch lines use `replace PATH OLD NEW` (and optional flags such as `--fuzzy`). Do not paste CLI form `replace OLD --new NEW path` into a batch plan; CLI 0.18+ returns a clear parse error with the PATH OLD NEW hint.
180180

181+
**Create or rename destination already exists**
182+
On CLI 0.19+, create/rename conflicts report `error_kind: already_exists` (not a generic `invalid_input`). Use the force flag when overwriting is intentional, or pick a free destination path.
183+
181184
**MCP config not injected**
182185
Run `Patchloom: Configure MCP` and select the target editor config.
183186

@@ -211,7 +214,7 @@ File bugs and feature requests at [patchloom/patchloom-vscode/issues](https://gi
211214
## Requirements
212215

213216
- VS Code 1.90 or newer (or compatible editors: Cursor, Windsurf, VSCodium)
214-
- [Patchloom CLI](https://github.com/patchloom/patchloom) 0.3.0 or newer (0.18.0+ recommended for structured `guard_rejected` on `--contain` failures, clearer batch `replace PATH OLD NEW` parse hints, multi-doc `doc merge --selector`, line-oriented `insert_before`/`insert_after`, 56 MCP tools, JSON `applied` honesty, and agent-facing `error_kind` envelopes)
217+
- [Patchloom CLI](https://github.com/patchloom/patchloom) 0.3.0 or newer (0.19.0+ recommended for stable `error_kind` peels including `already_exists` / `not_found` / `guard_rejected`, clearer create/rename force hints, multi-doc `doc merge --selector`, line-oriented `insert_before`/`insert_after`, batch `replace PATH OLD NEW` parse hints, 56 MCP tools, JSON `applied` honesty, and agent-facing envelopes)
215218

216219
## Contributing
217220

package-lock.json

Lines changed: 7 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
"check": "npm run test && npm run test:coverage && npm run package"
254254
},
255255
"overrides": {
256+
"brace-expansion": "5.0.8",
256257
"mocha": {
257258
"diff": "^8.0.3",
258259
"serialize-javascript": "^7.0.5"

test/unit/initializeProject.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ test("formatCliOutput prefers JSON error over noisy stderr", () => {
8585
);
8686
});
8787

88+
test("formatCliOutput surfaces already_exists kind (CLI 0.19+)", () => {
89+
const stdout = JSON.stringify({
90+
ok: false,
91+
error: "destination already exists: src/out.ts",
92+
error_kind: "already_exists",
93+
applied: false
94+
});
95+
assert.equal(
96+
formatCliOutput({ exitCode: 1, stdout, stderr: "" }),
97+
"already_exists: destination already exists: src/out.ts"
98+
);
99+
});
100+
88101
test("classifyAgentsFile returns missing when AGENTS.md does not exist", () => {
89102
assert.equal(classifyAgentsFile(undefined, "# Rules\n"), "missing");
90103
});

0 commit comments

Comments
 (0)