Exporting a provider whose value was a connection pool produced HTTP 200 and {}. JSON keeps the shape and discards everything else, so what arrived passed every truthiness check, had no methods, and failed as db.query is not a function at a call site arbitrarily far from the cause. Nothing warned, at either end.
The teapot now checks before sending — the only place the evidence still exists, since past encode() a pool and an empty object are the same bytes:
mesh cannot transport 'db': result.db is a Pool instance
An allowlist, so Date is refused too: it would arrive as a string rather than the declared type. Bounded by a scan budget so a large legitimate payload is never turned into an error by the cost of checking it.
The limit this exposes is what makes #50 (an executable provider) the missing shape rather than a nicety. Docs: green-tea-docs#4.
442 vitest / 12 Deno / 7 Bun / edge / JSR dry run. All 5 new tests verified to fail against the old code.
Apilado sobre #49.
Exporting a provider whose value was a connection pool produced **HTTP 200 and `{}`**. JSON keeps the shape and discards everything else, so what arrived passed every truthiness check, had no methods, and failed as `db.query is not a function` at a call site arbitrarily far from the cause. Nothing warned, at either end.
The teapot now checks before sending — the only place the evidence still exists, since past `encode()` a pool and an empty object are the same bytes:
```
mesh cannot transport 'db': result.db is a Pool instance
```
An allowlist, so `Date` is refused too: it would arrive as a string rather than the declared type. Bounded by a scan budget so a large legitimate payload is never turned into an error by the cost of checking it.
The limit this exposes is what makes #50 (an executable provider) the missing shape rather than a nicety. Docs: green-tea-docs#4.
442 vitest / 12 Deno / 7 Bun / edge / JSR dry run. All 5 new tests verified to fail against the old code.
Exporting a provider whose value was a connection pool produced HTTP 200 and
on the other side. JSON keeps the shape and discards everything else, so
what arrived was an object that passed every truthiness check and had no
methods — and the failure surfaced as `db.query is not a function` at a call
site arbitrarily far from the export that caused it. Nothing warned, at either
end, at any point.
The teapot now checks before sending, which is the only place the evidence
still exists: past encode() a pool and an empty object are the same bytes.
An allowlist rather than a denylist. Date is refused too — it would arrive as
a string rather than the declared type, which is the same silent difference
wearing a smaller costume. Bounded by a scan budget so a large legitimate
payload is never turned into an error by the cost of checking it.
The constraint this makes visible was never written down anywhere: a mesh
export carries data, never behaviour. Export what the handle produces rather
than the handle. That limit is what makes an 'executable provider' (#50) the
missing shape rather than a nicety.
442 vitest / 12 Deno / 7 Bun / edge / JSR dry run. All 5 new tests verified to
fail against the old code.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
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.
Apilado sobre #49.
Exporting a provider whose value was a connection pool produced HTTP 200 and
{}. JSON keeps the shape and discards everything else, so what arrived passed every truthiness check, had no methods, and failed asdb.query is not a functionat a call site arbitrarily far from the cause. Nothing warned, at either end.The teapot now checks before sending — the only place the evidence still exists, since past
encode()a pool and an empty object are the same bytes:An allowlist, so
Dateis refused too: it would arrive as a string rather than the declared type. Bounded by a scan budget so a large legitimate payload is never turned into an error by the cost of checking it.The limit this exposes is what makes #50 (an executable provider) the missing shape rather than a nicety. Docs: green-tea-docs#4.
442 vitest / 12 Deno / 7 Bun / edge / JSR dry run. All 5 new tests verified to fail against the old code.
Pull request closed