{"id":51586022,"url":"https://github.com/waddie/antithesis-sdk-clojure","last_synced_at":"2026-07-11T10:32:17.369Z","repository":{"id":361513722,"uuid":"1254733532","full_name":"waddie/antithesis-sdk-clojure","owner":"waddie","description":"Unofficial idiomatic Clojure SDK for Antithesis","archived":false,"fork":false,"pushed_at":"2026-05-31T01:02:21.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T02:27:59.423Z","etag":null,"topics":["antithesis","clojure","sdk"],"latest_commit_sha":null,"homepage":"https://antithesis.com/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waddie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T00:02:40.000Z","updated_at":"2026-05-31T01:02:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/waddie/antithesis-sdk-clojure","commit_stats":null,"previous_names":["waddie/antithesis-sdk-clojure"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/waddie/antithesis-sdk-clojure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddie%2Fantithesis-sdk-clojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddie%2Fantithesis-sdk-clojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddie%2Fantithesis-sdk-clojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddie%2Fantithesis-sdk-clojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waddie","download_url":"https://codeload.github.com/waddie/antithesis-sdk-clojure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waddie%2Fantithesis-sdk-clojure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35360371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antithesis","clojure","sdk"],"created_at":"2026-07-11T10:32:17.283Z","updated_at":"2026-07-11T10:32:17.359Z","avatar_url":"https://github.com/waddie.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# antithesis-sdk-clojure\n\nUnofficial Clojure SDK for the [Antithesis](https://antithesis.com) continuous\ntesting platform. Instruments Clojure applications to communicate assertions,\nlife-cycle events, and controlled randomness to the Antithesis test environment.\n\n## Installation\n\nAdd the dependency to your `deps.edn`:\n\n```clojure\n{:deps {com.antithesis/sdk-clojure {:mvn/version \"LATEST\"}}}\n```\n\nThe JVM flag `--enable-native-access=ALL-UNNAMED` is required when running\ninside Antithesis.\n\n## Namespaces\n\n| Namespace              | Purpose                        |\n| ---------------------- | ------------------------------ |\n| `antithesis.assert`    | Assertion macros               |\n| `antithesis.lifecycle` | Set-up and event signals       |\n| `antithesis.random`    | Platform-controlled randomness |\n\n## Usage\n\n### Assertions\n\nAll assertions take a `message` string (the property name) and a `details` map\n(arbitrary structured context).\n\n```clojure\n(require '[antithesis.assert :as a])\n\n;; Must be true every time this code is reached\n(a/always (= status :ok) \"Response is ok\" {:status status})\n\n;; Must be true every time, but passes if never reached\n(a/always-or-unreachable (valid? x) \"Input is valid\" {:x x})\n\n;; Must be true at least once across the test run\n(a/sometimes (= role :admin) \"Admin path exercised\" {:user user})\n\n;; Reachability\n(a/reachable \"Error handler reached\" {:code error-code})\n(a/unreachable \"Dead branch\" {})\n```\n\nNumeric and boolean guidance variants emit additional signals to help the\nplatform converge:\n\n```clojure\n(a/always-greater-than latency-ms 0 \"Latency is positive\" {:latency latency-ms})\n(a/sometimes-less-than queue-depth 100 \"Queue drains\" {:depth queue-depth})\n(a/always-some {:connected? connected? :healthy? healthy?} \"System ok\" {})\n(a/sometimes-all {:a? a? :b? b?} \"Both paths taken\" {})\n```\n\n### Lifecycle\n\n```clojure\n(require '[antithesis.lifecycle :as lc])\n\n;; Call once when your service is ready to receive test traffic\n(lc/setup-complete! {:version \"1.2.3\"})\n\n;; Emit a named structured event\n(lc/send-event! \"payment-processed\" {:amount 42.00 :currency \"USD\"})\n```\n\n### Randomness\n\n```clojure\n(require '[antithesis.random :as r])\n\n;; Returns a long controlled by the platform (or java.util.Random outside\n;; Antithesis)\n(r/get-random)\n\n;; Returns a randomly chosen element from a collection\n(r/random-choice [:a :b :c])\n```\n\n## Handler selection\n\nThe SDK selects an output handler once, at first use:\n\n1. **FfiHandler** when running inside Antithesis (JNI library present)\n2. **LocalHandler** when `ANTITHESIS_SDK_LOCAL_OUTPUT` is set to a file path\n   (writes JSONL)\n3. **NoopHandler** otherwise (safe to use in production; `get-random` falls back\n   to `java.util.Random`)\n\n## Development\n\nThis repository is a [Polylith](https://polylith.gitbook.io) monorepo.\n\n```bash\n# Validate workspace\nclj -M:poly check\n\n# Run tests\nclj -M:poly test :dev\n\n# Show component overview\nclj -M:poly info\n```\n\n### Building and installing locally\n\nThe build tooling lives in `projects/antithesis-sdk/`. Run these from the\nrepository root:\n\n```bash\ncd projects/antithesis-sdk\n\n# Clean, compile, and package a JAR\nclj -T:build jar-all\n\n# Install the JAR to your local ~/.m2 cache\nclj -T:build jar-install\n```\n\nAfter `jar-install`, add the library to your project's `deps.edn`:\n\n```clojure\n{:deps {dev.tomwaddington/antithesis-sdk-clj {:mvn/version \"0.0.0-SNAPSHOT\"}}}\n```\n\nSet `VERSION` before building to produce a versioned artifact:\n\n```bash\nVERSION=1.2.3 clj -T:build jar-all\nVERSION=1.2.3 clj -T:build jar-install\n```\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaddie%2Fantithesis-sdk-clojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaddie%2Fantithesis-sdk-clojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaddie%2Fantithesis-sdk-clojure/lists"}