Repository navigation
refactor(vscode): move the extension to vscode/ and skip the Python CI for extension-only changes - #126
Merged
zy1233 merged 2 commits intoNov 13, 2026
Conversation
added 2 commits
November 13, 2026 10:45
packages/ holds the Python packages: each has a pyproject.toml, and the uv workspace and the pytest paths name them one by one. The extension is not Python and is in neither list. web/ and tui/ are at the root for the same reason, and each has its own CI, as the extension has. No file changes inside the extension (80 pure renames, 8 renames with a small edit). What the new place needed: - scripts/lib.mjs: REPO_ROOT is one folder up now (package.mjs reads LICENSE from it, make-icon.mjs reads web/public/favicon.svg). - test/packaging.test.ts reads the workflow; real-agent, real-first-run and real-thinking find the repository with ../.. (was ../../..). - package.json: repository.directory is vscode. - vscode-extension.yml: the trigger path, 8 working-directory values, the artifact path, and three ../../vsix/ paths (now ../vsix/). The three have no "pi-vscode" in the text, so a search by name misses them. Two of them are in the publish job, which does not run in a pull request. - README.md, AGENTS.md, the design document (decision D38) and the record of the agent context usage name the new folder. A new test (points every path of the workflow at the real layout) checks the folder, the trigger path, the artifact path and every ../vsix hop against the real layout. Four wrong values of the workflow (the old folder in a working-directory, in the trigger and in the artifact path, and ../../vsix in the last publish step) each make it fail. The workflow file name (vscode-extension.yml) and the environment (vscode-publish) do not change: the two registries name them, not a directory. This commit does not change which CI runs: ci.yml has no paths filter.
…ension or the docs
ci.yml had no paths filter, so every pull request ran the whole Python CI
(Ruff, and pytest on three Python versions: about 15 minutes of runner
time), also a pull request that only changes vscode/ or web/. Moving the
extension to the root does not change that. This does.
The filter is a `paths` list with `!` patterns, on push and on
pull_request:
- "**"
- "!vscode/**"
- "!docs/**"
- "!.github/workflows/vscode-extension.yml"
- "**/*.py"
GitHub reads the patterns in order: a `!` pattern takes a file out, and a
later positive pattern puts it back. The workflow runs when at least one
changed file is left in. So:
- Only vscode/, docs/ and the extension workflow, with no .py file: skipped.
(The extension has its own workflow.)
- Any .py file runs it. This matters: Ruff reads three Python files inside
vscode/ (scripts/python_licenses.py, test/support/fake_model.py,
test/support/pty_answers.py). A paths-ignore on vscode/** would skip them.
- Any other file runs it, also AGENTS.md, README.md and ci.yml itself.
Why it is safe:
- No check is required on main (the ruleset only forbids a deletion and a
force push), so a skipped run blocks no merge.
- docs/ has Markdown only, and it is in `extend-exclude` of Ruff and outside
`testpaths` of pytest. No Python test reads vscode/ or docs/.
Checked: every workflow parses as YAML, and a model of the documented rule
(patterns in order) gave the expected result for 18 single paths and 7 sets
of paths, among them the files of the pull request 124 (skipped), the three
Python files (run) and "extension + AGENTS.md" (run). Not verified: the
effect on GitHub. This commit changes ci.yml, so its own pull request runs
the workflow. The first pull request that touches only the extension shows
the effect.
AGENTS.md: the row of vscode/ said that ruff does not read the extension.
It reads the three Python files. The row says so now, and says what the
filter does. Design document: decision D39.
zy1233
added a commit
that referenced
this pull request
Nov 13, 2026
…124) Chat answers are drawn as Markdown. markdown-it is a parser only: raw HTML stays text, an image is not loaded (it shows as a link), and a link opens through the host for http, https and mailto only. A streamed answer is drawn at most once each 80 ms. The status row shows the turn time and the folder. It also shows the context use when an agent sends usage_update (agent 0.9.1 does not). The record of the agent side is docs/specs/2026-11-13-agent-context-usage.md. The extension moves from packages/pi-vscode/ to vscode/ in the same merge (#126). ci.yml skips Ruff and pytest for a change that only touches vscode/ without .py files, docs/ or vscode-extension.yml. The version stays 1.0.0 and the CHANGELOG entry is Unreleased. No publish runs on this merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fe25785packages/pi-vscode/tovscode/a67d0adci.ymlskips Ruff and pytest for a change that only touches the extension or the docs (can be dropped alone)packages/is the Python part of the repository: the uv workspace and the pytesttestpathsinpyproject.tomlname its packages one by one.web/andtui/are already at the root.The move alone does not stop the unneeded CI.
ci.ymlhad nopathsfilter, so every pull request ran Ruff and pytest on three Python versions (about 15 minutes of runner time), also one that only changesweb/. The second commit is the fix:What the move changed (the rest is 80 pure renames):
Kept: the workflow file name
vscode-extension.ymland the environmentvscode-publish. Both registries name them (with the repository), not a folder, so the trusted publishers stay valid.Evidence
Before: a search for
pi-vscodefinds 12 mentions in the workflow. It does not find three more paths that depend on the folder:../../vsix/*.vsix. Two of them are in the publish job, which does not run in a pull request. A wrong value there shows only in a real release.After: a test reads the workflow and the real layout (
points every path of the workflow at the real layout).Tests
npm run check= typecheck + eslint + 334 tests passed (333 before, and the new one). 18 skipped (opt-in). The same counts as before the move.real-agent.test.ts(opt-in, the real Python agent) passes on Windows: 7 tests. The other two opt-in files need Linux. A script checks that all three compute the repository root with../...npm run notices(production build) passes.REPO_ROOTfindsLICENSEandweb/public/favicon.svg.!takes out, a later pattern puts back), run on 18 paths and 7 sets of paths: the files of feat(vscode): render Markdown in the chat and enrich the status row #124 are skipped, the 3 Python files run, "extension + AGENTS.md" runs.vscode/PACKAGING.md, in onedocs/file and invscode-extension.yml: onlyVS Code extensionstarted,CIdid not. After one more commit (a docstring line invscode/scripts/python_licenses.py):CIstarted.vscode-extension.yml: type check, lint and unit tests,VSIX linux-x64, and the smoke test that starts the agent from../vsix/*.vsix.Publishis skipped, as it must be.publish=false(run 43355249352): the five targets (linux-x64,linux-arm64,darwin-arm64,darwin-x64,win32-x64) build, the smoke test passes,Publishis skipped. Nothing was published.Not verified
pushform of the filter (a merge tomain). It has the same patterns as thepull_requestform that the probe tested. This PR changesci.yml, so it runs the Python CI itself.mainwith a reviewer. Its edits are of the same two kinds as in the jobs that CI runs (working-directory,../vsix), and the new test checks them. A wrong../vsixwould point at no file, so the step would fail and nothing would be uploaded.Merge Danger
Door: two-way. A revert moves the folder back, and Git keeps the history of each file. No change of the wire, the agent, the pins (
agent-assets.json), stored data or the registry entries.Blast Radius: links and open work, not behaviour.
packages/pi-vscode/...stop working (GitHub does not redirect a folder). The README of 1.0.0 names the old folder as plain text, and no shipped link points into it.vscode/without.py,docs/, and one workflow file. No Python test reads them, and Ruff excludesdocs. No check is required onmain, so a skipped run blocks no merge. Drop the second commit to keep the old behaviour.srcandnode_modules; I moved the files one by one. Reinstall withnpm ciinvscode/.