@kumwe/studio-testkit 0.1.0-alpha.6 → 0.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +28 -2
  2. package/corpus-manifest.json +760 -0
  3. package/dist/host-testbed.d.ts.map +1 -1
  4. package/dist/host-testbed.js +131 -0
  5. package/dist/host-testbed.js.map +1 -1
  6. package/dist/http-host-adapter.d.ts.map +1 -1
  7. package/dist/http-host-adapter.js +15 -0
  8. package/dist/http-host-adapter.js.map +1 -1
  9. package/fixtures/field-adapter.example.json +27 -0
  10. package/fixtures/host-capabilities.example.json +9 -3
  11. package/fixtures/host-operations.example.json +270 -0
  12. package/fixtures/inspector.example.json +17 -0
  13. package/fixtures/media-upload-grant.example.json +14 -0
  14. package/fixtures/studio-config.example.json +1 -1
  15. package/invalid/inspector.empty-block-types.json +20 -0
  16. package/invalid/media-upload-grant.insecure-url.json +14 -0
  17. package/invalid/preview-message.activated-unknown-interaction.json +16 -0
  18. package/invalid/preview-message.viewport-role-and-size.json +16 -0
  19. package/package.json +6 -4
  20. package/vectors/canonical/array-order.json +13 -0
  21. package/vectors/canonical/control-characters.json +13 -0
  22. package/vectors/canonical/depth-exceeded.json +21 -0
  23. package/vectors/canonical/empty-containers.json +14 -0
  24. package/vectors/canonical/forbidden-member.json +14 -0
  25. package/vectors/canonical/member-order.json +16 -0
  26. package/vectors/canonical/negative-zero.json +13 -0
  27. package/vectors/canonical/nested-order.json +19 -0
  28. package/vectors/canonical/non-ascii.json +13 -0
  29. package/vectors/canonical/numbers.json +16 -0
  30. package/vectors/canonical/string-escapes.json +13 -0
  31. package/vectors/canonical/surrogate-pair.json +13 -0
  32. package/vectors/host/artifact.dependencies.result.json +35 -0
  33. package/vectors/host/artifact.load.stored.json +36 -0
  34. package/vectors/host/artifact.load.unknown.error.json +37 -0
  35. package/vectors/host/artifact.publish.accepted.json +37 -0
  36. package/vectors/host/artifact.publish.forbidden.error.json +37 -0
  37. package/vectors/host/artifact.publish.stale.error.json +38 -0
  38. package/vectors/host/artifact.save.accepted.json +38 -0
  39. package/vectors/host/artifact.save.forbidden.error.json +38 -0
  40. package/vectors/host/artifact.save.stale.error.json +39 -0
  41. package/vectors/host/artifact.unpublish.stale.error.json +38 -0
  42. package/vectors/host/envelope.malformed-context.error.json +36 -0
  43. package/vectors/host/envelope.protocol-version.error.json +36 -0
  44. package/vectors/host/envelope.stale-generation.error.json +36 -0
  45. package/vectors/host/localization.messages.unknown-locale.error.json +36 -0
  46. package/vectors/host/media.abort-upload.unknown.error.json +35 -0
  47. package/vectors/host/media.authorize-upload.granted.json +37 -0
  48. package/vectors/host/media.authorize-upload.path-filename.error.json +39 -0
  49. package/vectors/host/media.authorize-upload.too-large.error.json +38 -0
  50. package/vectors/host/media.complete-upload.unknown.error.json +36 -0
  51. package/vectors/host/media.get.unknown.json +34 -0
  52. package/vectors/host/media.import-external.private-host.error.json +36 -0
  53. package/vectors/host/media.list.cursor.error.json +36 -0
  54. package/vectors/host/media.list.limit.error.json +35 -0
  55. package/vectors/host/media.upload-status.unknown.error.json +35 -0
  56. package/vectors/host/permission.explain.withheld.json +34 -0
  57. package/vectors/host/permission.refresh.snapshot.json +31 -0
  58. package/vectors/host/recovery.load.absent.json +31 -0
  59. package/vectors/host/telemetry.emit.accepted.json +37 -0
  60. package/vectors/host/telemetry.emit.non-primitive.error.json +40 -0
package/README.md CHANGED
@@ -33,7 +33,33 @@ the `sessionGeneration` getter, and the recorded `telemetryEvents` support asser
33
33
  `createHostRequestContextFixture` builds conforming request envelopes. The testbed uses no clocks,
34
34
  randomness, or timers, so runs are fully reproducible.
35
35
 
36
+ ## Host conformance corpus
37
+
38
+ `@kumwe/studio-testkit/vectors/host/<filename>` publishes the executable assertion set for
39
+ `studio.profile/host-baseline`. Each vector is language-neutral JSON conforming to
40
+ `host-vector.schema.json`: it fixes the host state to seed (`given`), the request envelope and
41
+ argument to send (`context`, `argument`), and the required outcome (`expect`) — an accepted result
42
+ with its revision behaviour, or one category of the closed error taxonomy with its retry
43
+ classification and non-disclosure obligations. Every precondition is a condition a real host
44
+ reproduces, never a test double, so an adapter written in any language replays the corpus in its own
45
+ test suite without executing Studio code. The reference host's own claim against the profile is
46
+ `test/host-vectors.test.ts`. The profile records the obligations it does not yet assert; consult
47
+ `docs/contracts/conformance-profiles.md` before treating a green replay as complete coverage.
48
+
49
+ `@kumwe/studio-testkit/vectors/canonical/<filename>` publishes the canonical serialization corpus:
50
+ each vector carries a bounded value and either the exact canonical string with the SRI-style digest of
51
+ its UTF-8 bytes, or the stable reason the canonical form refuses it. Its expectations were produced by
52
+ an independent canonicalizer rather than recorded from the reference implementation, so replaying it
53
+ is a cross-implementation check.
54
+
55
+ `@kumwe/studio-testkit/corpus-manifest.json` carries the sha256 digest of every file in the published
56
+ corpus, grouped by the directory it ships in. A host that vendors the corpus verifies its copy against
57
+ this manifest, so a stale or altered fixture is detected before it silently changes what a conformance
58
+ claim means. The schema manifest in `@kumwe/studio-protocol` covers the schemas; this covers everything
59
+ replayed against them.
60
+
36
61
  Gate A requires valid and invalid fixture corpora plus runner-neutral assertions for block, theme,
37
62
  plugin, host-port, command, preview, media, compatibility, migration, lifecycle, security,
38
- accessibility, localization, and TypeScript/Dart equivalence. Those remain target deliverables; this
39
- foundation alpha must not be cited as their evidence.
63
+ accessibility, localization, and TypeScript/Dart equivalence. The host-port corpus above is the first
64
+ of those to land; the remainder are target deliverables and this foundation alpha must not be cited as
65
+ their evidence.