Commit Graph
280 Commits
Author SHA1 Message Date
chrnx 7b0a3d4e24 docs(observability): record why randomUUID is the fast option, not the lazy one
Benchmarked the alternatives rather than leaving the question open. Every
supported runtime already batches entropy behind randomUUID, so the intuitive
replacements lose: Math.random() twice into base36 is 3.5x slower at 265ns
because the string work dominates, an unbatched getRandomValues is 472ns, and
a uint32 pool through toString(36) is 114ns.

The only cross-runtime improvement is a hand-rolled entropy pool with a hex
lookup table at 50ns, which saves 26ns — 0.26% of a real 10.19us request. Not
worth owning an entropy pool for. Buffer.toString('hex') matches it but is
Node-only, which this file cannot be.

Table left in the code so the next person does not re-run it.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:45:17 -05:00
chrnx dabab1812b perf(observability): hoist a per-request closure out of correlateRequest
The `first` helper was declared inside correlateRequest, so it was allocated on
every request. It captures nothing, so module scope is where it always
belonged.

Measured at 0.16us against a ~4.4us in-process request — 45% of the entire
remaining observability overhead, from one line. Total overhead is now +0.24us
rather than +0.44us, which against the 10.19us of a real socketed request is
~2.4%.

Ablation of what is left, so the next person does not repeat it: randomUUID is
0.16us of the 0.24 and the other 0.08 is the header read, the extra properties
and three hasListeners lookups. Building the correlation literal per request
costs nothing measurable — V8 keeps it on the stack — so do not go optimising
that one.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:42:13 -05:00
chrnx 633ef58032 perf(observability): do not build event payloads for an empty room
The correlation work regressed the in-process hot path from 4.52us to 5.43us
per request, ~20%. The design predicted 0.25% per step and was wrong by more
than an order of magnitude, so recording what the measurement actually said:

  spreading correlation into payloads   ~197ns   <- the cost
  crypto.randomUUID()                   ~170ns in place
  try/catch inside the step loop          ~2.6ns <- not the cost

emit() cannot avoid the first: its argument is already built by the time it is
called. Only the caller can decline to build it, so Bus.hasListeners lets it,
and runSteps hoists the check out of the loop since listeners are registered at
boot. An application subscribing to nothing now pays a branch instead of four
payloads and three clock reads for an audience of nobody.

That recovers half. 4.96us remains against 4.52us — ~10% in process, ~4.5%
against the 10.19us of a real socketed request. Two ways to shave the rest were
measured and both rejected in comments: a lazy requestId is defeated by the
first spread, and a boot-prefix counter is 5x cheaper but trades the standard
identifier shape for ~1.7%. Neither earns its complexity yet.

The remaining cost is the feature, not an accident: correlation only exists if
something carries it.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:26:16 -05:00
chrnx 2c47ee8896 feat(observability): correlate and time the lifecycle event stream
Tasks 1-3 of the observability plan. The Bus already had 19 emission points;
what it lacked was any way to tell which request an event belonged to, which
made the whole stream unusable under concurrency.

Every per-request event now carries requestId, traceId, route, method and
transport, and request:step:leave carries durationMs — a field that has been
declared in EventPayload since the beginning with nothing ever writing it.

Identity is derived in the adapters rather than in handle(), because both read
and size-check the body first: a 413 is answered without handle() ever seeing
the request, so generating there would leave exactly the failures an operator
most wants to correlate with nothing to correlate them by. An incoming
x-request-id is adopted rather than replaced, and traceparent is carried
verbatim — core implements no propagation spec.

Timing takes N+1 readings for N steps, since one step's end is the next one's
start. Measured at 25.2ns per step against a ~10.19us request.

request:step:error now names the step that actually failed. It reported
name: 'pipeline' before, discarding the one fact it exists to carry, because it
was emitted from the outer catch where that is all that is known. The outer
catch emits request:failed instead: one marks the span, the other the trace.

route carries the matched pattern and never the concrete path. Labelling a
metric on raw URLs gives unbounded cardinality and takes down the metrics
backend rather than the app, so it is a contract, with a test.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:20:44 -05:00
chrnx 7bd11bff27 docs(plans): implementation plan for the observability contract
Eight tasks from the reviewed design, ordered so the correction lands before
anything consumes it — a logger built on uncorrelated events would grow its own
notion of request identity, which is the failure the design exists to prevent.

Two placement details worth having settled in writing. requestId is generated
in the adapters rather than in handle(), because both read and size-check the
body first, so a 413 never reaches handle() — generating there would leave
exactly the failures an operator most wants to correlate without an id. And
step timing takes N+1 timestamps for N steps, since one step's end is the next
one's start; the design measured that against the naive 2N.

Task 7 benchmarks the hot path and says outright that if the measurement
disagrees with D7, the design changes rather than the number being quietly
kept.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:08:11 -05:00
chrnx d324ecfcb4 docs(plans): settle the three open questions in the observability design
D6: a request span ends when the handler returns, and stream events carry its
requestId. Ending it at stream close would mix 2ms buffered requests with
hour-long SSE connections in one latency distribution; connection duration is
already readable from stream:open/close once they can be joined. Same boundary
#21 chose for its concurrency gate — the framework should not disagree with
itself about when a request is over.

D7: per-step timing is always on. Measured rather than argued: performance.now()
at step boundaries costs 25.2ns per step against a 10.19us request, or 0.25% —
below the 0.3% run-to-run CV of the project's own benchmark. A flag would buy
two code paths for something the harness cannot detect. The measurement also
settles Date.now(), which is both slower (28.6ns) and coarser.

D8: request logging is a Bus subscriber, wrapped to fall back to console. One
path, composable as #10 asks, and the wrapper closes the hole that emit()
swallows listener failures by design — the Bus keeps its guarantee without
buying it with silence.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 14:06:51 -05:00
chrnx 8c3844e577 docs(plans): design the observability contract for #10
The issue says green-tea ships no logging, metrics or tracing contract. The
mechanism is actually already there — Bus has 19 emission points across boot,
pipeline, streams, mesh and plugins, and plugins already subscribe to it. What
is missing is narrower and worse: no event carries request identity, so under
concurrency step events cannot be attributed; durationMs is declared in the
payload and written by nothing; there are no request-level events for step
events to hang from; and a failing step reports as name: 'pipeline'.

That reframes the work. A logger, a metrics exporter and an OpenTelemetry
bridge are not three features, they are three consumers of one corrected event
stream — which is a sharper reason for #10's 'one design, not six' than the
issue had, and it puts most of the work in bus.ts and pipeline.ts rather than
in new files.

Five decisions settled with their reasoning, including why the logger cannot be
an ordinary provider (it must outlive the graph to report the graph failing to
boot) and why route labels carry the pattern rather than the URL (a metrics
consumer labelling on raw paths takes down the backend, not the app).

Three questions left open for review rather than answered alone, the sharpest
being where a request span ends on a streaming route — the same boundary #21
hit, which should be answered once for both.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 13:27:36 -05:00
chrnx f97ac8098b docs(plans): record the #15 decision and split out shutdown extensibility
The plan asked Task 2.3 to decide between two answers; the decision and what
the runtimes actually allow now sit in it, so the next reader is not re-deriving
either. The Deno constraint in particular was found by measurement and is not
in any issue.

Adds Task 2.5 for the plugin/provider teardown idea, kept out of the #15 work
on purpose: it needs a new await-aware surface on PluginApi, because the
existing Bus is a synchronous observer by design and cannot be made to hold up
a shutdown without losing the guarantee that makes it safe.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 13:18:06 -05:00
chrnx e4a2047a1e docs: describe the shutdown deadline, and who owns it per runtime
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>
2026-08-16 13:17:19 -05:00
chrnx 586e14da72 feat(runtimes): a bounded close() on the Deno and Bun adapters
Closes #15, taking the second of the two answers it framed: app.close() stays
Node-only, and each transport that owns a handle offers the same close({
timeoutMs }). app.close() returns at its `if (!server)` guard on Deno and Bun
because they serve through app.fetch and never through listen(), and only the
transport can drain what it accepted. The warning there now names the
replacement instead of pointing at this issue.

The runtimes do not agree, and the code says so rather than averaging them:

Bun escalates. stop(false) drains, stop(true) forces, and the deadline moves
between them like Node's closeAllConnections().

Deno cannot. Its two levers are mutually exclusive — aborting the serve signal
while shutdown() is pending throws BadResource from Deno's own listener,
uncaught and fatal under deno test. Measured on 2.9: abort alone is clean,
abort after shutdown is not. So on Deno the deadline bounds how long close()
waits, not when connections die, and both the type and the timeout warning say
that outright. Silently accepting an option that does less is the failure mode
AGENTS.md rules out.

closeWithDeadline is shared so the two cannot drift into different meanings of
the same timeoutMs, and it resolves on its own timer rather than awaiting the
force call — Bun's stop(true) was measured waiting out a handler with a pending
timer, which is exactly the unbounded wait the deadline exists to prevent.

serveDeno now owns the AbortController it serves with, chaining any caller
signal into it so neither party loses control; a test covers that. The Bun
ambient said stop() returns void, which was simply wrong.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 13:16:24 -05:00
chrnx 085eb9a67d fix(app): arm the shutdown timer before finish(), and make the deadline an app option
Closes #20. finish() called clearTimeout(timer) from above the timer's own
declaration. It worked because server.close(cb) always defers, so the
assignment won the race — correct by timing, and a ReferenceError waiting in
the shutdown path for whoever added a synchronous call site.

The issue proposed hoisting a `let timer`, but prefer-const rejects that and
is right to. Swapping the two blocks fixes it without a suppression and lands
somewhere better: the surviving forward reference is the timer callback
reaching finish(), and setTimeout not firing synchronously is the event loop
rather than a library's current behaviour.

Closes #19. The 10s deadline is now settable via createApp({ shutdownTimeoutMs }),
with the per-call close({ timeoutMs }) still winning. close() is usually
reached from a signal handler, a test helper or a shutdown hook you do not
own, where passing it per call is not available. Nothing changes for anyone
passing neither. The precedence test uses a 30s app-level default, so it can
only pass if the per-call value took priority.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 13:03:09 -05:00
chrnx 91f349bef7 ci: publish to JSR from the same tag that publishes to npm
The @green-tea scope is claimed and the package is linked to this repository
on jsr.io, so the OIDC id-token the job already holds for npm Trusted
Publishing authenticates JSR too — no new secret.

Ordered around one asymmetry: npm allows an unpublish within 72 hours, JSR
versions are immutable and can never be replaced. So JSR goes last, where a
failure costs a re-run rather than a version number, and a dry run gates both
before either ships — JSR checks slow types and module structure that npm
never looks at, and finding that out mid-release leaves the tag half-shipped.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:59:45 -05:00
chrnx f96c2ad401 test: pin the JSR manifest to package.json
npm and JSR publish from the same tag but read their identity from different
files. Bump package.json alone and that tag ships one version to npm and the
previous one to JSR, with nothing failing — the drift the deno.json manifest
introduced, closed where the other publication-metadata pins already live.

Also pins the entry points to npm's, so a docs example importing
@green-tea/core/bun keeps working whichever registry the reader installed from.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:47:47 -05:00
chrnx a0fd74da34 ci: run the Deno, Bun and workerd suites on every push
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>
2026-08-16 12:46:51 -05:00
chrnx 1c5a908fb9 chore(types): name the decorator shapes so JSR sees no slow types
deno publish --dry-run reported 17 slow types across metadata.ts and
params.ts: two factories with inferred return types, and the fifteen exported
decorators built from them. Naming RouteDecorator and ArgDecorator fixes all
seventeen, since annotating each factory resolves its constants with it.

Fixed rather than waived with --allow-slow-types. That flag degrades the
generated declarations and makes type checking 1.5-2x slower for consumers,
which is a strange thing to ship in the framework whose central claim is type
safety. The two names are public API and worth having on their own: a caller
can now give a decorator of either shape a name.

The factories also lost their inline parameter types, which the declared
return type now supplies.

deno.json gains the JSR manifest. Exports mirror npm's four entry points on
purpose — a docs example importing @green-tea/core/bun has to work whichever
registry the reader installed from. Dry run is clean with no flags; claiming
the @green-tea scope on jsr.io is the remaining step.

