All-platforms VSIX + the release flow consolidated in one script
A 7th package, lucisv-<v>-all.vsix, carries every platform's binary pair under bin/<platform>-<arch>/ and the extension picks the right one at runtime — flat bin/ (platform package) first, then the platform-arch subdirectory, then PATH. Target-less on purpose, so Alpine and anything else vsce refuses to name gets working static binaries. The release.yml inline prune step moves into tools/prune_release_assets.sh, which now requires all seven packages by name before anything is published. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
0a93143bfb
commit
cebb333bd7
8 files changed
+662
-107
No files matched your search
@@ -6,17 +6,17 @@ Automate the checks and the release. Every push to master runs the three
|
||||
checks CLAUDE.md requires (fmt, clippy, test) on Gitea Actions; every tag
|
||||
`vX.Y.Z` builds the full cross-platform artifact set (Apple Silicon +
|
||||
x86_64 macOS, static-musl x86-64/ARM64 and RHEL 8-compatible Linux,
|
||||
Windows — both binaries each — plus the six `.vsix` packages and
|
||||
Windows — both binaries each — plus the seven `.vsix` packages and
|
||||
`SHA256SUMS`) and publishes a Gitea release whose notes are the CHANGELOG
|
||||
section for that version. **Published assets are the six `.vsix` packages
|
||||
section for that version. **Published assets are the seven `.vsix` packages
|
||||
only** (since 2026-08-27, owner decision): the extension is the product a
|
||||
release delivers, each platform package is checked by name before
|
||||
publishing, and the loose binaries — still built and audited, since the
|
||||
packages embed them — stay unpublished; a standalone binary is
|
||||
release delivers, every package is checked by name before publishing, and
|
||||
the loose binaries — still built and audited, since the packages embed
|
||||
them — stay unpublished; a standalone binary is
|
||||
`cargo build --release` for whoever wants one
|
||||
(docs/features/editor-platform-vsix). The point is that a release is one
|
||||
`git tag` + `git push` and cannot ship without green checks, matching
|
||||
versions, written notes, and all six packages.
|
||||
versions, written notes, and all seven packages.
|
||||
|
||||
## Assumptions
|
||||
|
||||
@@ -46,10 +46,19 @@ versions, written notes, and all six packages.
|
||||
|
||||
- Consumes `tools/release.sh --cross` unchanged: artifact names
|
||||
(`lucisv[-server]-<version>-<triple>[.exe]`,
|
||||
`lucisv-<version>[-<vsce-target>].vsix`, `SHA256SUMS`) and the
|
||||
version-from-binary convention. The workflow's pruning step depends on
|
||||
those `.vsix` names exactly — it checks all six by name and filters
|
||||
`SHA256SUMS` down to `.vsix` lines before publishing.
|
||||
`lucisv-<version>[-<vsce-target>].vsix`, `lucisv-<version>-all.vsix`,
|
||||
`SHA256SUMS`) and the version-from-binary convention.
|
||||
`tools/prune_release_assets.sh` depends on those `.vsix` names exactly —
|
||||
it checks all **seven** by name and filters `SHA256SUMS` down to `.vsix`
|
||||
lines before publishing. A package added, renamed or dropped in
|
||||
`release.sh` must be reflected in that script's suffix list, or the
|
||||
release fails naming the file it could not find
|
||||
(docs/features/editor-platform-vsix).
|
||||
- The workflow's steps are one-liners calling `tools/` scripts, so every
|
||||
release step is runnable by hand on a developer machine and testable
|
||||
without pushing a tag. `prune_release_assets.sh` in particular is safe to
|
||||
re-run: a second run over an already-pruned directory finds the same seven
|
||||
packages and verifies them again.
|
||||
- Consumes `CHANGELOG.md`'s heading convention: `## <version> — <date>`;
|
||||
`tools/release_notes.sh` keys on the second word of `## ` headings.
|
||||
- `tools/publish_release.sh` expects the GitHub-compatible CI environment
|
||||
@@ -79,12 +88,17 @@ versions, written notes, and all six packages.
|
||||
remain audited, never executed (no such machine in the loop, and no
|
||||
container runtime on the runner).
|
||||
- [x] Publish `.vsix` packages only (2026-08-27): after the audit, the
|
||||
workflow asserts all six packages exist by name, filters `SHA256SUMS`
|
||||
workflow asserts all seven packages exist by name, filters `SHA256SUMS`
|
||||
down to them (keeping the audited hashes), re-verifies it, and deletes
|
||||
the loose binaries from `dist/` so `publish_release.sh` attaches only
|
||||
the packages. Prune logic tested locally against a real `--cross`
|
||||
`dist/`, with a negative control (one package removed → the step fails
|
||||
naming it).
|
||||
- [x] That logic lives in `tools/prune_release_assets.sh` (2026-08-27), not
|
||||
inline in the workflow: every release step is a one-line call into
|
||||
`tools/`, so it can be run and negative-controlled on a developer machine
|
||||
without pushing a tag. The seventh (all-platforms) package joined the
|
||||
must-exist list at the same time.
|
||||
- [ ] A second runner on a non-macOS host, if native-built (rather than
|
||||
cross-built) Linux artifacts are ever wanted.
|
||||
|
||||
@@ -127,6 +141,51 @@ versions, written notes, and all six packages.
|
||||
platform package and say binaries are build-your-own), and this README's
|
||||
Goal/Handshakes/Status.
|
||||
|
||||
- 2026-08-27 — dev (all-platforms package round). Two changes here, both
|
||||
in service of the seventh `.vsix` (`docs/features/editor-platform-vsix`):
|
||||
|
||||
- **The inline "Keep only the extension packages" step became
|
||||
`tools/prune_release_assets.sh <dist-dir> <version>`.** Same logic,
|
||||
same order — check every package by name, filter `SHA256SUMS` to its
|
||||
`.vsix` lines rather than recompute, delete everything else, re-verify
|
||||
with `shasum -c` — now in a script with a usage header like its
|
||||
siblings, so `release.yml` is back to one-line steps and the step is
|
||||
testable without a tag. It grew the `-all` suffix and argument
|
||||
validation (`[ $# -eq 2 ]`, missing dir, missing `SHA256SUMS` → exit 2,
|
||||
matching `publish_release.sh`'s convention); a missing package is still
|
||||
exit 1 naming the file.
|
||||
- **`release.yml`**: the step body is now
|
||||
`tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"`, and the
|
||||
header comment says seven packages. Nothing else in the workflow moved;
|
||||
the prune still sits between the artifact audit and the notes
|
||||
extraction, so the audit keeps gating on the loose binaries before they
|
||||
are deleted.
|
||||
|
||||
**Verified**, from the real repo path, against the real `dist/` from a
|
||||
`tools/release.sh --cross` run of 0.10.1 (copies only — `dist/` itself was
|
||||
left intact for the lead, since the script deletes files):
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `bash -n tools/prune_release_assets.sh` | clean |
|
||||
| positive: a 20-file `dist/` copy | exit 0, 8 survivors (7 `.vsix` + `SHA256SUMS`), `SHA256SUMS` down to 7 lines, all 7 verify `OK` |
|
||||
| negative: `lucisv-0.10.1-all.vsix` removed | exit 1, `missing lucisv-0.10.1-all.vsix`, **and nothing deleted** — all 19 remaining files still there, because the name check runs before any destructive step |
|
||||
| negative: wrong version argument (`0.10.0`) | exit 1, `missing lucisv-0.10.0.vsix`, nothing deleted |
|
||||
| negative: one argument / missing dir / dir without `SHA256SUMS` | exit 2 each, with the usage or the specific reason |
|
||||
| re-run over an already-pruned directory | exit 0, same 7 packages verify again — a CI job re-run is safe |
|
||||
| `python3 -c yaml.safe_load` on `release.yml` | parses; the six step names unchanged |
|
||||
|
||||
The negative controls were run on copies in the session scratchpad, but
|
||||
the script itself and every `release.sh` run were driven from
|
||||
`/Users/guoliangchen/repo/verilogrustformatter` — `vsce` collects zero
|
||||
files under the scratchpad's UUID path
|
||||
(`docs/features/editor-packaging` QA Finding 2).
|
||||
|
||||
Not verified: the workflow has not been run on the Gitea runner in this
|
||||
round — no tag was pushed (and pushing one is the lead's call). The step
|
||||
is a one-line invocation of a script proven by hand on the same machine
|
||||
the runner is, which is as close as this gets without cutting a release.
|
||||
|
||||
## QA log
|
||||
|
||||
_(no QA round — infrastructure, verified by the live v0.7.1 run; see work log)_
|
||||
|
||||
@@ -35,13 +35,15 @@ binary on `PATH`).
|
||||
embeds musl: a statically linked binary runs on any distro at any glibc
|
||||
vintage, which is exactly the property an extension installed by a stranger
|
||||
needs. There is no second `linux-x64` package to choose between.
|
||||
- **Alpine is an accepted gap.** `vsce` has separate `alpine-x64` /
|
||||
`alpine-arm64` targets and VS Code running on Alpine looks for *those*, not
|
||||
for `linux-x64` — so an Alpine user gets the universal package and needs
|
||||
`lucisv-server` on `PATH`, even though the musl binary we ship would have run
|
||||
there perfectly. Building two more packages with identical contents to satisfy
|
||||
a name is not worth the release-matrix growth today; if someone asks, it is a
|
||||
two-line change (`alpine-x64` ← the same musl triple).
|
||||
- **Alpine is an accepted gap in the *targeted* packages.** `vsce` has separate
|
||||
`alpine-x64` / `alpine-arm64` targets and VS Code running on Alpine looks for
|
||||
*those*, not for `linux-x64` — so an Alpine user gets no platform package.
|
||||
Building two more `--target`ed packages with identical contents to satisfy a
|
||||
name is not worth the release-matrix growth today; if someone asks, it is a
|
||||
two-line change (`alpine-x64` ← the same musl triple). Since 2026-08-27 the
|
||||
all-platforms package covers that user anyway (see below): it is target-less,
|
||||
so Alpine is offered it, and Node's `process.platform` there is plain
|
||||
`'linux'`, which is the directory our static-musl binaries sit in.
|
||||
- **VSIX extraction does not preserve the executable bit.** This is why
|
||||
`extension.js` chmods what it is about to spawn rather than trusting the
|
||||
package's file modes — the same thing rust-analyzer's extension does, for the
|
||||
@@ -67,16 +69,42 @@ feature changes is *which path* is spawned, never how.
|
||||
naming. The staging step reads those exact names; renaming an artifact breaks
|
||||
packaging loudly (a missing `cp` source), not silently.
|
||||
|
||||
**Promised to `extension.js`** — a platform package always contains **both**
|
||||
binaries under `bin/`, named plainly (`lucisv`, `lucisv-server`, with `.exe` on
|
||||
Windows) with no version or triple in the name; the universal package contains
|
||||
**no** `bin/` directory at all. `release.sh` asserts both with `unzip -Z1`
|
||||
after every package it builds, so "the extension found a stale binary from the
|
||||
previous target" cannot ship.
|
||||
**Promised to `extension.js`** — the `bin/` layout contract, three shapes and
|
||||
no fourth:
|
||||
|
||||
| package | `bin/` holds |
|
||||
|---|---|
|
||||
| universal `lucisv-<v>.vsix` | **nothing** — no `bin/` directory at all |
|
||||
| a platform `lucisv-<v>-<target>.vsix` | exactly `lucisv` and `lucisv-server` (`.exe` on Windows), flat |
|
||||
| the all-platforms `lucisv-<v>-all.vsix` | exactly ten files, `<platform>-<arch>/lucisv{,-server}` for the five platforms |
|
||||
|
||||
Names are always plain — no version, no triple. `release.sh` asserts all three
|
||||
shapes with `unzip -Z1` after every package it builds, so "the extension found a
|
||||
stale binary from the previous target" cannot ship. The all-platforms
|
||||
directory names are literally the `${process.platform}-${process.arch}` strings
|
||||
`extension.js` builds at runtime; that they also happen to equal vsce's target
|
||||
names is a convenience, not a dependency (nothing passes `--target` for that
|
||||
package).
|
||||
|
||||
**Promised to `tools/audit_artifacts.sh`** — every loose binary in `dist/` is
|
||||
still named `lucisv[-server]-<version>-<triple>`; the new `.vsix` names all end
|
||||
in `.vsix` and are skipped by the audit's existing case arm.
|
||||
still named `lucisv[-server]-<version>-<triple>`; the `.vsix` names all end in
|
||||
`.vsix` — `lucisv-<v>-all.vsix` included — and are skipped by the audit's
|
||||
existing case arm before its "unrecognized artifact name" arm can see them.
|
||||
|
||||
**Promised to `tools/prune_release_assets.sh`** — a `--cross` run produces
|
||||
exactly seven `.vsix` names, and those are the names the prune script checks
|
||||
one by one: `lucisv-<v>.vsix`, the five `lucisv-<v>-<vsce-target>.vsix`, and
|
||||
`lucisv-<v>-all.vsix`. Adding or renaming a package means editing that script's
|
||||
suffix list too, or the release fails naming the file it could not find.
|
||||
|
||||
**Requested of `editor-marketplace-page`** — that round rewrote
|
||||
`editors/vscode/README.md` end-to-end for a marketplace audience while this one
|
||||
was running, and any further rewrite of it must keep two things: its install
|
||||
table naming **seven** packages, not six (the five platform ones, `all`, and the
|
||||
universal fallback), and a bundled-binaries sentence covering both layouts —
|
||||
`bin/lucisv-server` in a platform package,
|
||||
`bin/<platform>-<arch>/lucisv-server` in the all-platforms one. Both were
|
||||
re-applied additively onto their rewrite; see the work log.
|
||||
|
||||
**Requested of other modules** — none.
|
||||
|
||||
@@ -93,9 +121,11 @@ first:
|
||||
language-scoped variants counts as "the user set it"; `defaultValue` and
|
||||
`defaultLanguageValue` do not, because those are contributed defaults, not
|
||||
user intent. Most specific wins, matching VS Code's own `get()` precedence.
|
||||
2. **The bundled binary**, `<extension>/bin/lucisv-server`(`.exe`), if the file
|
||||
exists. Its existence is the whole runtime test for "am I a platform package
|
||||
or the universal one" — no build-time flag, no manifest field.
|
||||
2. **The bundled binary**, whichever of two layouts this package uses —
|
||||
`<extension>/bin/lucisv-server`(`.exe`) first, then
|
||||
`<extension>/bin/<platform>-<arch>/lucisv-server`(`.exe`). A file existing is
|
||||
the whole runtime test for "which kind of package am I" — no build-time flag,
|
||||
no manifest field. Both misses mean no bundled binary.
|
||||
3. **The bare name `lucisv-server`**, looked up on `PATH`. What the universal
|
||||
package has always done, and what a `cargo build` + `PATH` install still
|
||||
does.
|
||||
@@ -105,6 +135,54 @@ the extension spawns it: it is shipped so a user who installed the extension
|
||||
already has the command-line tool, and a non-executable file would make that
|
||||
claim false.
|
||||
|
||||
## The all-platforms package
|
||||
|
||||
`lucisv-<version>-all.vsix` is one package carrying **all five platforms'
|
||||
binary pairs**, sorted into directories and chosen between at runtime:
|
||||
|
||||
```
|
||||
bin/
|
||||
darwin-arm64/lucisv, lucisv-server
|
||||
darwin-x64/lucisv, lucisv-server
|
||||
linux-x64/lucisv, lucisv-server (static musl)
|
||||
linux-arm64/lucisv, lucisv-server (static musl)
|
||||
win32-x64/lucisv.exe, lucisv-server.exe
|
||||
```
|
||||
|
||||
**The directory names are `${process.platform}-${process.arch}`**, not vsce
|
||||
target names — `extension.js` concatenates those two Node values and looks the
|
||||
result up. That the five strings happen to be spelled the same way vsce spells
|
||||
its targets is a coincidence worth having (one vocabulary in the release script
|
||||
instead of two) and nothing more: this package is built **without** `--target`,
|
||||
so vsce's names never enter the picture. Picking Node's own vocabulary is what
|
||||
makes the lookup a two-line function with no table in it, and what makes a
|
||||
platform we do not ship fail the obvious way — nothing on disk, fall through to
|
||||
`PATH`, exactly like the universal package.
|
||||
|
||||
Why it exists, given five perfectly good targeted packages:
|
||||
|
||||
- **Alpine, and anything else vsce names separately.** VS Code on Alpine asks
|
||||
the marketplace for `alpine-x64`, not `linux-x64`, so it is never offered our
|
||||
Linux package — but its `process.platform` is plain `'linux'` (Node does not
|
||||
distinguish libc), so it walks straight into `bin/linux-x64/`, and the binary
|
||||
there is statically linked musl, which is precisely what Alpine wants. The
|
||||
gap the targeted matrix leaves open is closed by not participating in the
|
||||
targeting at all.
|
||||
- **One file to mirror.** An internal file share, a locked-down machine, an
|
||||
offline lab: one `.vsix` that works on whatever the person on the other end
|
||||
turns out to be running beats a table of five and a question.
|
||||
- **Unknown or mixed fleets**, where whoever hands out the package does not know
|
||||
the architecture in advance.
|
||||
|
||||
The trade-off is size, and it is not small: every user downloads every
|
||||
platform's binaries — 13.0 MB against 3.0 MB for a platform package (and 0.75 MB
|
||||
for the universal one; measured on 0.10.1). That is why it is a seventh option
|
||||
rather than the only one; when the platform is known, the platform package is
|
||||
still the right answer.
|
||||
|
||||
**Built only with `--cross`**, because it needs all five pairs to exist. An
|
||||
ordinary `tools/release.sh` produces six of the seven names and no `-all` one.
|
||||
|
||||
## What gets built, and when
|
||||
|
||||
| | `release.sh` | `release.sh --cross` |
|
||||
@@ -112,12 +190,13 @@ claim false.
|
||||
| universal `lucisv-<v>.vsix` | yes | yes |
|
||||
| `darwin-arm64` (host) | yes | yes |
|
||||
| the other four | no | yes |
|
||||
| `lucisv-<v>-all.vsix` | no | yes |
|
||||
|
||||
Without `--cross` there are no cross binaries to embed, so only the host
|
||||
package can be built — building it anyway (rather than only the universal one)
|
||||
keeps the packaging path exercised on every ordinary release run, including the
|
||||
embedded-server smoke test. The CI release workflow runs `--cross`, so releases
|
||||
always carry all six.
|
||||
always carry all seven.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
@@ -137,13 +216,26 @@ always carry all six.
|
||||
- [x] `tools/audit_artifacts.sh`: `aarch64-unknown-linux-musl` arm.
|
||||
- [x] `editors/vscode/.gitignore`: `bin/`.
|
||||
- [x] Docs: this file, `tools/RELEASING.md`, `editors/vscode/README.md`.
|
||||
- [ ] **Not done, and not doable here:** none of the five packages has been
|
||||
- [x] **The all-platforms package** (2026-08-27): `extension.js`'s layered
|
||||
`bin/` lookup, `release.sh`'s `package_all_vsix` under `--cross`, the
|
||||
ten-entry content assertion, and a second embedded-server smoke test
|
||||
driven out of `bin/<host-target>/` inside that package.
|
||||
- [x] `tools/prune_release_assets.sh`: the seven-package check moved out of
|
||||
`release.yml`'s inline step into a tools/ script, checked by name.
|
||||
- [x] Docs for the all package: this file, `tools/RELEASING.md`, the top-level
|
||||
`README.md`, `docs/features/ci-release/README.md`, and
|
||||
`editors/vscode/README.md` (re-applied onto the concurrent
|
||||
`editor-marketplace-page` rewrite — see the work log).
|
||||
- [ ] **Not done, and not doable here:** none of the seven packages has been
|
||||
*installed into a real VS Code*. `require('vscode')` resolves only in the
|
||||
extension host, so the resolution order above is proven by reading it and
|
||||
by the packaging assertions, not by an editor picking the right package
|
||||
off a marketplace. The Linux and Windows packages have additionally never
|
||||
extension host, so the resolution order above is proven by reading it,
|
||||
by a stubbed-`context` harness over a fake directory tree, and by the
|
||||
packaging assertions — not by an editor picking the right package off a
|
||||
marketplace. The Linux and Windows packages have additionally never
|
||||
been *executed* anywhere — same standing limitation the loose binaries
|
||||
have had since `--cross` existed.
|
||||
have had since `--cross` existed. The Alpine claim in particular is
|
||||
reasoned from Node's documented `process.platform` values, not observed
|
||||
on an Alpine machine.
|
||||
- [ ] **Not done, deliberate:** `alpine-x64` / `alpine-arm64` packages (see
|
||||
Assumptions), and a `linux-x64` glibc variant.
|
||||
|
||||
@@ -294,6 +386,180 @@ them — but no longer attached; standalone binaries are build-your-own.
|
||||
Nothing in this feature's scripts changed: `release.sh` still produces the
|
||||
full `dist/`, and the pruning lives in `release.yml` after the audit.
|
||||
|
||||
### 2026-08-27 — dev agent (round 2): the all-platforms package
|
||||
|
||||
Owner request: a seventh package carrying every platform's binaries, chosen at
|
||||
runtime — plus a consolidation of the CI release flow. Four code files.
|
||||
|
||||
- **`extension.js`: `bundledBinary` became a two-candidate lookup**, flat first,
|
||||
`bin/<platform>-<arch>/` second, `undefined` if both miss. It is a `.find()`
|
||||
over two `asAbsolutePath` results and nothing else: no package-kind flag, no
|
||||
manifest field, no table of platform names. Everything downstream — the
|
||||
`.exe` suffix, the chmod-in-`try`/`catch`, the
|
||||
`userServerPath() || bundledServer || 'lucisv-server'` order, the two calls in
|
||||
`activate` — is untouched, so the fat layout is covered for the CLI and the
|
||||
server at once. The doc comment now describes both layouts and states the
|
||||
fall-through for a platform we ship nothing for (`win32-arm64`): nothing on
|
||||
disk in either layout, so `PATH`, exactly like the universal package.
|
||||
- **Node's vocabulary, not vsce's.** The directory names are
|
||||
`${process.platform}-${process.arch}` because that is the string the extension
|
||||
can build with no lookup table. That the five values happen to be spelled the
|
||||
way vsce spells its targets is why `release.sh` can reuse `vsce_target_for`
|
||||
for the staging directory names — a convenience recorded in Assumptions, not
|
||||
a dependency: the package is built with **no** `--target`, so vsce's naming
|
||||
never enters it. Verified in the artifact: `extension.vsixmanifest` in
|
||||
`lucisv-0.10.1-all.vsix` carries no `TargetPlatform` attribute at all, same as
|
||||
the universal package.
|
||||
- **`release.sh`: `package_all_vsix`**, called only under `--cross`, and given
|
||||
`$vsix_triples` — the same list the per-platform loop just used — rather than
|
||||
a second copy of the five triples. It stages each pair into
|
||||
`bin/<vsce-target>/`, `chmod +x`es them, packages with no `--target`, removes
|
||||
the staging dir, and asserts the contents. It builds its expected-entry list
|
||||
in the same loop that stages, so the assertion cannot drift from what was
|
||||
staged.
|
||||
- **`expect_vsix_bins` needed no change, which I checked rather than assumed.**
|
||||
Info-ZIP's `*` matches `/` (unlike a shell glob), so `extension/bin/*` lists
|
||||
nested paths — confirmed on a hand-built zip with both a flat and a nested
|
||||
entry before touching `release.sh`. The one wrinkle that could have bitten:
|
||||
the same test showed Info-ZIP *also* returns directory entries
|
||||
(`extension/bin/`, `extension/bin/darwin-arm64/`), which would have broken an
|
||||
exact-set comparison — but vsce writes **no** directory entries at all
|
||||
(`unzip -Z1 … | grep -c '/$'` = 0 on a real package), so the ten filenames
|
||||
come back and nothing else. Both facts are now in the function's comment.
|
||||
- **The embedded smoke test was made a function and called twice**, once per
|
||||
layout: the host platform package out of `extension/bin/`, the all-platforms
|
||||
package out of `extension/bin/darwin-arm64/`. That is the difference that
|
||||
matters — a fat package whose binaries were staged one directory too deep
|
||||
would package, assert fine, and then fail to spawn for every user; driving a
|
||||
real LSP session out of the nested path is what rules that out.
|
||||
- **`tools/prune_release_assets.sh`** is new and is the CI-flow half of the
|
||||
round; it is logged in full in `docs/features/ci-release/README.md`. The
|
||||
handshake it creates with this feature — the seven exact package names — is
|
||||
now in Handshakes above.
|
||||
- Did not bump any version, did not `git commit`/`git push`, did not touch
|
||||
`CHANGELOG.md` or `crates/`. `TODO.md` was read again; §6's editor-packaging
|
||||
and release-prep items are still `[x]` and still say nothing about the package
|
||||
matrix, so nothing was checked off.
|
||||
|
||||
**Validation, all from the real repo path (never the scratchpad — `vsce`
|
||||
collects zero files there, `docs/features/editor-packaging` QA Finding 2):**
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `bash -n` on `release.sh`, `audit_artifacts.sh`, `prune_release_assets.sh` | clean |
|
||||
| `node --check editors/vscode/extension.js` | clean |
|
||||
| `cargo fmt --check` | clean |
|
||||
| `cargo clippy --all-targets` | clean, 0 warnings |
|
||||
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar**, 5 ignored, 0 failed |
|
||||
| `tools/release.sh --cross` | exit 0 — 12 loose binaries + **7** `.vsix` + `SHA256SUMS`, every `bin/ contents ok` |
|
||||
| `tools/release.sh -o target/relcheck-dist` (no `--cross`) | exit 0 — host pair, universal `.vsix`, `darwin-arm64` `.vsix`, `SHA256SUMS`, **no `-all.vsix`**, one embedded smoke test rather than two |
|
||||
| `tools/audit_artifacts.sh dist` | **12 binaries audited, exit 0** — the 7 `.vsix`, `-all` included, all skipped by the `*.vsix` arm before the "unrecognized artifact name" arm sees them |
|
||||
| `shasum -a 256 -c SHA256SUMS` in `dist/` | 19/19 OK |
|
||||
| embedded smoke, host platform package (`extension/bin/`) | `smoke: OK`, 10 messages |
|
||||
| embedded smoke, all package (`extension/bin/darwin-arm64/`) | `smoke: OK`, 10 messages |
|
||||
|
||||
**`lucisv-0.10.1-all.vsix` — what is actually in it**, checked rather than
|
||||
assumed:
|
||||
|
||||
- **Exactly ten `extension/bin/` entries**, no more: `darwin-arm64/`,
|
||||
`darwin-x64/`, `linux-x64/`, `linux-arm64/` each with `lucisv` and
|
||||
`lucisv-server`, `win32-x64/` with the two `.exe`s. Mode `-rwxr-xr-x` inside
|
||||
the zip for all ten.
|
||||
- **All ten are byte-identical to the audited loose binaries.** Compared by
|
||||
SHA-256 of `unzip -p` output against `dist/lucisv[-server]-0.10.1-<triple>`
|
||||
for all five triples, both binaries each — ten of ten match. So the audit that
|
||||
gates the release covers what is inside this package too, transitively, the
|
||||
same way it does for the platform packages.
|
||||
- **No `TargetPlatform`** in its `extension.vsixmanifest` (checked), which is
|
||||
what makes VS Code offer it to any machine — Alpine included.
|
||||
- Size 13,025,877 bytes against 2,987,672 for `darwin-arm64` and 754,239 for the
|
||||
universal package. The "13.0 MB vs 3.0 MB" in the section above is that
|
||||
measurement, not an estimate.
|
||||
- The universal package still carries **no** `bin/` — `unzip -Z1
|
||||
lucisv-0.10.1.vsix 'extension/bin/*'` answers "filename not matched". It is
|
||||
asserted at build time by `expect_vsix_bins` with an empty expected set, and
|
||||
it is packaged before anything is staged, so nothing built later can reach
|
||||
back into an already-written zip.
|
||||
|
||||
**The extension's layered lookup was exercised, not only read.** The extension
|
||||
host is still the only place `require('vscode')` resolves, so I wrote a harness
|
||||
that stubs `vscode` and `vscode-languageclient/node` through
|
||||
`Module._load`, hands `activate()` a `context` whose `asAbsolutePath` points at
|
||||
a fake extension directory, and reads back the `command` the `LanguageClient`
|
||||
was constructed with. Thirteen assertions, all passing:
|
||||
|
||||
| Fake package | Resolved to |
|
||||
|---|---|
|
||||
| no `bin/` at all | `lucisv-server` (PATH) |
|
||||
| flat `bin/` | `bin/lucisv-server` |
|
||||
| `bin/darwin-arm64/` | `bin/darwin-arm64/lucisv-server` |
|
||||
| both layouts present | the **flat** one — most specific first |
|
||||
| only a foreign platform's directory | `lucisv-server` (PATH) |
|
||||
| `bin/darwin-arm64/` + a user `serverPath` | the user's path |
|
||||
|
||||
plus: both binaries come out `0755` in the flat and the nested layouts **and**
|
||||
when a user setting won the spawn (the lead's unconditional-chmod fix from round
|
||||
1 still holds in the nested layout), and a directory for another platform is
|
||||
left at `0644` — we do not chmod what we did not choose. This proves the file
|
||||
resolution and the chmod, and nothing about how VS Code behaves around it.
|
||||
|
||||
**The `EXIT` trap was negative-controlled against the new nested staging**, not
|
||||
assumed to still work: a fake `npx` on `PATH` proxying to the real one except
|
||||
when an argument ends in `-all.vsix`, where it exits 23. `tools/release.sh -o
|
||||
target/relfail --cross` built the universal package and all five platform
|
||||
packages (each asserted `bin/ contents ok`), then died on the all package with
|
||||
exit 23 — and `editors/vscode/bin/` was gone afterwards, five subdirectories and
|
||||
ten binaries included, with `git status --short editors/vscode` showing only
|
||||
this round's edits. A failure in the fat-package path cannot leave 13 MB of
|
||||
binaries in the working tree.
|
||||
|
||||
**Not verified, honestly:**
|
||||
|
||||
- **No package was installed into a real VS Code**, so which package the
|
||||
marketplace/`code --install-extension` hands a given machine, and whether the
|
||||
extension host's `context.asAbsolutePath` behaves as the harness stubs it, are
|
||||
still unproven here. Unchanged limitation since 2026-08-19.
|
||||
- **The Alpine claim is reasoning, not an observation.** It rests on two facts I
|
||||
did not test on an Alpine box: Node reports `process.platform === 'linux'`
|
||||
there (it does not distinguish libc), and VS Code on Alpine requests
|
||||
`alpine-x64`/`alpine-arm64` from a marketplace. Both are documented behaviour,
|
||||
and the second one is moot for a package with no `TargetPlatform` — but nobody
|
||||
here has watched an Alpine VS Code start our server.
|
||||
- **The Linux and Windows binaries inside the fat package have never been
|
||||
executed**, same as the loose ones and the platform packages. Only the
|
||||
`darwin-arm64` directory's server has been spawned.
|
||||
- **`x86_64-unknown-linux-gnu` is still in no package**, fat one included: the
|
||||
fat package carries the same five platforms the targeted packages do.
|
||||
- **A concurrent round was editing the tree.** `editors/vscode/package.json` and
|
||||
`editors/vscode/images/` were being changed by another agent (marketplace
|
||||
metadata, `docs/features/editor-marketplace-page/`) while these runs happened;
|
||||
one intermediate run of mine failed on *their* half-landed `"icon"` field
|
||||
before `images/icon.png` existed, which is a race between two agents and not a
|
||||
finding about either change. The numbers quoted above are from a final
|
||||
`--cross` run made after that settled, so they describe the tree as it stands.
|
||||
I did not touch either of their files.
|
||||
|
||||
**`editors/vscode/README.md` was written twice, and the second version is the
|
||||
one that survives — lead, this file has two rounds in it.** I first updated the
|
||||
old developer-facing README as this round asked: §0 gained the all-platforms
|
||||
package, the bundled-binary sentence covered both layouts, the
|
||||
`lucisv.serverPath` settings row and the Troubleshooting entry stopped naming
|
||||
only the universal package. The `editor-marketplace-page` round then **deleted
|
||||
that file** mid-round and replaced it, 70 seconds later, with a complete
|
||||
marketplace-audience rewrite — taking those edits with it. I did not restore my
|
||||
version over theirs; theirs is the better file for its audience and clobbering a
|
||||
finished rewrite to recover four paragraphs would be the wrong trade. Instead I
|
||||
re-applied the *requirement* onto their structure, additively and in their
|
||||
voice: an `all` row in their install table, a paragraph on when to pick it (with
|
||||
the Alpine reason and the 13 MB-vs-3 MB cost) and where the binaries sit in each
|
||||
layout, and one clause in their "Release 0.10.1 highlights" list. Their
|
||||
`lucisv.serverPath` row already reads "bundled" and their Troubleshooting entry
|
||||
already avoids naming the universal package, so those two needed nothing. The
|
||||
standing requirement is in Handshakes above for whoever edits that file next.
|
||||
|
||||
If the lead lands only one of the two rounds, note the dependency: their README
|
||||
now names a package that only *this* round's `release.sh` builds.
|
||||
|
||||
## QA log
|
||||
|
||||
### 2026-08-27 — QA agent
|
||||
@@ -369,6 +635,88 @@ const serverPath = userServerPath() || bundledBinary(context, 'lucisv-server') |
|
||||
|
||||
**Verdict: ship.**
|
||||
|
||||
### 2026-08-27 — QA agent (round 2): the all-platforms package + CI consolidation
|
||||
|
||||
Scope: the dev's round-2 work log claims only — the seventh `lucisv-<v>-all.vsix`
|
||||
package, `extension.js`'s layered `bundledBinary` lookup, `release.sh`'s
|
||||
`package_all_vsix`/`expect_vsix_bins` under `--cross`, `tools/prune_release_assets.sh`,
|
||||
and the `release.yml` step that calls it. Did not re-review the earlier
|
||||
six-package round (its own QA log entry above stands) or the concurrent
|
||||
`editor-marketplace-page` round, except where its output could break packaging.
|
||||
Ran everything from the real repo path (`/Users/guoliangchen/repo/verilogrustformatter`),
|
||||
never the scratchpad. No source file was edited; `dist/` was rebuilt by my own
|
||||
`--cross` run and left intact afterward (verified: 20 files, `shasum -c` 19/19
|
||||
OK, as the last action before writing this entry).
|
||||
|
||||
**Gates — all green.**
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `bash -n tools/release.sh tools/audit_artifacts.sh tools/prune_release_assets.sh` | clean |
|
||||
| `node --check editors/vscode/extension.js` | clean |
|
||||
| `python3 -c "import yaml; yaml.safe_load(...)"` on `.gitea/workflows/release.yml` | valid |
|
||||
| `cargo fmt --check` | clean |
|
||||
| `cargo clippy --all-targets` | clean, 0 warnings |
|
||||
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar**, 5 ignored, 0 failed — exact match to the dev's numbers |
|
||||
|
||||
**`tools/release.sh --cross`, re-run independently on this machine (lucisv 0.10.1) — exit 0, 12 loose binaries + 7 `.vsix` + `SHA256SUMS` (20 files, 19 checksummed entries), matching the dev's claimed set.**
|
||||
|
||||
- `unzip -Z1 lucisv-0.10.1-all.vsix 'extension/bin/*'`: exactly 10 entries — `darwin-arm64/`, `darwin-x64/`, `linux-x64/`, `linux-arm64/` each with `lucisv`+`lucisv-server`, `win32-x64/` with `lucisv.exe`+`lucisv-server.exe` only (`.exe` confirmed absent from the other four directories). `unzip -Z1 ... | grep -c '/$'` = 0, confirming vsce writes no directory entries here either.
|
||||
- Universal package still has no `bin/`: `unzip -Z1 lucisv-0.10.1.vsix 'extension/bin/*'` → "filename not matched". The five platform packages are unchanged — flat two entries each (`extension/bin/lucisv[-server]`, `.exe` only for `win32-x64`).
|
||||
- `extension.vsixmanifest`: no `TargetPlatform` attribute in `lucisv-0.10.1-all.vsix` or the universal package; `TargetPlatform="darwin-arm64"`/`"darwin-x64"`/`"linux-x64"`/`"linux-arm64"`/`"win32-x64"` present and correct in the respective five platform packages (checked all five).
|
||||
- Both embedded smoke tests ran during the build: `smoke: OK`, 10 messages, for the host platform package (`extension/bin/`) and for the all package (`extension/bin/darwin-arm64/`).
|
||||
- `tools/audit_artifacts.sh dist`: 12 binaries audited, exit 0.
|
||||
- `shasum -a 256 -c SHA256SUMS` in `dist/`: 19/19 OK.
|
||||
- `dist/` left intact at the end (re-verified after all later runs used throwaway `-o` dirs or copies).
|
||||
|
||||
**Byte-identity spot-check, `all` package vs. loose `dist/` binaries (SHA-256, both directions of the pair, two platforms as asked):**
|
||||
|
||||
- `darwin-arm64`: `unzip -p lucisv-0.10.1-all.vsix extension/bin/darwin-arm64/lucisv` and `extension/bin/darwin-arm64/lucisv-server` both hash identically to `dist/lucisv-0.10.1-aarch64-apple-darwin` and `dist/lucisv-server-0.10.1-aarch64-apple-darwin` (`51ca1cf2...` and `edaff0df...` respectively).
|
||||
- `win32-x64`: `unzip -p lucisv-0.10.1-all.vsix extension/bin/win32-x64/lucisv.exe` and `.../lucisv-server.exe` both hash identically to `dist/lucisv-0.10.1-x86_64-pc-windows-gnu.exe` and `dist/lucisv-server-0.10.1-x86_64-pc-windows-gnu.exe` (`f6c2dbfc...` and `6628bfeb...` respectively).
|
||||
|
||||
Four of four match. Confirms the audit that gates the release covers the fat package's contents transitively, as claimed.
|
||||
|
||||
**`tools/prune_release_assets.sh`, on copies of `dist/`, never the original — independent runs, not the dev's.**
|
||||
|
||||
- **Positive**: copied the full 20-file `dist/` to a scratch dir, ran `prune_release_assets.sh <dir> 0.10.1` — exit 0, 8 survivors (the 7 `.vsix` + `SHA256SUMS`), `shasum -c` re-verify inside the script passed for all 7.
|
||||
- **Negative, missing `-all.vsix`**: removed it from a fresh copy before running — `missing lucisv-0.10.1-all.vsix` on stderr, exit 1, **file count unchanged (19 before and after)** — the name-check loop runs entirely before any deletion, so a missing package deletes nothing rather than partially pruning.
|
||||
- **Negative, wrong version arg**: ran with `9.9.9` against the real 0.10.1 tree — `missing lucisv-9.9.9.vsix`, exit 1, file count unchanged (20 before and after, since this copy still had its original `dist/` contents).
|
||||
- **Negative, missing directory**: ran against a nonexistent path — `no dist directory at ...`, exit 2, as coded.
|
||||
|
||||
**`extension.js`'s layered `bundledBinary` lookup — exercised with my own harness, not the dev's** (none was left in the tree to re-run; confirmed via `find` and `git status --short`, which shows no untracked harness file). Wrote an independent Node script (`/tmp/qa_ext_harness/harness.js`, discarded after use) that stubs `vscode` and `vscode-languageclient/node` via `Module._load`, builds fake extension directories with `fs`, and calls `activate()` against a fake `context.asAbsolutePath`, reading back `serverOptions.command` from the `LanguageClient` constructor call and the on-disk file modes afterward. Eight cases, all matching the documented behaviour:
|
||||
|
||||
| Case | Result |
|
||||
|---|---|
|
||||
| no `bin/` at all | `lucisv-server` (PATH) |
|
||||
| flat `bin/` only | flat path, chmod 755 |
|
||||
| nested `bin/<own-platform>/` only | nested path, chmod 755 |
|
||||
| both layouts present | **flat** wins (most specific first); flat chmod'ed to 755, **nested left at 644 — not touched** |
|
||||
| only a foreign platform's directory present | falls through to `lucisv-server` (PATH) |
|
||||
| nested layout + user `serverPath` set (`globalValue`) | **user's path wins the spawn**, but the nested bundled server is **still chmod'ed to 755** — confirms the lead's round-1 fix (unconditional `bundledServer` resolution ahead of the `\|\|` chain) survived the new two-candidate lookup |
|
||||
| flat layout + user `serverPath` set to the literal string `"lucisv-server"` | counts as "set" (per `inspect()`, not `get()`); command resolves to that string, flat binary still chmod'ed |
|
||||
| nested layout + user `serverPath` set to a whitespace-only string | counts as unset; falls through to the nested bundled path |
|
||||
|
||||
This independently confirms: flat-over-nested precedence, foreign-platform fall-through, the "only chmod what was chosen" behavior the dev's own harness claimed, and — the specific thing this round's instructions flagged as a prior finding to re-check — that both bundled binaries still get chmod'ed even when a user-set `serverPath` wins the spawn, in the nested layout as well as the flat one.
|
||||
|
||||
**`EXIT` trap, negative-controlled a third way** (independently of both the round-1 QA control and the dev's round-2 control): a fake `npx` on `PATH` that fails only when an argument ends in `-all.vsix` (exit 42), proxying to the real `npx` otherwise. `tools/release.sh -o /tmp/qa_relfail --cross` built the universal package and all five platform packages (each asserted `bin/ contents ok`) before dying on the all-platforms step; `editors/vscode/bin/` (which by then holds five subdirectories, ten binaries) was gone immediately after, and `git status --short editors/vscode` showed only this round's four tracked-file edits — no residue.
|
||||
|
||||
**Docs vs. reality.**
|
||||
|
||||
- `tools/RELEASING.md`'s "twelve binaries and seven `.vsix` files" claim, the `.vsix`-in-detail section's staging/assertion description, and the publishing section's "seven `.vsix` packages plus `SHA256SUMS`" all match the actual `--cross` output above.
|
||||
- `docs/features/ci-release/README.md`'s seven-package claims, its `prune_release_assets.sh` validation table (20-file copy → 8 survivors, missing `-all.vsix` → exit 1 deletes nothing), and its description of the `release.yml` step order all match what I independently reproduced above.
|
||||
- `.gitea/workflows/release.yml` calls the script as `tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"`, between the artifact audit and the release-notes extraction — confirmed by reading the file; `RELEASE_NOTES.md` is written into `dist/` *after* pruning, so the prune step (which deletes everything not `*.vsix`/`SHA256SUMS`) cannot touch it.
|
||||
- Top-level `README.md` (lines 623, 710) states the `all` package and the seven-package release claim; both match reality.
|
||||
- `tools/audit_artifacts.sh`'s `*.vsix | SHA256SUMS | RELEASE_NOTES.md` skip arm (line 39) still covers `-all.vsix` before the "unrecognized artifact name" arm — confirmed by the clean 12-binary audit above.
|
||||
- `editors/vscode/.vscodeignore` still does not exclude `bin/`; `editors/vscode/.gitignore` still ignores it with a comment pointing at this feature.
|
||||
|
||||
**Finding 1 (confirmed, moderate, not blocking build/packaging) — `editors/vscode/README.md`'s install table names six packages, not the seven this feature's own Handshakes section promises.**
|
||||
|
||||
This feature's Handshakes section (`docs/features/editor-platform-vsix/README.md:103-104`, written by the dev in this same round) states as a requirement of `editor-marketplace-page`'s rewrite: "its install table naming **seven** packages, not six (the five platform ones, `all`, and the universal fallback)". The dev's own round-2 work log (lines 552-558) claims to have "re-applied the *requirement* onto their structure" and that the marketplace README's `lucisv.serverPath` row and Troubleshooting entry "already" satisfied the requirement, needing no change — but does not claim to have added the universal package to the install table, and it was never there. Checked directly: `editors/vscode/README.md:36-43`'s install table has exactly six rows (`darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`, `all`); `grep -n "universal\|lucisv-<version>\.vsix\|PATH\\b" editors/vscode/README.md` finds no mention of the universal/platform-independent package anywhere in the file — not in the install table, not in Troubleshooting, not elsewhere. A reader of this developer-facing README has no way to learn the plain `lucisv-<version>.vsix` (PATH-based, smallest download, the fallback for a platform none of the six named packages cover) exists at all. This does not break packaging or any gate — `vsce package` for the universal target still runs and is still asserted `bin/`-free by `release.sh` — it is purely a documentation gap against the feature's own stated (and, per the work log, believed-satisfied) handshake. Filed rather than fixed, per QA's scope (verify, don't redesign); the fix is one added table row plus a clause, in `editor-marketplace-page`'s voice, matching the pattern already used for the `all` row.
|
||||
|
||||
**No other findings.** Every claim in the dev's round-2 work log — the seventh package's build and contents, the layered lookup and its chmod behavior (including the specific "still chmod'ed when a user setting wins" fix-survival check this round asked for), `expect_vsix_bins`'s handling of nested paths, the `EXIT` trap under the new nested staging, `prune_release_assets.sh`'s positive and negative behavior, and the docs — was independently reproduced with fresh runs, fresh negative controls, and a fresh harness rather than re-trusting the dev's own. The concurrent `editor-marketplace-page` round's `package.json` changes (icon, keywords, homepage) do not break packaging: the full `--cross` run above packaged all seven `.vsix` cleanly against the current tree, icon file present and valid.
|
||||
|
||||
**Verdict: ship, with Finding 1 (moderate, doc-only) for the lead to route — either fix `editors/vscode/README.md`'s install table now or hand it back to `editor-marketplace-page`.**
|
||||
|
||||
## Review
|
||||
|
||||
**2026-08-27 — lead. Verdict: accepted; commits with this round.**
|
||||
@@ -407,3 +755,31 @@ accepted:
|
||||
No version bump here: the packages are cut from whatever version the tree is
|
||||
at, and the next tagged release ships all six automatically via the unchanged
|
||||
`release.yml` → `release.sh --cross` path.
|
||||
|
||||
**2026-08-27 — lead review of round 2 (the all-platforms package + CI
|
||||
consolidation). Verdict: accepted; commits with this round; ships as 0.10.2.**
|
||||
|
||||
Reviewed the diff, the dev's work log, and QA's independent reproduction
|
||||
(its own Node harness for the layered lookup, its own `EXIT`-trap stub, a
|
||||
fresh `--cross` run, byte-identity spot-checks). Points accepted:
|
||||
|
||||
1. **The layered `bundledBinary` lookup is the smallest correct shape**: the
|
||||
file's existence remains the only runtime test for "which package am I",
|
||||
the flat layout wins so a platform package can never accidentally pick a
|
||||
foreign binary out of a fat layout, and the prior round's
|
||||
chmod-both-binaries fix survives (QA proved it with a user-set
|
||||
`serverPath` against a nested layout).
|
||||
2. **The `-all` package is target-less on purpose** — no `TargetPlatform` in
|
||||
its manifest, asserted by `release.sh` — which is precisely what makes it
|
||||
the honest answer for Alpine and any platform vsce refuses to name.
|
||||
3. **`tools/prune_release_assets.sh` consolidates the release contract in
|
||||
one place**: seven names checked, audited hashes preserved by filtering
|
||||
rather than recomputing, deletion only after every check passes (QA's
|
||||
negative controls confirm a failure deletes nothing).
|
||||
4. **QA's Finding 1** (the marketplace rewrite dropped the universal package
|
||||
from the install table, breaking this round's requested Handshake) was
|
||||
fixed by the lead in the marketplace round's review — a seventh row names
|
||||
the universal fallback.
|
||||
|
||||
Accepted limitations, unchanged from round 1: no real-editor run, four
|
||||
non-host platforms' binaries never executed, Alpine reasoned not observed.
|
||||
Reference in new issue
Block a user