Skip to content

fix: harden CLI env and align MPI follow-ups with CLI 0.31 - #236

Merged
SebTardif merged 8 commits into
mainfrom
fix/improve-mpi-20260827-s1318
Aug 27, 2026
Merged

SebTardif merged 8 commits into
mainfrom
fix/improve-mpi-20260827-s1318

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Summary

MPI cycle after the CLI 0.31 alignment. One session branch with tests, error-path fixes, and a trust fix for patchloom.env.

Why

New 0.31 surfaces were recommended without live Quick Action coverage. Wiring patchloom.env then let a workspace overlay PATH / LD_PRELOAD onto the managed binary. CI UI tests compiled the wrong tree.

The change

  • Live tests for numeric selectors, search -L all-hits, YAML alias doc set, parent-path create via builders, and agent-rules --surface core --mode
  • Initialize uses formatCliOutput; Create uses resolveWorkspaceRelativePath; AGENTS.md read treats only FileNotFound as missing
  • patchloom.env is honored, then restricted to PATCHLOOM_* and ignored from untrusted workspace settings
  • Patch merge keeps --contain when the patch is inside the workspace
  • CI and npm test compile out-uitest before ExTester
  • Pin @types/vscode to ~1.90.0; npm audit in CI includes devDependencies

Verification

  • npm run check (run locally before push)
  • Targeted unit tests for env allowlist, path containment, formatCliOutput

Checklist

  • All commits in this pull request are signed off with git commit -s
  • I ran npm run check and it passes
  • I updated docs if user-facing behavior changed
  • I am contributing this work under the repository license (MIT)

- Numeric selector via buildDocGetQuickAction
- search -L all-hits no_matches + formatCliOutput stderr
- create parent-path via builder, YAML alias doc set, agent-rules core+mode

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
- Create Quick Action now uses resolveWorkspaceRelativePath
- generateAgentRules throws formatCliOutput so error_kind and suggested_op appear
- readTextFileIfExists treats only FileNotFound as missing AGENTS.md

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Pass patchloom.env to CLI spawn sites and honor patchloom.trace.server
for command/result logging. Surface next-step hints on path, missing
file, markdown, and MCP timeout errors. Catch AGENTS.md permission
errors and preview failures instead of failing the command uncaught.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Pin @types/vscode to ~1.90.0 so the lock cannot float past engines.vscode
(^1.90.0). vsce rejects a declared @types/vscode range newer than engines.
Bump @types/node to 26.4.0. Audit the full graph in CI (including
devDependencies) because the production graph is empty. Refresh AGENTS.md
unit test counts to match grep.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Only PATCHLOOM_* keys overlay the CLI env. Workspace env is ignored
in untrusted folders. Patch merge keeps --contain when the patch
lives in the workspace. CI compiles out-uitest before ExTester.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Filenames such as ..changes.patch stay inside the workspace sandbox.
isPathInsideWorkspace compares resolved prefixes (case-fold on
macOS/Windows). npm test now compiles out-uitest so it matches CI.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif marked this pull request as ready for review August 27, 2026 21:12
github-actions[bot]
github-actions Bot previously approved these changes Aug 27, 2026
@SebTardif
SebTardif enabled auto-merge (squash) August 27, 2026 21:12
UI tests now compile in CI. The suite opens a workspace without
AGENTS.md, so content-based activation never ran and before()
timed out. Invoke Show Status first to load the extension.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
github-actions[bot]
github-actions Bot previously approved these changes Aug 27, 2026
The command palette InputBox was treated as the Quick Action picker
when getQuickPicks() returned empty labels. Keep polling until a
Patchloom notification or a Replace/Tidy pick appears.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif merged commit 33c0b85 into main Aug 27, 2026
22 checks passed
@SebTardif
SebTardif deleted the fix/improve-mpi-20260827-s1318 branch August 27, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant