Commit b15d260
fix(client): bind the five in-repo
* fix(client): bind the five in-repo `return res.json()` methods erased to `Promise< any >`
The sixth erasure spelling: no return annotation and `return res.json()`, whose
published type comes from `lib.dom`'s `Response.json(): Promise< any >`. The
method text names neither `any` nor `Promise` nor `unwrapResponse`, so it is
invisible to every grep the earlier censuses used.
Binds the five whose producers live in this repo, so the true type is
measurable by DRIVING them rather than reading source or asserting a mock:
analytics.query -> BaseResponse & { data: AnalyticsResult }
analytics.meta -> AnalyticsMetadataResponse
analytics.explain -> AnalyticsSqlResponse
automation.trigger -> BaseResponse & { data: AutomationResult }
analytics.queryDataset-> AnalyticsResult (REST-served, no envelope)
`unwrapResponse` strips the `{ success, data }` envelope; `res.json()` does not,
so four of the five resolve to the envelope and the fifth — mounted only by
@objectstack/rest, which ends `res.json(result)` — to the bare payload.
Two spec response types that LOOK like the right binding are narrower than the
contract their route relays (`AnalyticsResultResponseSchema.data.fields` and
`TriggerFlowResponseSchema.data`); binding either would have shipped a false
narrowing, so both annotations bind the producer's contract instead and the
near-miss is pinned.
Deletes exactly the five matching entries from the shrink-only ledger, in the
same commit as the fix, and adds the two halves the pair needs: a driven wire
test and the type-level pins a runtime test cannot express.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
* gate follow-through: resolve the three driven producers from SOURCE, and answer ADR-0087
`check:test-source-alias` and `check:type-source-resolution` both refuse a new
workspace import that resolves through `dist/`, and the driven wire test added
three. Aliased in `vitest.config.ts` and pathed in `tsconfig.json`, one anchored
bare-name rule each. The reason is stronger here than the general one: that
suite's claim is "the annotation matches what the producer sends", so against a
stale `dist` it would certify a declaration that is already false.
The changeset declares BREAKING, so `check-adr-0087-registration` requires the
ledger question answered in writing: `not-required (no-migration-prescription)`
— nothing metadata-shaped moves, so there is no tombstone and nothing for
`objectstack migrate meta` to rewrite.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
* changeset: state the SDK narrowing in the disposition its three siblings use
#8140 / #11925 / #12034 are the same class — a published `@objectstack/client`
return-type narrowing with no metadata surface behind it — and all three record
the no-ADR-0087-entry disposition as prose rather than as a `**BREAKING**`
declaration, which in this repo is the token that routes a change at the
metadata migration ledger. The consumer impact is stated in full (FROM/TO per
method, and the exact reads that stop compiling); what is dropped is a token
that would have claimed a ledger relevance this change does not have.
Recorded on the PR: the ADR-0087 gate has no honest disposition for a published
TYPE-surface narrowing that carries a consumer source-edit prescription and no
metadata migration — filed separately.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
---------
Co-authored-by: Claude <noreply@anthropic.com>return res.json() methods erased to Promise< any >, and measure the 38 third-party ones (#13082)1 parent d48929e commit b15d260
9 files changed
Lines changed: 696 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | | - | |
49 | 44 | | |
50 | 45 | | |
51 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
0 commit comments