Refs: Green-Tea/core#19
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:45:47 -05:00
chrnx 30f33b6383 fix(http): narrow buffered bodies to what the runtime's Response accepts
A Node Buffer is a Uint8Array at runtime, but its declared backing store is
ArrayBufferLike, which admits SharedArrayBuffer — and BodyInit takes only
ArrayBuffer-backed views. Deno's lib rejected it outright at web.ts:112. This
is the app.fetch path, so the hole was on Deno, Bun and edge alike; it went
unnoticed because every implementation is forgiving about it at runtime.

Re-views rather than copies: this is the buffered-response path, and a copy
per response would cost real throughput on the runtimes that have no other
adapter. byteOffset and byteLength are load-bearing there — Buffer.from hands
back a window into a shared 8 KB pool, and dropping them returns the whole
pool. A direct test covers that; the static-serving one covers the integration.

The type is derived from Response's own constructor because BodyInit is not a
global under lib es2020 plus @types/node, though Response itself is.

Refs: Green-Tea/core#19
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:45:37 -05:00
chrnx 70bb9902dc ci: scope the publish audit gate to what actually ships
AGENTS.md states the rule and ci.yml implements it: npm audit --omit=dev
blocks, everything else reports. stage.yml and release.yml ran a bare
npm audit, so a dev-only advisory could hold a publish.

That drift stopped work twice. The nanoid advisory reached the tree through
tsup -> postcss -> nanoid, a build-tooling path that ships to nobody, and
fixing it was a precondition for a release it could not affect.

The full audit still runs with continue-on-error, so nothing goes unseen.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:38:20 -05:00
chrnx 9c3bc9574b docs(plans): plan the trust release from the four evaluation reports
The reports in .specs/reports/ were written independently and converge on
observability as the gap that matters most. Two things they demand had no
issue filed at all: CI never runs the Deno/Bun/edge suites that package.json
defines, so the multi-runtime claim has no evidence behind it, and explain()
returns each node's needs without ever naming what produced them.

Sequenced so the cheap phases land first and produce the material the
observability design needs. API freeze stays out: README already declares it
under 'next', and freezing a surface that is still missing its observability
contract would freeze the wrong thing.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 12:38:12 -05:00
chrnx 31cafcc3fa Merge pull request 'chore(deps): bump nanoid to 3.3.18' (#39) from chore/nanoid-advisory into develop
CI / dco (push) Has been skipped
CI / dco (pull_request) Successful in 4s
CI / build (push) Successful in 34s
CI / build (pull_request) Successful in 33s
2026-08-12 19:10:36 +00:00
chrnx 4aae9c3e71 chore(deps): bump nanoid to 3.3.18 in both lockfiles
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 33s
Clears Dependabot alert 26. The advisory is real but our exposure is not:
nanoid arrives through postcss, under tsup at the root and under astro in
website/, so it never ships. Production dependencies of the package are
reflect-metadata and nothing else, and `npm audit --omit=dev` was already
green. Reaching the bug needs control of the size argument passed to nanoid,
which postcss calls with a fixed length.

Fixing it anyway because the alert costs more to keep explaining than to
close, and an open badge trains us to skim Dependabot. The next advisory
should be the only one sitting there.

Dependabot files it under website/ as runtime scope because website/package.json
lists astro under dependencies and has no devDependencies at all. Moving them
would stop that mislabelling, but that is a separate change.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-12 14:09:22 -05:00
chrnx 2e4712788b Merge pull request 'Merge contrib: app.close() timeout from an outside contributor' (#38) from contrib into develop
CI / dco (push) Has been skipped
CI / build (push) Successful in 34s
2026-08-12 19:03:23 +00:00
chrnx 9d95260706 chore(test): nest the close({ timeoutMs }) case inside its describe block
CI / dco (push) Has been skipped
CI / dco (pull_request) Successful in 4s
CI / build (push) Successful in 35s
CI / build (pull_request) Successful in 34s
The test landed one line below the closing brace of describe('graceful
shutdown'), so it ran at the top level instead of under the block it
belongs to. Placement only; the assertions are untouched.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-12 13:34:07 -05:00
ServeurGoat 3dcf784159 fix: add timeout to app.close()
Signed-off-by: YxnnXriel <yannariel13@gmail.com>
2026-08-12 13:33:10 -05:00
chrnx 7518a5a785 Merge pull request 'release: promote the contributor-facing docs and CI gates to main' (#37) from develop into main
Promote → GitHub / push-github (push) Successful in 7s
CI / dco (push) Has been skipped
CI / build (push) Successful in 34s
2026-08-11 14:48:32 +00:00
chrnx da6099b0e6 Merge pull request 'docs: close the gaps an outside contributor falls into' (#36) from chore/contributor-friction into develop
CI / dco (push) Has been skipped
CI / build (push) Successful in 34s
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 34s
2026-08-11 14:41:02 +00:00
chrnx f200045fd7 chore: put a project address in the package metadata
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 35s
author had no email and bugs had no address, so the only contact npm could show for a
published package was a GitHub issues URL. bugs.email is a field npm actually reads and
npm bugs surfaces, which makes it the right home for the catch-all.

No security address here on purpose: npm has no field for one, an invented key is read by
nothing, and the standard location is /.well-known/security.txt on the domain root, which
this repo does not serve.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 09:32:32 -05:00
chrnx 18d441b3ec docs: set real response times and a disclosure window
3/10 days was a placeholder borrowed from policies written for teams with someone on
rotation. This project is one person, so 5/15 with an escalation address, and an explicit
release from embargo if that also goes unanswered. A reporter facing silence should not
have to guess whether they are allowed to publish.

Adds the 90-day window, which was the real omission: the reporter's question is when they
may disclose, and leaving it unstated invites them to assume CERT/CC's 45.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 09:07:53 -05:00
chrnx 3714f7befc ci: reject commits without a Signed-off-by
CONTRIBUTING said unsigned commits are rejected and nothing enforced it, so the DCO was
caught by hand at review time. That is a full round-trip for a trailer, on top of however
long the fork's first run waits for approval.

Own job, so it reports separately from the code gates and costs nothing on push. Presence
only: whether a trailer that doesn't match the author is acceptable is a reviewer's call,
whether one exists at all is not.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 09:03:03 -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 6fa40672c6 docs: add a code of conduct and a security policy
Both were absent. The code of conduct is Contributor Covenant 2.1 verbatim, with
enforcement pointed at compliance@, which sits outside the project team so a report
about a maintainer has somewhere to go that isn't that maintainer.

The security policy exists so an exploitable finding has a route that isn't a public
issue. States the scope, the response times we can actually hold to, and that there is
no bounty, rather than leaving someone to find that out after the work.

Issue chooser now surfaces both, plus support@ for questions that are about the
reporter's own app rather than a bug here.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 09:02:49 -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 b08ecb66cc chore: ignore bun.lock
Bun writes it on install but nothing reads it: test:bun runs against the
node_modules npm installed, already pinned by package-lock.json. deno.lock
stays tracked because the Deno tests resolve npm:/jsr: specifiers against
registries, where a lockfile is the only thing making them reproducible.

It reached a pull request once already, at 1278 lines.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-11 08:47:50 -05:00
chrnx 9bff2a52c9 Merge pull request 'docs: contributions merge into develop, they no longer need rebasing' (#29) from docs/agents-merge-not-rebase into develop
CI / build (pull_request) Successful in 34s
Promote → GitHub / push-github (push) Successful in 7s
CI / build (push) Successful in 34s
2026-08-10 13:51:09 +00:00
chrnx 551e79a86c docs: contributions merge into develop, they no longer need rebasing
CI / build (pull_request) Successful in 35s
The rebase existed to keep `main`'s history out of `develop` back when the two
had drifted ten commits apart. Fast-forward-only promotions closed that gap
hours after this file was written, and with `develop` and `main` on the same
commit a merge drags nothing in — so rebasing now only rewrites a
contributor's SHAs and drops `contrib` out of `main`'s ancestry, which is what
forces the force-push at reset time.

Proven on the first contribution through the route: the author's commits are
in `develop` under their original hashes, `main` is still an ancestor, and the
reset ahead is a plain fast-forward.

Hotfixes remain the exception, since they reach `main` without passing through
`develop`, so the rebase guidance stays for that case.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-10 08:50:43 -05:00
chrnx 61bef36d60 Merge pull request 'feat: concurrent connection limits, from the first external contribution' (#28) from contrib into develop
CI / build (push) Successful in 34s
2026-08-10 13:41:08 +00:00
chrnx 024b0a79fd Merge pull request #16 from hgshreyas/feature/max-connections
CI / build (push) Successful in 34s
CI / build (pull_request) Successful in 34s
feat: add concurrent connection limits
2026-08-10 08:32:04 -05:00
hgshreyas 8c781c1258 fix: treat non-positive connection limits as unlimited
Signed-off-by: hgshreyas <hgshreyas.cs24@bmsce.ac.in>
2026-08-10 16:14:07 +05:30
chrnx 84a2a29ed6 Merge pull request 'docs: make the base-branch reminder visible in the PR template' (#26) from docs/pr-template-base-branch into develop
CI / build (pull_request) Successful in 34s
Promote → GitHub / push-github (push) Successful in 5s
CI / build (push) Successful in 33s
2026-08-09 16:52:18 +00:00
chrnx 9d8e970c85 docs: make the base-branch reminder visible in the PR template
CI / build (pull_request) Successful in 34s
It sat inside an HTML comment, so it vanished the moment the description
rendered. The second external pull request filled in the checklist and still
targeted `main` — the template was read, the one line that mattered was not.

Now it is a visible blockquote the author is asked to delete, and a checklist
item, so choosing the base is an explicit tick rather than something to skim
past on the way to the boxes.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-09 11:51:56 -05:00
hgshreyas 9e5e5cffe9 feat: add concurrent connection limits
Signed-off-by: hgshreyas <hgshreyas.cs24@bmsce.ac.in>
2026-08-09 17:27:47 +05:30
chrnx beec350fcd Merge pull request 'docs: add AGENTS.md and an AI assistance policy' (#24) from docs/agent-guidance into develop
CI / build (pull_request) Successful in 34s
Promote → GitHub / push-github (push) Successful in 5s
CI / build (push) Successful in 34s
Reviewed-on: #24
2026-08-09 05:45:30 +00: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 1b8f2f3140 Merge pull request 'docs: document the two-forge flow, add PR and issue templates' (#21) from docs/contribution-flow into develop
CI / build (pull_request) Successful in 34s
Promote → GitHub / push-github (push) Successful in 7s
CI / build (push) Successful in 33s
Reviewed-on: #21
2026-08-08 22:42:10 +00:00
chrnx e820954ea8 Merge branch 'develop' into docs/contribution-flow
CI / build (pull_request) Successful in 34s
2026-08-08 22:41:54 +00:00
chrnx 324ddf0d61 Merge pull request 'ci: gate on what we ship, and run the audit after the code checks' (#20) from chore/ci-audit-gate into develop
CI / build (push) Successful in 34s
Reviewed-on: #20
2026-08-08 22:41:34 +00: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 55263f2d97 ci: scope the audit gate to shipped dependencies, and run it last
CI / build (pull_request) Successful in 43s
`npm audit` sat fifth of fifteen steps, so any advisory anywhere in the tree
skipped lint, typecheck, tests and build. A high in a vitest transitive was
enough to hide whether the code itself was correct — and for external
contributors, whose runs need approval before they see anything at all, that
turned a red X into no information.

Severity is the wrong axis: a critical in the test runner reaches nobody,
while a high in `reflect-metadata` reaches everyone. Scope is the right one.
Production dependencies block; build tooling reports and moves on.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-08 17:39:46 -05:00
chrnx 506dedb624 ci: run checks on the contrib branch
External contributions land on `contrib`, and a PR targeting a branch absent
from the trigger list gets no checks at all — leaving contributors without the
feedback that would have caught the failure themselves.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-08 17:39:45 -05:00
chrnx 1030109efa Merge pull request 'release: promote docs and audit fixes to main' (#18) from develop into main
Promote → GitHub / push-github (push) Successful in 6s
CI / build (pull_request) Failing after 15s
CI / build (push) Failing after 11s
Reviewed-on: #18
2026-08-07 21:58:41 +00:00
chrnx 08d92f5de7 Merge pull request 'docs: problem-first README, declared observability gap, docs analytics' (#16) from docs/observability-scope-and-analytics into develop
CI / build (push) Successful in 33s
CI / build (pull_request) Successful in 33s
Reviewed-on: #16
2026-08-07 19:27:49 +00:00