green-tea is new, so coding agents have no training data on it and
write Express: app.use, next(), res.status().json(). llms.txt states
what differs: the mental model, a complete app, the decorators and
built-in tokens, how to return responses, the options agents usually
need, common mistakes with the correct form, testing, and how to
inspect an app first.
Every code block was typechecked against src/, and each behavioural
claim was checked with a small probe app.
The file ships inside the package, so it always matches the installed
version. matcha's scaffolded AGENTS.md points at it. Only a packaged
file is added; the API is unchanged.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Make the wording consistent: mesh is alpha and may change in any
release. The JSDoc tags said 'a minor release' while the README said
'any'.
State the rule mesh now follows. Its surface is the @experimental
exports, MeshConfig and the mesh:* events. A mesh change stays inside
that surface: it adds no createApp option, App method or decorator, and
it changes no stable type. Mesh adapts to the stable API instead of
moving it.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Add an API stability section to the README with the policy. From RC.1
to stable, releases are fixes only, with no additions and no
deprecations. After stable, a deprecated API gets at least two monthly
releases, JSDoc @deprecated, and a single app.logger warning before it
is removed under ### Breaking. The committed API reports make every
change visible, and mesh stays outside the promise.
Correct the wording added in #181 and #182, which said the API could
still grow until stable. That contradicted D18.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README no longer describes the API as still moving, or the radix
matcher as future work. It also states that native TLS is Node-only.
The CHANGELOG gains a Breaking entry, with migration notes, for the
Deno and Bun TLS refusal, and an Added entry listing the newly
exported types.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
CONTRIBUTING said none of the Deno, Bun or edge suites run in CI. They do:
the runtimes job runs all three on every push and gates a merge. It now
says so, names test:all, and lists the audit step CI runs.
The README's benchmark section quoted a ranking against Fastify that went
stale with the next measurement. It now explains what the harness measures
and why, and leaves every number to BENCHMARKS.md. The install section
states the Node 22 floor and that Node 18 and 20 are not supported.
The PR template asks which runtime suites were run. The example README
pointed at ts-node, which is not a dependency, and a dist path tsup never
builds; it now runs each example with tsx. example/server.ts crashed at
boot because its teacup lacked experimental: true.
docs/plans held agent implementation plans from August and September.
Those belong in .specs/, which is not committed, so they leave the
repository. The three places that linked the mesh degrade plan now
describe the planned expects list instead.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Text responses went out uncompressed unless a proxy sat in front of every
runtime. createApp({ compression: true | { threshold, encodings } }), off
by default, implements D13 strategy B as accepted on 2026-10-22.
- One function, compressOutcome, runs after handle() and before either
adapter writes, so Node and the fetch runtimes cannot diverge.
- Accept-Encoding negotiation with q-values, identity, * and q=0; ties go
to server preference (br before gzip). Vary: Accept-Encoding is merged
wherever the request decided the outcome, including every 304. Skips:
existing Content-Encoding or Content-Range, no or an incompressible
Content-Type (ndjson is compressible), Cache-Control: no-transform.
HEAD and bodies under threshold keep Vary; 204 gets none.
- Node, Deno, Bun: node:zlib only, loaded lazily through nodeRequire.
Buffered bodies use the async API, never the sync one; br at quality 4.
Content-Length is dropped from an encoded body.
- Streams (SSE, ndjson): a zlib stream flushed after every frame, error
frame and ping, piped into res on Node and wrapped around the
ReadableStream on fetch runtimes. Backpressure follows the compressor;
a client leaving destroys it.
- Edge: core never encodes and sets Vary only. Edge is recognised by
edgeHandler, which marks the app through an internal symbol, and by
createApp detecting workerd (navigator.userAgent, or node:zlib failing
to load), which covers a bare app.fetch export.
- ETags from CARD-15 are taken on the identity body and stay weak, so the
tag does not change with the coding.
Deno runs zlib's async API on the main thread; that is documented and
pinned by a test, not worked around.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Conditional GETs were never answered: every revalidation re-downloaded
the file or response.
- Static (D12, always on): a hit carries W/"<size>-<mtimeMs base36>",
Last-Modified and Cache-Control from the stat the resolver already did.
A matching If-None-Match, or If-Modified-Since when If-None-Match is
absent, answers 304 before the file is read. StaticHit now carries the
stat and a read() for the bytes, and HEAD no longer reads either.
- static: { dir?, cacheControl? } (rule 1a): Cache-Control defaults to
no-cache so browsers revalidate rather than reuse a file for a lifetime
guessed from Last-Modified. An unknown key or CR/LF throws at boot.
- createApp({ etag: true }) (off by default, boolean only): a buffered 200
to GET/HEAD gets a weak tag from a 32-bit FNV-1a hash of its UTF-8 bytes
plus its length, computed before HEAD blanks the body. A handler-set
etag is kept and only compared. Weak comparison, lists split outside
quotes, and * are supported.
- Every buffered 304 leaves dispatch bodiless, with its content-* headers
dropped, so NotModified matches the ETag path on every adapter.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Reading a cookie meant parsing the Cookie header by hand, and a response
could not carry more than one Set-Cookie: response header values were
Record<string, string>, and the fetch adapters would have stringified an
array into one broken "a,b" cookie anyway.
- @cookie('name') / @cookies() sit next to @header/@headers as a new
'cookies' arg source. The header is parsed on first use per request and
cached on the context, so a route without a cookie argument never parses
it. RFC 6265: first value wins, %-sequences decoded, malformed pairs
skipped (never a 400), undecodable values kept raw. Several cookie lines
are joined with "; ". The map has no prototype. @needs('cookies') reads
the same map, and 'cookies' joins the seed-key allow-list.
- setCookie(name, value, options) serialises one Set-Cookie value with
HttpOnly, SameSite=Lax, Path=/ and Secure by default (D10), and throws,
naming the field, on anything that could inject a header or that browsers
reject (sameSite none / partitioned without secure).
- Response header values widen to string | string[] (D11) across
TransformerFn, ErrorResponse, HttpError(Like).headers, ResponseShape and
the neutral outcome. Node writes a set-cookie array as one line per
element and joins every other array with ", " before writeHead; the
fetch adapters build a Headers and append each set-cookie element.
mergeInjectedHeaders keeps arrays by reference and joins a vary array
before merging it.
- OpenAPI maps a cookie argument to an in: cookie parameter.
BREAKING CHANGE: code that reads a header value from TransformerFn,
ErrorResponse, HttpError or ResponseShape as a string must handle string[].
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
createApp({ health: true }) serves GET/HEAD /__live__ and /__ready__.
Ready reports booting until boot() resolves, ok or degraded (from
app.degraded()) after that, and draining from the moment close() starts.
Probes are answered by the adapters, ahead of the request gate and of
handle(): Node in serve() (src/http/server.ts), the Fetch path in
app.fetch before it awaits the boot. Otherwise ready could never say
booting. Being ahead of the gate means maxConcurrentRequests never sheds
a probe (D14). Being ahead of handle() means no step, provider, plugin or
onError runs, and no lifecycle event is emitted, so logRequests and
metrics never see a probe. Security headers still apply, plus
cache-control: no-store. Other methods get 405 with Allow: GET, HEAD.
A probe through app.fetch before any boot starts the boot without
awaiting it. On the edge, or under a bare Deno.serve(app.fetch), nothing
else may boot the app, and an orchestrator that waits for ready before
sending traffic would wait forever.
health: { drainDelayMs } (D14) marks the app draining and keeps the
listener open for that long before connections drain. Without it, Node
closes idle keep-alive sockets at once, and a probe sees a reset rather
than the 503. The window is spent out of the close budget. serveDeno and
serveBun start the same window, through a symbol-keyed hook on the app,
before server.shutdown() / server.stop(false). workerd has no close(),
so it never reports draining.
While health is on, /__live__ and /__ready__ join the reserved-path
boot check that CARD-21 introduced, for local and mesh-spliced routes.
Invalid health values throw at createApp.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
CI picked up Bun 1.4.4 (`oven-sh/setup-bun@v2`, latest), which now sends a
real `1009` close frame when `maxPayloadLength` refuses a frame. Bun 1.3
dropped the connection instead, so the peer saw `1006` — the difference D1
documented and these two assertions pinned on purpose so a Bun upgrade would
be noticed. It was: `runtimes (bun)` fails on develop.
The assertion now follows `Bun.version` (1006 before 1.4, 1009 from 1.4), so a
further change in either direction still fails. JSDoc, README and the #107
CHANGELOG entry say which Bun versions do what.
Verified with Bun 1.3.14 and 1.4.4 (26/26 each); lint, format, typecheck,
npm test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README still said matching was a linear scan with a radix tree as
post-beta work; CARD-07 (#128) shipped the radix index.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Before, when two sibling routes could match the same request, the router
picked one by registration order or precedence, and nothing reported it.
Boot now refuses two cases between routes of the same method that branch at
the same segment under the same prefix:
- ambiguous: both params are constrained, the constraints accept a common
segment, and the rest of both patterns can match one request. The error
names both declarations and a witness segment with an example path.
- unreachable: a plain param sits next to a constraint that accepts every
segment, and the constraint wins every request the plain param could take.
A plain param next to a constraint that leaves some segments over is the
documented fallback pattern and still boots.
The check is exact. assertSafeConstraint admits only a linear, group-free
subset, so every constraint reads back as a sequence of (character set, min,
max) blocks. Atom sets follow u-flag semantics. \p{...} is the one construct
that is not modelled, and for it the engine is asked once per code point. A
product walk over two block sequences finds a common segment, or proves none
exists, in O(|A|*|B|*(|A|+|B|)*K) with K <= 2048. "Accepts every segment" is
a closed-form test on the blocks. Both are measured against what the router
hands a param: a decoded, non-empty segment that is never "." or "..".
The check runs per table under that table's own precedence. HTTP ranks by
specificity. WebSocket takes the first declared match. @Stream routes sit in
both tables. Routes exported by different teapots are checked against each
other. Local against remote keeps the local override and its warning.
The lookup path is unchanged. router.ts only exports the two token regexes,
so the boot check and assertSafeConstraint read atoms the same way.
BREAKING CHANGE: an app that declares two overlapping constrained siblings
(e.g. /u/:id(\d+) and /u/:n(\d{1,3})), or a plain param beside a constraint
that accepts every segment, now fails createApp. So do a plain WebSocket param
declared before a constrained sibling, and such pairs across mesh teapots.
Refs: #127
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Node 18 and Node 20 are end-of-life and receive no security patches, so
supporting them before RC.1 would mean promising a runtime nobody can
patch. Node 22 is the oldest line still maintained.
engines.node moves to >=22, @types/node to ^22, the tsup target to
node22, and CI's build job from Node 18 to 22, so every workflow now
runs Node 22 only. The docs, the bug report example and the comments
that stated 18 as the floor follow.
The node:crypto fallback in the HTTP core existed only for Node 18,
which lacked the global crypto; it goes with its regression test, which
said as much. The ws fallback for the WebSocket client stays: Node 22
has the global, but it can still be switched off with a flag.
Moving off Node 18 and 20 also unblocks vitest 4, which the remaining
dev audit advisories need.
BREAKING CHANGE: Node 18 and Node 20 are no longer supported. The
minimum is Node 22.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Inbound WebSocket traffic was unbounded per connection: Node used ws's
100 MiB default payload, the other runtimes had no cap of their own, and
the queue behind `inbound` was an unbounded channel on every runtime, so
one client could exhaust memory with large messages or a slow consumer.
Add `limits.maxWsMessageBytes` (default 1 MiB, close 1009) and
`limits.maxWsQueue` (default 16 unread messages, close 1013), as recorded
in D1. Both are server-wide and validated by createApp, which throws a
TypeError for anything but a positive integer. Enforcement is shared in
`boundInbound`, which subscribes immediately and replaces the
subscribe-before-boot trick in app.upgrade. Node and Bun also get the
native pre-buffer cap; Bun drops the connection without a close frame,
so its peer sees 1006, which is documented and tested. Deno and workerd
expose no such option and check the size after receipt.
BREAKING CHANGE: messages over 1 MiB now close the connection with 1009,
and a connection with 16 unread inbound messages is closed with 1013 on
the next one, including a handler that never reads `inbound`.
Closes#107
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Measured on an otherwise idle Ryzen 3700X over ssh, with the same Node, Deno
and Bun versions the laptop runs, after two attempts here were thrown away.
The absolute numbers drop to roughly a third — a 2019 desktop part against an
M4 Max — and that is the trade: a slower box whose numbers mean something
beats a faster one whose numbers track what else was on screen.
The shape reproduced across both machines, which is the result worth having.
green-tea is behind Fastify on hello, param and pipeline, ahead of it on
validate, and ~2.8x ahead of Express, on the M4 and on the Ryzen alike. The
size of the gap did not reproduce (2-8% there, 7-15% here), so the README now
says the direction and points at the table for the number, rather than
quoting a percentage that is really a fact about somebody's hardware.
CV lands between 0.1% and 1.3% across every row, against 4-6% on the
contended runs.
Fixes a sentence added an hour ago claiming the ordering inside the fast group
moves between runs by more than the gap between its members. It does not — it
held on both boxes — and the claim happened to be the one that flattered us.
Cross-framework tables and the runtime table are regenerated; the hand-written
section below the marker, including the release gate, is untouched.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The breaking changes in this release — `Plugin` as `{ name, mount }`, async
`serveDeno`/`serveBun`, a teapot that cannot export a provider, an `HttpError`
recognised by brand — are boot-time and error-path work, so the question was
whether any of it reached the per-request path. Ten cases against
`v26.9.0-beta.1`, both trees on one box in one sitting with the order
alternating: nine overlap and say nothing, which is the answer.
The tenth is the part worth keeping. `param, 50 routes` came out +4.3% with
separated ranges, in our favour, and had no mechanism — the matcher work that
could produce it would have to show at 200 routes, where the same run said
+0.1%. Seven rounds put it at +0.5% and overlapping. It was chance, and it is
recorded as chance, because a flagged row means measure again in either
direction.
The README has claimed since 7 July that green-tea beat every other framework
in 3 of 4 scenarios. The table it links to stopped saying that at some point
over the following two months — a ranking written into prose once is a claim
nobody re-measures, and this one outlived the NestJS rows, the parity controls
and the runtime-neutral boundary the file itself documents the cost of. It is
replaced by the shape of the result, which is stable, and a pointer to the
table for the numbers, which are not.
The cross-framework tables are deliberately left at their 2026-09-02 date.
Two attempts to regenerate them produced runs where a framework's delta
tracked its position in the run order and a browser held ~60% of the machine;
publishing those would have read as green-tea overtaking Fastify, which is the
most flattering available reading of a broken measurement. Absolute numbers
need a quiet box.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A teapot that never connected sent no manifest, so spliceRemoteScopes
registers nothing for it — no step runner, no route. Its routes therefore
take the ordinary unmatched path and 404, and a local node that needs one of
its tokens still fails the boot naming it. The 503 belongs to a teapot that
connected and later died, where the link and its exports exist and the
dead-link guard answers.
The previous commit said 503 for the absent case in five places, including
the warning an operator reads during a deploy. All five now tell the same
story, and the bootTimeoutMs JSDoc — stale in the other direction, still
claiming an absent teapot fails the boot — with them. The connectUntilDeadline
JSDoc also had a paragraph saying it still throws, contradicted three
paragraphs later; that one is gone.
No behaviour changed. Serving 503 for an absent teapot's tokens means knowing
what it would have exported, which is the expects list in the degrade plan and
is deliberately not built.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The CHANGELOG gains an [Unreleased] section — no version heading, no date —
covering the three mesh changes on this branch and why each one follows from
the first: a remote export is a step now, so it holds nothing between requests,
so an absent teapot costs a 503 rather than a boot.
The README says it in the Honest scope section, where the mesh caveats already
live: what can be exported, what happens if you export a provider anyway, and
why a missing token still fails the boot when an unreachable teapot no longer
does.
Two stale bits go with it. The JSDoc over assertNeedsSatisfiable still quoted
the old unconditional message; the Deno and Bun fixtures still said a teapot
exports its scopes. And the degrade plan's D6 planned to reuse a seam this
branch deleted — a dated note says so, and why a degraded step never needed it.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README promised shutdown was *"an extension point, not a SIGTERM handler you
write"*. Half of it was true: `dispose()`, `onShutdown` and `hooks` all deliver the
*content* of teardown, but nothing called `close()`, so every application still wrote
the handler — and wrote it three times, because the spelling is per runtime. Forget it
and the container is SIGKILLed after its grace period, every `dispose()` the registry
so carefully ordered never runs, and nothing reports it.
`createApp({ handleSignals: true })` registers SIGINT/SIGTERM to close and exit.
Off by default, and that is the design rather than caution: a library that installs
process-wide handlers behind your back is worse than one that installs none, because
when the process exits is the application's call. Both halves are now supported and
documented — keep the handler, or hand it over. What is not optional either way is
that *something* calls `close()`, and the README now says so instead of implying the
framework already had it covered.
Declared once on `createApp`, wired per runtime by whichever boot call runs:
`listen()`, `serveDeno()` and `serveBun()` each pass the closer that drains *their*
server to `app.handleSignals`, which returns a close that also unregisters. On Deno
that unregistering is load-bearing rather than tidy — a live `Deno.addSignalListener`
holds the process open, so an app that closed itself would otherwise hang.
Unregistering first also means a *second* signal falls through to the platform default
and ends the process at once. That is deliberate: Ctrl-C twice is the way out of a
teardown that is stuck, and swallowing it for the length of a 10s budget would read as
a hang. An orchestrator sends SIGTERM once and then SIGKILL, so it never gets there.
Tested against real processes, because a handler whose job is to exit its own process
cannot be fired by hand in the runner: Node covers SIGTERM, SIGINT, the double-signal
escape hatch and the default-off case; Deno covers `Deno.addSignalListener`/`Deno.exit`,
which is the API that actually differs. Bun shares Node's `process` path.
Closes#70.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Follows the website copy strategy, translated from marketing register into the
one this file is read in. The strategy's own summary of the change applies
here too: stop selling simplicity because the framework is small, start
selling simplicity because the framework carries the infrastructure.
The hero led with "not a mutable bag threaded through positional middleware".
Middleware ordering was the origin problem, not the whole of what this does,
and a reader who has never hit that pain learns only what green-tea is
against. It now says what it is for: declare what a step needs and produces,
and the framework derives the order, validates the wiring before traffic, and
runs only the slice a route requires.
Added "Who does the work?", the section the strategy ranks first and the file
never had. It is a table of which side of the import each infrastructure
decision lives on, ending with business rules on yours — and it is where the
single runtime dependency now sits, as evidence rather than as a headline. The
number was never the point: fewer moving parts to understand, upgrade,
coordinate and debug is. A framework owning less does not delete that work, it
moves it into your application.
"Batteries included — still one dependency" did both of the things the
strategy says to demote in one heading. It is now "What the foundation already
carries", which is the same list making the ownership argument instead of a
bloat-adjacent one.
Accuracy guardrails re-checked after editing rather than assumed: compile-time
guarantees stay scoped to the typed flow core with decorator wiring
boot-validated, mesh stays alpha, no zero-dependency claim, no benchmark
leadership, no anti-Web-Standards framing.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The rule was already in both READMEs, and in both it was a subordinate clause
at the end of something else — a trailing "because nothing fails when the two
disagree" here, a closing section titled "The seam this repository opens"
there. Written, and easy to read past.
Both are now a callout: what breaks, that nothing tells you, and what to do
instead. The docs repository's moves to the top, above how to run it, because
someone opening that repository is usually about to edit a page.
Deliberately not in the marketing site. That risk belongs to whoever changes
the API, not to whoever is deciding whether to try the framework.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The last thing a reader needs before betting on a beta, and the one thing
Honest scope did not answer: it admits what is missing, not what is likely to
change under them.
Present state only. No dates, no delivery commitment, and deliberately not a
roadmap — this is one person's spare-time work, and a schedule it cannot keep
would cost more trust than the schedule earns. The API freeze stays declared
under **next**, untouched, and gets planned near the RC.
Every tier is read off the history rather than asserted. The graph is settled
because graph.ts and container.ts have not been touched since the beta
hardening on 7 July, and because the changes to metadata.ts since then only
add decorators (@Head, @Options, @Html) rather than redefine the ones that
were there. The plugin API is listed as moving because it moved this week.
The pipeline context is listed because 4081106 made it one object mutated in
place, which changed what a step that captured it observes — a real semantic
change, not a perf note, and worth a reader knowing.
Two claims the trust-release plan proposed are not made. It grouped decorator
syntax with the volatile things; the volatility there is TC39's, not ours, and
README already explains it. And it listed the CLI, which ships from its own
repository on its own version line, so nothing here can honestly speak for it.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Closing a connection meant writing process.on('SIGTERM') by hand: closeApp
drained the server and mesh links and knew nothing about the graph, and the
Bus had no shutdown event at all, so a plugin could not even observe that the
app was going away.
Implements docs/plans/2026-08-17-shutdown-teardown-design.md, D1-D8.
Three doors into one registry, with one order and one failure policy — a
@Provider may declare dispose(), a plugin may call api.onShutdown(fn), and an
application that wants neither passes createApp({ hooks: [{ onShutdown }] }).
Shipping only the plugin half would have frozen the public API around the less
common case: the thing that holds a database connection is a provider.
Callbacks take no arguments. Whatever needs closing is already in the closure
that registered it, so nothing crosses a scope and the registry needs no
container, app reference or transport. That is what keeps this a registry
rather than a second event bus — Bus.on is synchronous and emit swallows
failures on purpose, and a teardown needs the opposite of both.
Provider dispose() is registered as the provider boots rather than as it is
collected, so reverse-registration is reverse-topological order for free: a
cache that needs db closes before the db it is holding, with no second sort to
keep in step. It registers inside the try, so a provider that failed to boot is
never disposed — nothing it might close was ever opened.
Teardown runs after the drain, because an in-flight request may still be using
what a teardown is about to close, and inside the same timeoutMs, because that
number is a promise about when close() returns. teardownTimeoutMs reserves a
slice of that budget rather than extending it, and is rejected at boot rather
than clamped.
Node, Deno and Bun reach it through the close() each runtime actually uses.
app.close() returns at its no-server guard everywhere but Node, so the Deno and
Bun adapters chain it after their own drain — and app.close() now runs teardown
on that path too, since an app served through app.fetch still booted providers
that opened things. The registry drains once, so both entry points are safe.
Edge gets a doc comment and nothing else. workerd has no shutdown to intercept;
a best-effort call on an event that does not exist would be worse than saying so.
Recorded in mountPlugin's comment while widening it: "isolation is structural"
is a guarantee about the registration surface, not about the request context. A
plugin's step already receives the live context and can overwrite keys in it.
Pre-existing, unrelated, and now written where the next reader will look.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
release.yml has always run `deno publish --dry-run` before publishing to
either registry, and keeps doing so — that copy is the last thing standing
between a tag and a JSR version number that can never be replaced.
It runs too late to be feedback, though. A slow type in the public API or a
Deno type error lands on main in silence and surfaces while cutting a
release, which is the same "least time to judge a fix" the audit steps are
already ordered to avoid. The workflow made that argument for advisories and
not for the registry that type-checks us.
This matters more in the next few commits than it did in the last hundred:
Task 2.5 adds Hooks, TeardownFn and PluginApi.onShutdown, and exported types
are exactly what the slow-types check polices.
It is a second compiler over the same source rather than a packaging
formality. `npm run typecheck` is tsc with this repo's config; this is Deno's
checker with Deno's lib, and it is what found the BodyInit hole on the fetch
path that tsc accepted. JSR serves src/ directly, so what it rejects is what
a JSR consumer would have received.
Measured at 0.68s against 2.0s for the whole vitest suite, so it goes in the
runtimes job's Deno leg, which already installs Deno.
test:all covers the same ground locally. npm test stays Node-only on purpose
— it is the loop you run constantly, and booting three more runtimes into it
would tax every run to catch what CI already catches on every push. Verified
end to end: 393 vitest, 9 Deno, 5 Bun, edge, and the dry run, in 6.1s.
It passes --allow-dirty and CI does not, deliberately: locally you are
checking work in progress, and in CI a checkout that is not clean is worth
failing on.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
website/ is now github.com/Expressive-Tea/green-tea-docs, carrying its own
history — 31 commits, extracted with `git subtree split`, not squashed into
an import that pretends the pages appeared all at once.
What this repository gives up is real and worth naming: the site had no
deploy pipeline at all, and CI here was the only thing proving it still
built. That is why the new repository got a build gate and a tagged release
before this deletion landed, rather than after.
Removed with it: the three website steps in ci.yml (including the second
setup-node that re-pinned 22.12 purely for the docs build — the core job
stays on 18, the minimum supported version), the two package.json scripts,
and the .astro/ and website/dist/ ignore rules that now belong over there.
SECURITY.md pointed at `website/` as an out-of-scope path; it now points at
the repository, since the path no longer exists to be out of scope.
The split trades a CI coupling for a drift risk — nothing fails now when
the docs and the API disagree. Both READMEs state the rule that replaces
the build: a change to public API updates the page documenting it. That is
the weakest of the options considered, and it is written down rather than
assumed.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Task 8. README.md led its Honest scope section with "No observability layer,
either." — the single most load-bearing sentence in the CTO assessment, and now
false. It says what exists instead, and keeps being explicit about what does
not: no metrics registry and no OpenTelemetry exporter in core, because core has
one runtime dependency and intends to keep it.
Adds a guide covering the parts that are contracts rather than implementation
details, since those are the ones a reader gets wrong: route labels carry the
pattern and never the concrete path (labelling metrics on raw URLs is how you
take down a metrics backend), request:end fires when the handler returns rather
than when a stream closes, and streams emit lifecycle events only.
The plugins guide was titled "Plugins & observability" and carried a partial
event list that had already drifted. It now covers plugins and points at the
guide for the vocabulary, with the correlation note it was missing.
Includes the measured cost, because a performance claim without a number is
marketing: -3.9% on JSON hello, -2.1% on a three-step pipeline, and the reason
the shallower route loses more.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Closes#18. The three places that still described close() without a timeout —
the createapp reference table, the README bullet and the dependency-injection
inline comment — now say that in-flight work gets 10 seconds, then a warning
and a force-close.
Also documents what #18 deliberately deferred, now that #15 has decided it.
runtimes.md gains the per-runtime story: app.close() is Node-only, the servers
serveDeno()/serveBun() return carry the same close({ timeoutMs }), and edge has
nothing to close. Including the row that matters — Node and Bun cut the
remainder after the deadline, Deno returns and lets the process end it — since
a deadline that means two things is worse than one that admits it.
createApp({ shutdownTimeoutMs }) from #19 gets its row in the options table.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
package.json has defined test:deno, test:bun and test:edge for a while and CI
ran none of them, so 'runs everywhere' rested on whoever remembered to run
them locally. AGENTS.md even warned that npm test does not cover the other
runtimes without anything closing that gap.
Its own job rather than more steps on build, so a Bun failure reads as a Bun
failure instead of burying the Node lint output — the same reasoning that
places the audit where it is. fail-fast is off because which *other* runtime
broke is the useful half of the answer.
README and AGENTS.md now say the suites gate a merge, since the claim they
back is the headline one.
Refs: .specs/reports/green-tea-next-beta-trust-release.md section 7
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README opened with identity and an install block; the pain that motivates
the graph only appeared after a scroll. Move it up: `req.user` first, then the
idea, then how to install it.
Three fixes while in here:
- The install line now pins `@beta`. `latest` and `beta` both point at the
newest beta until a stable ships, and the versioning note said the opposite.
- Document `RequestLimits`. Body caps, multipart parts and the request /
headers / keep-alive timeouts were already applied with defaults tighter
than Node's, and nothing in the README said so.
- Honest scope now admits there is no observability layer — no logger, no
metrics, no tracing hooks — and points at the issue tracking it as one
design. It is the gap a team hits in week one of a real evaluation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The site hangs off the expressive-tea.io cPanel as green-tea.expressive-tea.io.
A four-level docs.green-tea.expressive-tea.io subdomain reads badly and would
need its own AutoSSL cert (the *.expressive-tea.io wildcard stops one level
up). A /docs subfolder needs no extra host, DNS, or cert — it's a path — and
is what most projects do.
So the docs site now builds with base: '/docs' (its dist/ contents drop into
the subdomain's docs/ folder in cPanel), the 77 hard-coded content links are
prefixed, and the two hero actions Starlight doesn't rewrite are fixed by
hand. Verified: /docs/ serves, / 404s, no unprefixed internal href remains.
README points at the new docs URL.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README claimed green-tea was Node-only with Deno/Bun/edge "on the
roadmap, not built" — all four have shipped. It also taught that a plain
return of an AsyncIterable streams by Accept, which the explicit-transport
change turned into a 500 TransportMismatchError: the one thing a README
must never do is document behavior that now throws.
docs/ had been frozen since the Starlight site replaced it; nothing but
the README referenced those two files, so they were a second copy to keep
in sync and had already drifted. Point at the site instead.
Also adds what shipped unmentioned (@Html/views/static, the four runtimes,
matcha) and fixes the CHANGELOG's YY.MM.PATCH, which contradicted the
README's correct explanation of why the month is not zero-padded.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Ship the visual brand across the framework:
- assets/ (logo.svg, logo-mono.svg, logo.png), included in the npm files list
- README header: leaf mark + Green Tea. + tagline; package description aligned
- /__graph__ viewer header now shows the logo + Green Tea. wordmark (Zen Maru)
- website/ (Starlight): matcha accent, Zen Maru headings, logo, favicon, hero
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Three capabilities that share the same request/route metadata:
- **Per-route upload limits** — `@Post('/x', { maxBodyBytes, maxParts })`
overrides the server-wide `limits` for one route (falls back to the
global default), mirroring the existing per-route `duplicates`.
- **Custom error rendering** — `createApp({ onError })` takes over how any
error becomes a response (HTML, RFC 7807, content-negotiated), covering
the whole surface: handler/step throws, 404, 405, 413, 400. Returns a
response or undefined to fall back to the default JSON. Also wires the
previously-unused `HttpError` `body` field so `throw new HttpError(409,
'conflict', { code })` renders a structured payload. Default behavior is
unchanged when no hook is set.
- **OpenAPI 3.1** — `app.openapi(info?)` projects the route graph into a
structural spec (paths, methods, path/query/header params, request-body
presence, systematic error responses); opt-in `GET /__openapi__` via
`devOpenapi`. Body/response schemas stay generic (Standard Schema exposes
no JSON Schema) — the full `@Produce` mode is post-beta.
Docs: new error-handling and OpenAPI guides, plus reference updates.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Add the npm metadata needed to publish the scoped package —
`publishConfig.access: "public"` (without it a scoped package publishes
private), `engines`, `keywords`, `author` — and a CHANGELOG entry for the
first beta.
Normalize the version to 26.7.0-beta.0: npm treats versions as semver and
strips the month's leading zero, so 26.07.0 publishes as 26.7.0 regardless.
Align package.json, the VERSION export, the README, and the smoke test.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bring the README in line with what shipped and fill the gaps a technical
reader comparing frameworks needs: the busboy peer dep and dual build, a
Routing section with its limits, an explicit "bring your own auth" scope
note, why legacy decorators is a design choice (not laziness), and CalVer
beta versioning.
Add a full Astro Starlight docs site under website/ — getting started,
concepts, per-feature guides, and an API reference — migrated from the
tested quickstart so the examples stay accurate.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Add a dedicated section explaining that real-time is native (not a bolt-on
Gateway/adapter/plugin like other frameworks), and that the primitive is always
an AsyncIterable — you declare the mode (@Sse/@Ws/@Stream) and what changes is
direction and framing. Explains the difference between each iterable exposed
(outbound return vs @inbound, channel/rooms fan-out).
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Reframe README around the graph-as-clarity philosophy; add 'what's different
and why', a batteries-included section for the beta features (TLS/CORS/security,
Standard Schema validation, uploads, graceful shutdown), and the honest
benchmark headline (fastest high-level framework in 3/4 scenarios). Bump status
alpha->beta, add CalVer versioning note, seed CHANGELOG.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>