Skip to content

test(verify): type-check the consumer shop with library checks on - #130

Merged
Upd4ting merged 2 commits into
mainfrom
test/verify-shop-lib-check
Nov 13, 2026
Merged

Upd4ting merged 2 commits into
mainfrom
test/verify-shop-lib-check

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Why

The verify-interface harness compiled the consumer shop with --skipLibCheck. The packed interface is linked into the shop's node_modules, so its declarations were never checked. A declaration error like the TS2635 fixed in #129 passed every journey. Consumers on decorators 0.5 hit it, and in our projects skipLibCheck is forbidden. The shop is now type-checked the way those consumers compile it.

What

flowchart LR
  pack["packed interface-data-api"] --> link["linked into shop/node_modules"]
  link --> tsc["tsc shop.ts (no --skipLibCheck)"]
  tsc -- "declaration error" --> fail["consumer-compiles FAIL"]
  tsc -- "clean" --> run["shop starts on mongodb 1.7.0"]
Loading

Proof

Verify run on this head (antelopejs-verify journey <run> --features with all 13 features): 55 of 55 journeys pass.

metadata/consumer-compiles with the run's packed dist/metadata.d.ts put back to the 0.7.1 declaration (typeof ContainerModifier<any>):

FAIL metadata/consumer-compiles (14.9 s)
    07-compile-the-shop-against-the-packed-declarations: the shop compiles against the packed declarations (../../../pack/package/dist/metadata.d.ts(39,48): error TS2635: Type 'typeof ContainerModifier' has no signatures for which the type argument list is applicable.
../../../pack/package/dist/metadata.d.ts(166,74): error TS2635: Type 'typeof ContainerModifier' has no signatures for which the type argument list is applicable.
../../../pack/package/dist/metadata.d.ts(278,76): error TS2635: Type 'typeof ContainerModifier' has no signatures for which the type argument list is applicable.
)
    critical step 07-compile-the-shop-against-the-packed-declarations failed

With the packed declaration restored:

PASS metadata/consumer-compiles (10.7 s)

The same bad declaration under the old flags (--skipLibCheck restored in the harness, uncommitted, on an earlier run of this branch):

PASS metadata/consumer-compiles (3.9 s)

Before the mongodb move, on the first run of this branch, every shop journey failed at ready, with TypeError: interface_database_1.Schema.list is not a function in the ajs project dev stderr. After it, all 55 pass.

pnpm run checks: 11 passed, 0 failed. The harness is not part of the published package:

API: 1 packages, 27 entries unchanged against origin/main (committed HEAD).
API: skipped .agents/skills/formal-field-access, private.
API: skipped .agents/skills/verify-interface, private.
API: skipped test-helper entry ./dist/*.d.ts in .; test helpers need a test runner and are outside both proof halves.
Runtime API: 1 packages, 24 entries unchanged against origin/main (committed HEAD).
Runtime API: skipped test-helper entry ./dist/*.js in .; test helpers need a test runner and are outside both proof halves.
No behavioural probe ran.

Suppressions in authored code files (origin/main and committed HEAD). A lint directive counts once per rule it names; `*` is a directive naming none.
| Suppressions | base | HEAD |
| --- | ---: | ---: |
| Lint suppressions, all rules | 0 | 0 |
| `@ts-expect-error` | 0 | 0 |
| `@ts-ignore` | 0 | 0 |
| `SAFETY:` comments | 3 | 3 |
| Lint config rule-offs, all rules | 0 | 0 |
<!-- antelopejs-proof base=d70049cabad1dbbc12372aedf4de8c149ff3451a head=ae6e8f7bea3a7468008895453b9f3f4976592d13 lines=15 digest=a25aa94954cad44a command: antelopejs-api-diff origin/main -->

@Upd4ting
Upd4ting merged commit f781ade into main Nov 13, 2026
8 checks passed
@Upd4ting
Upd4ting deleted the test/verify-shop-lib-check branch November 13, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant