Commit Graph
11 Commits
Author SHA1 Message Date
chrnx 18270779fc ci(api): commit an API report per entry point and fail CI on drift
CI / dco (pull_request) Successful in 6s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 32s
CI / runtimes (edge) (pull_request) Successful in 23s
CI / runtimes (deno) (pull_request) Failing after 34s
CARD-22 / D20. api-extractor 7.59.4 is now a dev dependency.
scripts/api-report.mjs reads the declarations that tsup emits for each
export-map entry (".", "./deno", "./bun", "./edge") and writes
api/<entry>.api.md.

`npm run api` regenerates the reports. `npm run api:check` runs in the
CI build job and fails when a report differs from the build, so a
public type change has to arrive with its regenerated report in the
same PR.

The check also fails on ae-forgotten-export: a public signature that
names a type its entry does not export. In the adapter entries, a root
type such as App or Logger is accepted, because it is importable from
@green-tea/core; any other unexported type still fails. Both failure
paths were verified locally, by adding a field to TlsOptions and by
un-exporting DenoServeOptions.

The reports are not published: npm ships dist/ and JSR ships src/.
CONTRIBUTING documents the check and the additions-only rule.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-10-30 09:31:12 -05:00
chrnx 02f0473bfc docs: bring the contributor docs and examples in line with the repository
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 21s
CI / build (pull_request) Successful in 29s
CI / runtimes (edge) (pull_request) Successful in 22s
CI / runtimes (deno) (pull_request) Successful in 33s
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>
2026-10-28 14:35:01 -05:00
chrnx bd478ce09c build!: require Node 22
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>
2026-10-10 12:10:52 -05:00
chrnx 25f4144a38 ci(promote): mirror develop to GitHub contrib
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 16s
CI / build (pull_request) Successful in 30s
CI / runtimes (edge) (pull_request) Successful in 13s
CI / runtimes (deno) (pull_request) Successful in 20s
Outside contributors target GitHub `contrib`, which tracked released
`main` and was reset after every release. Between releases they were
working against code the current develop no longer had — a PR touching
an area that changed on develop was obsolete the day it opened, and only
the maintainer could see why.

`contrib` now mirrors `develop`: promote.yml runs on develop pushes too
and pushes to `contrib`, not forced. The refusal is the guard — it fires
exactly when `contrib` holds external merges not yet carried into
develop, and the job says so instead of forcing over them. `main`
keeps its one meaning: released code.

Gitea's `contrib` is gone; it was only ever a copy waiting to be
forgotten. AGENTS.md and CONTRIBUTING.md describe the new flow, drop
the post-release reset, and note that a develop conflict is now the
contributor's to resolve because they can see it.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-12 16:34:55 -05:00
chrnx bead3c1569 docs: make the docs rule followable by the people it addresses
Two problems with the rule added earlier today, both found by asking what it
means for the beta rather than whether to automate it.

green-tea is public and green-tea-docs was private, so CONTRIBUTING.md — read
by external contributors — pointed them at a repository that answered 404 and
asked them to change a page they could not see. The repository is now public,
which is what makes the rule possible at all; nothing in it was ever private,
since the history came from this repository's own website/ directory.

And "in the same pull request" cannot be done: a pull request does not span
two repositories. It is a companion pull request, linked to the first, and
both documents now say so.

Added the escape hatch the rule was missing. A contributor who does not want
to write the docs change can say so and a maintainer writes it — what this
line exists to prevent is an API change nobody mentions, not an unwritten
page, and a rule with no honest way out gets ignored rather than followed.

Neither the automation decision nor the accepted risk changes. The link check
stays rejected on the measurement recorded in the trust-release plan.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-17 12:38:09 -05:00
chrnx cd6e2f073f docs: put the docs-drift rule where a contributor reads it
Task 4.4's obligation was to state the risk the docs split opens, and the
first pass met it in the two places that publish rather than the two that
govern: both READMEs. The core README's copy sits in "Docs & development", a
section a user reads and a contributor about to rename a decorator does not.

AGENTS.md and CONTRIBUTING.md both already carried "New public API needs a
note in README.md". Both were written before the split and neither was
updated for it, so the two documents actually read mid-change said nothing
about the new repository — the rule existed everywhere except where it applies.

Both now name green-tea-docs and carry the reason, because a rule without one
is the first thing dropped when a change is nearly finished. #18 is that
reason, and it happened while the two still lived in the same repository.

Neither automated option was built, and the plan now records which is worth
building and why: a link check against the published package targets #18's
real failure mode — a page naming a decorator, a createApp option or a method
that no longer exists — and needs only the identifiers in the pages' code
blocks compared against the package's exports. It catches lies rather than
staleness. A docs job triggered from core releases is weaker: it fires after
the API has already shipped.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-17 12:11:29 -05:00
chrnx ab58c064d5 docs: document local setup and the runtime suites
CONTRIBUTING went from clone straight to 'make the change' and never said npm install.
That mattered more than it looks: prepare wires core.hooksPath to .githooks, and the
pre-commit hook runs lint and complexity:check. An external contributor without it gets
told by CI what the hook would have told them before the commit existed.

The runtime commands were only in AGENTS.md and the README, so an assistant reading the
repo was better briefed than the person sending the pull request.

Checklist and the CI list now match ci.yml, which had grown complexity:check and build
without either following.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 09:02:56 -05:00
chrnx 1bb82491bd docs: document the cognitive complexity gate
complexity:check was missing from the list of commands CI runs, so the first
external contributor to trip it hit a failure with no way to have seen it
coming, on a rule the docs never stated.

Says what the number measures and why nesting is what it punishes, so the fix
reads as extracting a helper rather than raising the threshold.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 08:47:57 -05:00
chrnx 37693246d7 docs: write down the release procedure and where AI assistance stands
CI / build (pull_request) Successful in 34s
Nothing recorded how this repository is actually run, so every rule lived in
one head and had to be rediscovered. AGENTS.md now carries the two-forge
topology, why promotions are fast-forward-only, how to tell a genuinely ahead
branch from pre-rebase duplication, and the runtime and dependency constraints
that reviews keep enforcing by hand. CLAUDE.md points at it rather than
repeating it, so the two cannot drift.

The AI section in CONTRIBUTING is neither a prohibition nor a disclosure rule.
Assistants are welcome and there is nothing to declare. What it asks is that
you read the diff before sending it, because a person reads every line that
lands here and a diff its own author skipped turns their review into
proofreading. The four failure modes listed are the ones this codebase
actually sees — added dependencies, Node-only assumptions, deleted reasoning,
missing tests — and three of the four were live in a real pull request the day
this was written.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-09 00:32:48 -05:00
chrnx f2db461187 docs: tell contributors where their changes go, and add the templates
CI / build (pull_request) Failing after 11s
CONTRIBUTING described GitFlow as though there were one forge. There are two,
and nothing said so: an outside contributor reading it had no way to learn
that GitHub is a mirror of `main` and that pull requests belong on `contrib`.
The first external PR duly went to `main`, which was our omission rather than
theirs.

The templates carry the parts that keep being repeated by hand — sign-off,
the local check commands, and the two failures that a graph framework invites:
an implementation growing an option that its public interface never declares,
and behavior that works on Node while silently doing nothing on Deno and Bun.

Blank issues stay enabled. Scope and placement discussions are most of what
gets filed here and they don't fit a bug form.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-08 17:39:47 -05:00
chrnx b0b0b1388d docs: add README, MIT license, and DCO-based contributing guide
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-06-26 02:00:21 -05:00