The CLI's last feature work was 12 July. green-tea has shipped 26.8 and 26.9 since,
and matcha did not follow — in one case in a way that reached every user.
The defect this started from
Every runtime overlay pinned @green-tea/core at ^26.7.0-beta.0. Core is
prerelease-only, and npm's semver excludes a prerelease from any range whose
comparators carry a different major.minor.patch — so that caret was not a loose
pin, it was a pin to the oldest matching prerelease that nothing could move off. Every project matcha new produced since July installed 26.7.0-beta.0 and could
not upgrade: no logger, no request budget, no resumable @Sse id, none of the
crashes 26.9 fixed. The pin is exact now, lives in one CORE_VERSION constant, and
the scaffold is on 26.9.0-beta.1.
Nothing caught it because CI never ran JavaScript. cargo test proves the CLI
writes the files it means to write; it cannot prove those files describe a project
the current core will run. scripts/starter-smoke.sh closes that: scaffold,
install, type-check, boot, curl / and the /zen stream, introspect, add every
capability and type-check them together — per runtime, on a CI matrix of all four,
plus a weekly job that fails when the pin falls behind the beta dist-tag.
That smoke immediately found three more defects that unit tests could not see:
The bun overlay carried no Bun types, so tsc --noEmit — and therefore matcha create --check — failed on every bun project the CLI has ever
scaffolded.
MultipartBody in a decorated signature is TS1272 under isolatedModules with emitDecoratorMetadata, so the generated handler compiled on node and bun and
failed on Deno.
add buffer returned Buffer.from('hello') and never worked: TransformerFn
returns body: string and the default transformer is JSON.stringify, so the
route answered {"type":"Buffer","data":[104,…]}.
New commands
matcha graph
Mermaid / DOT / JSON, --out
matcha explain <pattern>
one route's chain, in execution order, with needs/provides
the misconfigurations that fail confusingly rather than loudly
The framework's claim is that an API is a graph rather than a middleware chain, and toMermaid/toDOT/graph/explain had been exported all along while the CLI could
draw none of it. All three introspection commands reach the app through app.ready(),
which resolves the graph and is documented as deliberately not running provider
factories — asking for a diagram must not open your database connections. That needed
an app importable without binding a port, so the scaffold now composes its graph in src/app.ts and leaves src/main.ts holding only the serve call; create module
prefers src/app.ts and falls back to src/main.ts for projects from before the split.
doctor reads the installed core version from the package's own manifest, never from
core's exported VERSION — that constant is stale in the published artifact
(green-tea#92) and would give
the wrong answer to the one check that exists to catch a wrong version.
add, and a Cloudflare Workers target
add ws and add upload are new, both naming the optional peer dependency they need
on success. add sse now tags each event with sse(data, { id }) and reads last-event-id to resume — verified end to end, a reconnect at id 41 resumes at 42. --controller <path> replaces refusing outright when a project has more than one.
matcha new --runtime edge scaffolds a Worker with nodejs_compat and wrangler's [assets] serving ./public, so / is the same page as on the other three runtimes
and /zen the same stream from the worker; matcha run is wrangler dev, real
workerd. Core is installed from JSR on that runtime alone, because the npm ESM
build cannot load on workerd at all — tsup's createRequire(import.meta.url) banner
runs at module scope and import.meta.url is undefined there
(green-tea#93, filed from
this work). The scaffolded .npmrc says so; it and the alias can both go once that
is fixed.
Release, installer, and the paperwork
Cargo.toml has declared license = "MIT" since the first release and the published
crate carried no license text — anyone vendoring the source had the claim without the
grant. LICENSE, DCO (which the README already required a sign-off against) and CONTRIBUTING.md are added, plus a CHANGELOG.md reconstructing 26.7.0 and
26.8.0-beta.0 from their tags.
Linux arm64 now has a binary. The installer used to refuse it, so Graviton, a Pi,
an ARM CI runner and Docker on Apple Silicon all needed a Rust toolchain to install a
CLI whose point is not needing one. rustup target add could never have fixed it — tree-sitter and tree-sitter-typescript compile C through the cc crate and Ubuntu
ships no aarch64 musl cross compiler — so both Linux targets now build through zig,
one toolchain instead of a working one plus a second.
install.sh resolves latest through the /releases/latest redirect rather than the
release API, which is rate-limited to 60/hour per IP and, when throttled, produced
"could not resolve latest release tag" with no hint of the cause. Releases with a
hyphen are flagged as prereleases: nothing set the flag, so every beta answered /releases/latest — harmless while every release is a beta, wrong the moment a stable
one exists. And test_install.sh, which has existed since the installer landed and
which no workflow ever ran, now runs on Linux and macOS with shellcheck alongside.
Each release job runs the artifact it just built wherever the runner can execute it,
and verify-linux-arm64 installs the published arm64 binary through install.sh on a
pinned arm64 Linux runner — the fleet is x86_64 on Linux and arm64 on macOS
(verified on the hosts), so that job is the only place the arm64 artifact starts
before a user starts it.
Verification
cargo fmt --check, cargo clippy --all-targets -- -D warnings, 92 tests, test_install.sh, shellcheck, and scripts/starter-smoke.sh for node, deno, bun and
edge — all green. The runtime behaviour was exercised by hand as well as by the smoke:
SSE resume, multipart upload, the WebSocket echo, the CSV transformer, wrangler dev
in real workerd, and the Intel macOS binary running on the arm64 runner through Rosetta.
Not in this PR
create plugin — deliberately left out, being worked on separately. Windows is
unblocked on the build side (zig produces a verified PE32+) but blocked on behaviour: npm, npx and bunx are .cmd shims and Command::new does not consult PATHEXT,
so run, graph, explain, openapi and create --check would all fail on the
default runtime. That needs routing through cmd /C plus an install.ps1.
The CLI's last feature work was 12 July. green-tea has shipped 26.8 and 26.9 since,
and matcha did not follow — in one case in a way that reached every user.
## The defect this started from
Every runtime overlay pinned `@green-tea/core` at `^26.7.0-beta.0`. Core is
prerelease-only, and npm's semver excludes a prerelease from any range whose
comparators carry a different `major.minor.patch` — so that caret was not a loose
pin, it was a pin to the oldest matching prerelease that nothing could move off.
**Every project `matcha new` produced since July installed 26.7.0-beta.0 and could
not upgrade**: no logger, no request budget, no resumable `@Sse` id, none of the
crashes 26.9 fixed. The pin is exact now, lives in one `CORE_VERSION` constant, and
the scaffold is on 26.9.0-beta.1.
Nothing caught it because **CI never ran JavaScript**. `cargo test` proves the CLI
writes the files it means to write; it cannot prove those files describe a project
the current core will run. `scripts/starter-smoke.sh` closes that: scaffold,
install, type-check, boot, `curl /` and the `/zen` stream, introspect, add every
capability and type-check them together — per runtime, on a CI matrix of all four,
plus a weekly job that fails when the pin falls behind the `beta` dist-tag.
That smoke immediately found three more defects that unit tests could not see:
- The bun overlay carried no Bun types, so `tsc --noEmit` — and therefore
`matcha create --check` — failed on **every bun project the CLI has ever
scaffolded**.
- `MultipartBody` in a decorated signature is TS1272 under `isolatedModules` with
`emitDecoratorMetadata`, so the generated handler compiled on node and bun and
failed on Deno.
- `add buffer` returned `Buffer.from('hello')` and never worked: `TransformerFn`
returns `body: string` and the default transformer is `JSON.stringify`, so the
route answered `{"type":"Buffer","data":[104,…]}`.
## New commands
| | |
|---|---|
| `matcha graph` | Mermaid / DOT / JSON, `--out` |
| `matcha explain <pattern>` | one route's chain, in execution order, with needs/provides |
| `matcha openapi` | structural OpenAPI 3.1, `--title` / `--api-version` / `--out` |
| `matcha doctor` | the misconfigurations that fail confusingly rather than loudly |
The framework's claim is that an API is a graph rather than a middleware chain, and
`toMermaid`/`toDOT`/`graph`/`explain` had been exported all along while the CLI could
draw none of it. All three introspection commands reach the app through `app.ready()`,
which resolves the graph and is documented as deliberately *not* running provider
factories — asking for a diagram must not open your database connections. That needed
an app importable without binding a port, so the scaffold now composes its graph in
`src/app.ts` and leaves `src/main.ts` holding only the serve call; `create module`
prefers `src/app.ts` and falls back to `src/main.ts` for projects from before the split.
`doctor` reads the installed core version from the package's own manifest, never from
core's exported `VERSION` — that constant is stale in the published artifact
([green-tea#92](https://git.svc.zoit.services/Green-Tea/core/issues/92)) and would give
the wrong answer to the one check that exists to catch a wrong version.
## `add`, and a Cloudflare Workers target
`add ws` and `add upload` are new, both naming the optional peer dependency they need
on success. `add sse` now tags each event with `sse(data, { id })` and reads
`last-event-id` to resume — verified end to end, a reconnect at id 41 resumes at 42.
`--controller <path>` replaces refusing outright when a project has more than one.
`matcha new --runtime edge` scaffolds a Worker with `nodejs_compat` and wrangler's
`[assets]` serving `./public`, so `/` is the same page as on the other three runtimes
and `/zen` the same stream from the worker; `matcha run` is `wrangler dev`, real
workerd. Core is installed from **JSR** on that runtime alone, because the npm ESM
build cannot load on workerd at all — tsup's `createRequire(import.meta.url)` banner
runs at module scope and `import.meta.url` is undefined there
([green-tea#93](https://git.svc.zoit.services/Green-Tea/core/issues/93), filed from
this work). The scaffolded `.npmrc` says so; it and the alias can both go once that
is fixed.
## Release, installer, and the paperwork
`Cargo.toml` has declared `license = "MIT"` since the first release and the published
crate carried no license text — anyone vendoring the source had the claim without the
grant. `LICENSE`, `DCO` (which the README already required a sign-off against) and
`CONTRIBUTING.md` are added, plus a `CHANGELOG.md` reconstructing 26.7.0 and
26.8.0-beta.0 from their tags.
**Linux arm64 now has a binary.** The installer used to refuse it, so Graviton, a Pi,
an ARM CI runner and Docker on Apple Silicon all needed a Rust toolchain to install a
CLI whose point is not needing one. `rustup target add` could never have fixed it —
`tree-sitter` and `tree-sitter-typescript` compile C through the `cc` crate and Ubuntu
ships no aarch64 musl cross compiler — so both Linux targets now build through zig,
one toolchain instead of a working one plus a second.
`install.sh` resolves `latest` through the `/releases/latest` redirect rather than the
release API, which is rate-limited to 60/hour per IP and, when throttled, produced
"could not resolve latest release tag" with no hint of the cause. Releases with a
hyphen are flagged as prereleases: nothing set the flag, so every beta answered
`/releases/latest` — harmless while every release is a beta, wrong the moment a stable
one exists. And `test_install.sh`, which has existed since the installer landed and
which no workflow ever ran, now runs on Linux and macOS with shellcheck alongside.
Each release job runs the artifact it just built wherever the runner can execute it,
and `verify-linux-arm64` installs the published arm64 binary through `install.sh` on a
pinned arm64 Linux runner — the fleet is x86_64 on Linux and arm64 on macOS
(verified on the hosts), so that job is the only place the arm64 artifact starts
before a user starts it.
## Verification
`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, 92 tests,
`test_install.sh`, `shellcheck`, and `scripts/starter-smoke.sh` for node, deno, bun and
edge — all green. The runtime behaviour was exercised by hand as well as by the smoke:
SSE resume, multipart upload, the WebSocket echo, the CSV transformer, `wrangler dev`
in real workerd, and the Intel macOS binary running on the arm64 runner through Rosetta.
## Not in this PR
`create plugin` — deliberately left out, being worked on separately. Windows is
unblocked on the build side (zig produces a verified `PE32+`) but blocked on behaviour:
`npm`, `npx` and `bunx` are `.cmd` shims and `Command::new` does not consult `PATHEXT`,
so `run`, `graph`, `explain`, `openapi` and `create --check` would all fail on the
default runtime. That needs routing through `cmd /C` plus an `install.ps1`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
The CLI's last feature work was 12 July; core has shipped 26.8 and 26.9 since.
Two consequences, fixed together because they share an entry-file convention.
Every runtime overlay pinned `^26.7.0-beta.0`. Core is prerelease-only, and
npm's semver excludes a prerelease from any range whose comparators carry a
different major.minor.patch — so that caret is not a loose pin, it is a pin to
the oldest matching prerelease that nothing can move off. Every project
`matcha new` has produced since July installed 26.7.0-beta.0 and could not
upgrade: no logger, no request budget, no resumable `@Sse` id, and none of the
crashes 26.9 fixed. The pin is now exact, lives in one `CORE_VERSION` const,
and Deno resolves through JSR — which is core's native path for Deno and the
one 26.9 repaired.
Nothing caught that because CI never ran JavaScript. `cargo test` proves the CLI
writes the files it means to write; it cannot prove those files describe a
project the current core will run. `scripts/starter-smoke.sh` scaffolds,
installs, type-checks, boots, curls `/` and the `/zen` stream, and introspects a
real starter per runtime; a weekly job fails when the pin falls behind the
`beta` dist-tag. The smoke immediately found a second defect: the bun overlay
carried no Bun types, so `tsc --noEmit` — and therefore `matcha create --check`
— failed on every bun project the CLI has ever scaffolded.
`matcha graph` and `matcha explain <pattern>` close the widest gap in the
surface: the framework's claim is that an API is a graph rather than a
middleware chain, `toMermaid`/`toDOT`/`graph`/`explain` have been exported all
along, and the CLI could not draw any of it. Both reach the app through
`app.ready()`, which resolves the graph and is documented as deliberately not
running provider factories — asking for a diagram must not open your database
connections. Formatting lives in the generated script rather than in Rust,
which keeps serde out for output `console.log` already has the values for.
That needed an app the CLI can import without binding a port, so the starter
now composes the graph in `src/app.ts` and leaves `src/main.ts` holding only
the serve call. `create module` follows, preferring `src/app.ts` and falling
back to `src/main.ts` so projects scaffolded before the split keep working.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
`matcha add` covered three capabilities against a framework that has shipped
several more, and one of the three did not work.
`ws` and `upload` are new. Both name the optional peer dependency they need on
success — core lazy-requires `ws` and `busboy`, so a missing one is an error at
the first request rather than at boot, and the moment to mention it is when the
handler is written rather than when it 501s.
The `sse` stub predates 26.9: it yielded bare values, so an `EventSource`
reconnect restarted the iterable from its beginning and lost the gap in silence.
It now tags each event with `sse(data, { id })` and reads `last-event-id` to
resume — verified end to end, a reconnect at id 41 resumes at 42.
`buffer` returned `Buffer.from('hello')` and never could have worked: the
capability is named for the *transport*, `TransformerFn` returns `body: string`,
and the default `JsonTransformer` is `JSON.stringify` — so the route answered
`{"type":"Buffer","data":[104,...]}`. It now demonstrates `@Transformer`, which
is what actually governs a whole-response route, and answers `text/csv`.
`add` refused to act when a project had more than one controller. It still
refuses to guess, but it lists the candidates and `--controller <path>` is the
way through.
The starter smoke now adds every capability and type-checks them together, and
caught what unit tests could not: `MultipartBody` in a decorated signature is
TS1272 under `isolatedModules` + `emitDecoratorMetadata`, so the handler
compiled on node and bun and failed on Deno. Types in decorated signatures now
go through `wire::add_type_import`, and `find_named_imports` became type-aware
in both directions — merging a value symbol into an `import type` line would
erase the decorator at runtime.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
`matcha new --runtime edge` scaffolds a Worker: `nodejs_compat`, `edgeHandler`
as the default export, and wrangler's `[assets]` serving `./public` so `/` is the
same page as on the other three runtimes and `/zen` the same stream from the
worker. `matcha run` is `wrangler dev`, which is real workerd, so edge stops
being a deploy-only target. Runtime detection puts `wrangler.toml` ahead of
`package.json`, since an edge project has both, and the graph resolves under
node — `src/app.ts` imports core, never `edgeHandler`.
Getting there turned up a core defect, filed as Green-Tea/core#93: the npm ESM
build cannot load on workerd at all. tsup's `createRequire(import.meta.url)`
banner runs at module scope and `import.meta.url` is undefined there, so
`@green-tea/core/edge` throws before any of its own code runs — while
`src/node-require.ts` is written precisely to make that lazy and survivable.
core's own edge test cannot see it: it bundles `src/`, so `dist/` is the one
artifact users install and the one nothing exercises. The scaffold installs from
JSR, which publishes source with no banner and boots clean; the `.npmrc` says why
and links the issue, and both it and the alias can go once it is fixed.
`matcha doctor` reports the misconfigurations that fail confusingly rather than
loudly: `experimentalDecorators` missing, which turns every `@Route` into a
syntax error blaming the decorator; a core pin that cannot resolve or that does
not match what is installed; an entry that does not export `app`; and `@Ws` or
multipart routes whose lazy-loaded peer dependency is absent, which compile and
then fail at the first request. Every check is a file read — no runtime spawned,
nothing fetched — so it works before the project installs. It reads the installed
version from the package's own manifest rather than core's exported `VERSION`,
which is stale in the published artifact (Green-Tea/core#92) and would give the
wrong answer to the one check that exists to catch a wrong version.
The starter smoke and the CI matrix gained edge as a fourth runtime.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
`Cargo.toml` has declared `license = "MIT"` since the first release and the
published crate carried no license text, so anyone vendoring the source had the
claim without the grant. `LICENSE` is that text. `DCO` is the certificate the
README has been requiring a sign-off against without shipping, and
`CONTRIBUTING.md` says how — including that GitHub is a mirror of `main` and
tags, so a pull request there is carried upstream by a maintainer rather than
merged, which would put the two forges out of sync.
`CHANGELOG.md` reconstructs 26.7.0 and 26.8.0-beta.0 from their tags. The CLI
ships on its own version line, so the header says what that does and does not
mean about the core version a scaffold is pinned to, and each entry says when
that pin moved.
`matcha openapi` prints core's structural OpenAPI 3.1 for the route table —
`--title`, `--api-version`, `--out`. It reuses the entry resolution and the
generated-script runner that `graph` and `explain` already had, so it is the
same `app.ready()` that resolves the graph without booting providers. Structural
is the honest word: paths, methods and parameters come from the decorators, and
nothing invents a response schema.
The loose end from the capability table is closed. `cli.rs` still carried its own
copies of the `create` kinds and the `add` capabilities, so adding either meant
editing two files that could disagree — a value the parser accepts and the
dispatcher rejects. Both now read the list from the module that owns it, and the
three `create` piece kinds became rows in a table rather than near-identical
match arms, which also retires a `too_many_arguments` allow.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
`install.sh` asked the release API for the latest tag. That API allows 60
requests an hour per IP without a token, which one office behind a NAT or a CI
runner exhausts — and a throttled response has no `tag_name`, so the installer
reported "could not resolve latest release tag" and gave no hint that rate
limiting was the cause. It now follows the `/releases/latest` redirect, which
carries no such limit and which Gitea implements identically, and keeps the API
as the fallback for the wget path that cannot read the effective URL. Verified
against the real release: resolves v26.8.0-beta.0, verifies the checksum, and
the installed binary runs.
Releases with a hyphen in the tag are now flagged as prereleases. Nothing set
the flag, so every beta answered `/releases/latest` — the very thing the
installer resolves by default. That is harmless while every release is a beta
and wrong the moment a stable one exists, because the next beta published after
it would silently displace it for everyone installing without MATCHA_VERSION.
`test_install.sh` has existed since the installer landed and no workflow ever
ran it — the same shape as the starter gap: a check that exists, passes, and
guards nothing. CI runs it now on Linux and macOS with shellcheck alongside, and
it covers a third case, since the branch this commit changes fails by producing
a message: an unresolvable `latest` must name MATCHA_VERSION and must leave no
binary behind.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The installer refused Linux arm64 and sent you to `cargo install --git`, so
Graviton, a Raspberry Pi, an ARM CI runner and Docker on Apple Silicon all
needed a Rust toolchain to install a CLI whose whole point is not needing one.
`rustup target add` could never have fixed it. `tree-sitter` and
`tree-sitter-typescript` both compile C through the `cc` crate, so the target
needs a real cross C compiler, and Ubuntu ships none for aarch64 musl. zig is
one, for both arches — which is why the x86_64 leg moved onto it too rather than
keeping `musl-tools` beside it. One toolchain for Linux beats a working one plus
a second one that only the new target uses. Verified before touching the
pipeline: all four targets cross-compile from macOS arm64 through zig, C
included, producing binaries of the right architecture and format.
Each release job now also runs the artifact it built, wherever the runner can
execute it. agartha is a macOS host executor, so it runs both macOS binaries —
the Intel one through Rosetta, confirmed by running the built binary on that
host. Rosetta is probed rather than assumed, because a hosted runner may not
have it and a smoke that hard-failed there would block a release over the
runner's configuration rather than over the binary; the probe is an `if` rather
than an AND-list so a missing Rosetta cannot end the step through `set -e`.
Whether the aarch64 Linux binary gets started that way is not a property of the
pipeline, though — it depends on what `ubuntu-latest` resolves to on the forge
that fired. `verify-linux-arm64` removes the dependency by pinning an arm64
Linux runner and installing the published binary there through `install.sh`, so
the answer is the same on every release, and the installer's arm64 branch and
its checksum verification are covered against the real assets on the way. It
carries the same `server_url` guard `publish-crate` already uses, since GitHub
offers such runners and Gitea does not, and a job pinned to a label one forge
lacks would queue there forever.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The `installer` job failed on `ubuntu-latest` and passed on `macos-14`. The two
legs run the same `test_install.sh`; the only difference is the shellcheck step,
which is guarded to Linux — and `catthehacker/ubuntu:act-22.04`, which is what
Gitea's `ubuntu-latest` maps to, does not have shellcheck. GitHub's hosted image
does, so a bare `shellcheck` call is a step that passes on one forge and fails on
the other, which is precisely what this file's header comment ("Lives in
.github/workflows so both Gitea and GitHub run it") exists to prevent. Mine, and
one commit after writing the same warning into CONTRIBUTING.md.
Installed only when absent, so GitHub pays nothing for it. Verified by running
the step inside the image that failed: shellcheck 0.8.0 installs and runs.
Nothing else regressed — `check`, all four `starter` legs and `installer
(macos-14)` were green on the same run.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx
merged commit 0d96a085f9 into develop2026-09-05 22:07:07 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The CLI's last feature work was 12 July. green-tea has shipped 26.8 and 26.9 since,
and matcha did not follow — in one case in a way that reached every user.
The defect this started from
Every runtime overlay pinned
@green-tea/coreat^26.7.0-beta.0. Core isprerelease-only, and npm's semver excludes a prerelease from any range whose
comparators carry a different
major.minor.patch— so that caret was not a loosepin, it was a pin to the oldest matching prerelease that nothing could move off.
Every project
matcha newproduced since July installed 26.7.0-beta.0 and couldnot upgrade: no logger, no request budget, no resumable
@Sseid, none of thecrashes 26.9 fixed. The pin is exact now, lives in one
CORE_VERSIONconstant, andthe scaffold is on 26.9.0-beta.1.
Nothing caught it because CI never ran JavaScript.
cargo testproves the CLIwrites the files it means to write; it cannot prove those files describe a project
the current core will run.
scripts/starter-smoke.shcloses that: scaffold,install, type-check, boot,
curl /and the/zenstream, introspect, add everycapability and type-check them together — per runtime, on a CI matrix of all four,
plus a weekly job that fails when the pin falls behind the
betadist-tag.That smoke immediately found three more defects that unit tests could not see:
tsc --noEmit— and thereforematcha create --check— failed on every bun project the CLI has everscaffolded.
MultipartBodyin a decorated signature is TS1272 underisolatedModuleswithemitDecoratorMetadata, so the generated handler compiled on node and bun andfailed on Deno.
add bufferreturnedBuffer.from('hello')and never worked:TransformerFnreturns
body: stringand the default transformer isJSON.stringify, so theroute answered
{"type":"Buffer","data":[104,…]}.New commands
matcha graph--outmatcha explain <pattern>matcha openapi--title/--api-version/--outmatcha doctorThe framework's claim is that an API is a graph rather than a middleware chain, and
toMermaid/toDOT/graph/explainhad been exported all along while the CLI coulddraw none of it. All three introspection commands reach the app through
app.ready(),which resolves the graph and is documented as deliberately not running provider
factories — asking for a diagram must not open your database connections. That needed
an app importable without binding a port, so the scaffold now composes its graph in
src/app.tsand leavessrc/main.tsholding only the serve call;create moduleprefers
src/app.tsand falls back tosrc/main.tsfor projects from before the split.doctorreads the installed core version from the package's own manifest, never fromcore's exported
VERSION— that constant is stale in the published artifact(green-tea#92) and would give
the wrong answer to the one check that exists to catch a wrong version.
add, and a Cloudflare Workers targetadd wsandadd uploadare new, both naming the optional peer dependency they needon success.
add ssenow tags each event withsse(data, { id })and readslast-event-idto resume — verified end to end, a reconnect at id 41 resumes at 42.--controller <path>replaces refusing outright when a project has more than one.matcha new --runtime edgescaffolds a Worker withnodejs_compatand wrangler's[assets]serving./public, so/is the same page as on the other three runtimesand
/zenthe same stream from the worker;matcha runiswrangler dev, realworkerd. Core is installed from JSR on that runtime alone, because the npm ESM
build cannot load on workerd at all — tsup's
createRequire(import.meta.url)bannerruns at module scope and
import.meta.urlis undefined there(green-tea#93, filed from
this work). The scaffolded
.npmrcsays so; it and the alias can both go once thatis fixed.
Release, installer, and the paperwork
Cargo.tomlhas declaredlicense = "MIT"since the first release and the publishedcrate carried no license text — anyone vendoring the source had the claim without the
grant.
LICENSE,DCO(which the README already required a sign-off against) andCONTRIBUTING.mdare added, plus aCHANGELOG.mdreconstructing 26.7.0 and26.8.0-beta.0 from their tags.
Linux arm64 now has a binary. The installer used to refuse it, so Graviton, a Pi,
an ARM CI runner and Docker on Apple Silicon all needed a Rust toolchain to install a
CLI whose point is not needing one.
rustup target addcould never have fixed it —tree-sitterandtree-sitter-typescriptcompile C through thecccrate and Ubuntuships no aarch64 musl cross compiler — so both Linux targets now build through zig,
one toolchain instead of a working one plus a second.
install.shresolveslatestthrough the/releases/latestredirect rather than therelease API, which is rate-limited to 60/hour per IP and, when throttled, produced
"could not resolve latest release tag" with no hint of the cause. Releases with a
hyphen are flagged as prereleases: nothing set the flag, so every beta answered
/releases/latest— harmless while every release is a beta, wrong the moment a stableone exists. And
test_install.sh, which has existed since the installer landed andwhich no workflow ever ran, now runs on Linux and macOS with shellcheck alongside.
Each release job runs the artifact it just built wherever the runner can execute it,
and
verify-linux-arm64installs the published arm64 binary throughinstall.shon apinned arm64 Linux runner — the fleet is x86_64 on Linux and arm64 on macOS
(verified on the hosts), so that job is the only place the arm64 artifact starts
before a user starts it.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings, 92 tests,test_install.sh,shellcheck, andscripts/starter-smoke.shfor node, deno, bun andedge — all green. The runtime behaviour was exercised by hand as well as by the smoke:
SSE resume, multipart upload, the WebSocket echo, the CSV transformer,
wrangler devin real workerd, and the Intel macOS binary running on the arm64 runner through Rosetta.
Not in this PR
create plugin— deliberately left out, being worked on separately. Windows isunblocked on the build side (zig produces a verified
PE32+) but blocked on behaviour:npm,npxandbunxare.cmdshims andCommand::newdoes not consultPATHEXT,so
run,graph,explain,openapiandcreate --checkwould all fail on thedefault runtime. That needs routing through
cmd /Cplus aninstall.ps1.🤖 Generated with Claude Code
https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
`matcha add` covered three capabilities against a framework that has shipped several more, and one of the three did not work. `ws` and `upload` are new. Both name the optional peer dependency they need on success — core lazy-requires `ws` and `busboy`, so a missing one is an error at the first request rather than at boot, and the moment to mention it is when the handler is written rather than when it 501s. The `sse` stub predates 26.9: it yielded bare values, so an `EventSource` reconnect restarted the iterable from its beginning and lost the gap in silence. It now tags each event with `sse(data, { id })` and reads `last-event-id` to resume — verified end to end, a reconnect at id 41 resumes at 42. `buffer` returned `Buffer.from('hello')` and never could have worked: the capability is named for the *transport*, `TransformerFn` returns `body: string`, and the default `JsonTransformer` is `JSON.stringify` — so the route answered `{"type":"Buffer","data":[104,...]}`. It now demonstrates `@Transformer`, which is what actually governs a whole-response route, and answers `text/csv`. `add` refused to act when a project had more than one controller. It still refuses to guess, but it lists the candidates and `--controller <path>` is the way through. The starter smoke now adds every capability and type-checks them together, and caught what unit tests could not: `MultipartBody` in a decorated signature is TS1272 under `isolatedModules` + `emitDecoratorMetadata`, so the handler compiled on node and bun and failed on Deno. Types in decorated signatures now go through `wire::add_type_import`, and `find_named_imports` became type-aware in both directions — merging a value symbol into an `import type` line would erase the decorator at runtime. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2CThe `installer` job failed on `ubuntu-latest` and passed on `macos-14`. The two legs run the same `test_install.sh`; the only difference is the shellcheck step, which is guarded to Linux — and `catthehacker/ubuntu:act-22.04`, which is what Gitea's `ubuntu-latest` maps to, does not have shellcheck. GitHub's hosted image does, so a bare `shellcheck` call is a step that passes on one forge and fails on the other, which is precisely what this file's header comment ("Lives in .github/workflows so both Gitea and GitHub run it") exists to prevent. Mine, and one commit after writing the same warning into CONTRIBUTING.md. Installed only when absent, so GitHub pays nothing for it. Verified by running the step inside the image that failed: shellcheck 0.8.0 installs and runs. Nothing else regressed — `check`, all four `starter` legs and `installer (macos-14)` were green on the same run. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>