You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/uts-to-kotlin/SKILL.md
+79-23Lines changed: 79 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
---
2
-
description: "Translate the UTS pseudocode test specs in a whole module directory into runnable Kotlin tests in the ably-java uts module. Takes a UTS module directory (e.g. <cloned-ably-specification-repo-path>/uts/objects), validates its structure, resolves the target ably-java module, lets you pick a tier (unit/integration/proxy) and which specs, then derives a Kotlin test per spec. Usage: /uts-to-kotlin <path-to-uts-module-directory>"
2
+
description: "Translate the UTS pseudocode test specs in a whole module directory into runnable Kotlin tests in the owning ably-java module (:java for realtime/rest, :liveobjects for objects; :uts hosts the shared infra + smoke examples). Takes a UTS module directory (e.g. <cloned-ably-specification-repo-path>/uts/objects), validates its structure, resolves the target ably-java module, lets you pick a tier (unit/integration/proxy) and which specs, then derives a Kotlin test per spec. Usage: /uts-to-kotlin <path-to-uts-module-directory>"
3
3
allowed-tools: Bash, Read, Edit, Write, WebFetch
4
4
---
5
5
6
6
Translate the UTS pseudocode test specs under the **module directory**`$ARGUMENTS` into runnable Kotlin
7
-
tests in the ably-java `uts` module.
7
+
tests in the owning ably-java module (`:java` for realtime/rest, `:liveobjects` for objects; `:uts` hosts
8
+
the shared infra + smoke examples).
8
9
9
10
`$ARGUMENTS` is a UTS *module* directory — a directory sitting directly under the spec repo's `uts/`,
10
11
e.g. `<cloned-ably-specification-repo-path>/uts/objects`. Its name (`objects`, `realtime`,
**Adapted assertion** — when you still want to assert on the SDK's actual behaviour to prevent regressions:
534
+
**Adapted assertion** — assert the SDK's actual behaviour to prevent regressions. **Prefer this over an env-gated skip when the divergence is permanent or intentional** (a running test guards regressions; a permanently-skipped spec assertion verifies nothing):
@@ -502,8 +556,10 @@ fun `RTLC7c2 - LOCAL source does not write siteTimeserials`() = runTest {
502
556
503
557
### Deviations file
504
558
505
-
Append to `uts/src/test/kotlin/io/ably/lib/uts/deviations.md`, using the manual's **Recording deviations**
506
-
entry format and sections. The ably-java-specific mapping: a **UTS Spec Error** (test fails fast — fix in
559
+
Append to the deviations file that belongs to the tier's module:
560
+
`lib/src/test/kotlin/io/ably/lib/uts/deviations.md` for realtime/rest tiers (module `:java`), or
561
+
`liveobjects/src/test/kotlin/io/ably/lib/liveobjects/uts/deviations.md` for objects/unit. Use the manual's
562
+
**Recording deviations** entry format and sections. The ably-java-specific mapping: a **UTS Spec Error** (test fails fast — fix in
507
563
the spec) goes under the manual's *UTS Spec Errors* section; an **SDK deviation** (env-gated/adapted — fix
508
564
in the SDK) goes under *Failing Tests* / *Adapted Tests*.
509
565
@@ -589,7 +645,7 @@ For each test case, verify:
589
645
Deviations are discovered by running, so this check applies in evaluate mode. For any place where the
590
646
generated test diverges from the spec pseudocode (adapted assertion, env-gated skip, or omitted step):
591
647
-[ ] A `// DEVIATION:` comment explains why
592
-
-[ ] The deviation is recorded in `uts/src/test/kotlin/io/ably/lib/uts/deviations.md`
648
+
-[ ] The deviation is recorded in `lib/src/test/kotlin/io/ably/lib/uts/deviations.md`
593
649
594
650
If you find gaps during this review, fix them, then **re-run the audit script** until `missingInKotlin` /
595
651
`orphanInKotlin` are empty and every `perTest` entry reconciles, and re-run Step 5 (compile) — and, in
@@ -668,7 +724,7 @@ Use generous timeouts (10–30s) — real network is involved. Everything else i
668
724
669
725
### Infrastructure
670
726
671
-
Three helpers live under `uts/src/test/kotlin/io/ably/lib/uts/infra/integration/`. **Read the ones your tier uses before translating an integration spec** — they hold the exact method signatures. `SandboxApp` serves **both** tiers; `ProxyManager` and `ProxySession` are **proxy-only**.
727
+
Three helpers live under `uts/src/main/kotlin/io/ably/lib/uts/infra/integration/`. **Read the ones your tier uses before translating an integration spec** — they hold the exact method signatures. `SandboxApp` serves **both** tiers; `ProxyManager` and `ProxySession` are **proxy-only**.
672
728
673
729
-**`ProxyManager`** (`infra/integration/proxy/ProxyManager.kt`, package `io.ably.lib.uts.infra.integration.proxy`) — downloads/starts the shared `uts-proxy` process. Call `ProxyManager.ensureProxy()` once per suite in setup.
674
730
-**`ProxySession`** (`infra/integration/proxy/ProxySession.kt`, same package) — one programmable session wrapping the proxy control API; also defines the `connectThroughProxy` extension and the rule-builder helpers.
0 commit comments