antithesis-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Antithesis Setup

Antithesis 环境搭建

Purpose and Goal

目的与目标

Scaffold the
antithesis/
harness needed to bring the system up in Antithesis in a mostly idle, ready state.
Success means:
  • antithesis/config/docker-compose.yaml
    exists and required SUT images are referenced with
    build:
    directives
  • snouty validate
    on
    antithesis/config/
    succeeds
  • the SUT dependency graph includes the relevant Antithesis SDK where assertions or lifecycle hooks will run
  • at least one minimal bootstrap property exists in a simple SUT path and is expected to show up in the first Antithesis run
  • The harness is ready for the
    antithesis-workload
    skill to add or iterate on test templates, assertions, and workload code
搭建
antithesis/
目录下的测试框架,使系统能在Antithesis中以基本空闲、就绪的状态启动。
成功标志:
  • antithesis/config/docker-compose.yaml
    已存在,且所需的SUT镜像通过
    build:
    指令引用
  • antithesis/config/
    执行
    snouty validate
    验证通过
  • SUT依赖图包含相关的Antithesis SDK,该SDK将用于运行断言或生命周期钩子
  • 在简单的SUT路径中至少存在一个最小的启动属性,且预期会在首次Antithesis运行中显示
  • 测试框架已准备好使用
    antithesis-workload
    技能添加或迭代测试模板、断言和工作负载代码

Prerequisites

前置条件

  • DO NOT PROCEED if the Antithesis scratchbook (usually at
    antithesis/scratchbook/
    ) doesn't exist. Use the
    antithesis-research
    skill to create it.
  • DO NOT PROCEED if
    snouty
    is not installed. See
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
    for installation options.
  • 如果Antithesis scratchbook(通常位于
    antithesis/scratchbook/
    )不存在,请不要继续操作。使用
    antithesis-research
    技能创建它。
  • 如果未安装
    snouty
    ,请不要继续操作。查看
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
    获取安装选项。

Documentation Grounding

文档参考

Use the
antithesis-documentation
skill to access these pages. Prefer
snouty docs
.
  • Docker Compose setup guide:
    https://antithesis.com/docs/getting_started/setup/
  • Docker best practices:
    https://antithesis.com/docs/best_practices/docker_best_practices/
  • Coverage instrumentation:
    https://antithesis.com/docs/instrumentation/coverage_instrumentation/
  • Assertion cataloging:
    https://antithesis.com/docs/instrumentation/assertion_cataloging/
  • Handling external dependencies:
    https://antithesis.com/docs/reference/dependencies/
  • Fault injection:
    https://antithesis.com/docs/environment/fault_injection/
使用
antithesis-documentation
技能访问以下页面。优先使用
snouty docs
命令。
  • Docker Compose设置指南:
    https://antithesis.com/docs/getting_started/setup/
  • Docker最佳实践:
    https://antithesis.com/docs/best_practices/docker_best_practices/
  • 覆盖率插桩:
    https://antithesis.com/docs/instrumentation/coverage_instrumentation/
  • 断言编目:
    https://antithesis.com/docs/instrumentation/assertion_cataloging/
  • 外部依赖处理:
    https://antithesis.com/docs/reference/dependencies/
  • 故障注入:
    https://antithesis.com/docs/environment/fault_injection/

Workflow

工作流程

This skill is broken out into multiple steps, each in a different reference file. Read and implement each reference file listed below one at a time to fully set up a project.
  • references/directory-init.md
    : initialize or merge the
    antithesis/
    directory from
    assets/antithesis/
  • references/instrumentation.md
    : decide how each SUT service is instrumented, how the SDK is installed, how symbols are delivered, and where the bootstrap property lives
  • references/docker-images.md
    : create or adapt Dockerfiles for SUT components
  • references/docker-compose.md
    : write
    antithesis/config/docker-compose.yaml
  • references/config-dir.md
    : understand what belongs in
    antithesis/config/
  • references/submit-and-test.md
    : test locally and submit the first run
本技能分为多个步骤,每个步骤对应不同的参考文件。请依次阅读并实现以下列出的每个参考文件,以完成项目的完整设置。
  • references/directory-init.md
    :从
    assets/antithesis/
    初始化或合并
    antithesis/
    目录
  • references/instrumentation.md
    :确定每个SUT服务的插桩方式、SDK的安装方式、符号的交付方式以及启动属性的位置
  • references/docker-images.md
    :为SUT组件创建或适配Dockerfile
  • references/docker-compose.md
    :编写
    antithesis/config/docker-compose.yaml
  • references/config-dir.md
    :了解
    antithesis/config/
    目录下应包含的内容
  • references/submit-and-test.md
    :本地测试并提交首次运行

General Guidance

通用指南

  • Merge with existing
    antithesis/
    content instead of overwriting it.
  • Prefer
    podman compose
    for local testing; fall back to
    docker compose
    .
  • Keep Antithesis-only scaffolding under
    antithesis/
    when practical.
  • Focus this skill on infrastructure and readiness, not on defining the workload itself.
  • Installing the relevant Antithesis SDK into the SUT and adding one minimal bootstrap assertion is part of setup, not deferred workload work.
  • If
    antithesis/test/
    does not exist yet, create the directory structure needed for later workload work, but leave real test templates and assertions to
    antithesis-workload
    .
  • Treat instrumentation and symbolization as bootstrap work. The setup is not complete until the relevant images expose
    /opt/antithesis/catalog/
    or
    /symbols/
    correctly for their language.
  • Treat local testing as required before the first submission.
  • Use
    snouty run
    directly to submit runs. Run
    compose build
    before
    snouty run
    to ensure images are up to date.
  • Do not add a separate Dockerfile under
    antithesis/config/
    unless the deployment explicitly requires it.
  • 与已有的
    antithesis/
    目录内容合并,而非覆盖。
  • 优先使用
    podman compose
    进行本地测试; fallback到
    docker compose
  • 尽可能将仅属于Antithesis的框架文件放在
    antithesis/
    目录下。
  • 本技能专注于基础设施和就绪状态,而非定义工作负载本身。
  • 将相关的Antithesis SDK安装到SUT中,并添加一个最小的启动断言,这是设置工作的一部分,而非延迟到工作负载阶段。
  • 如果
    antithesis/test/
    目录尚未存在,创建后续工作负载所需的目录结构,但实际的测试模板和断言留待
    antithesis-workload
    技能处理。
  • 将插桩和符号化视为启动工作。直到相关镜像为其语言正确暴露
    /opt/antithesis/catalog/
    /symbols/
    目录,设置工作才算完成。
  • 首次提交前必须进行本地测试。
  • 直接使用
    snouty run
    提交运行。在
    snouty run
    之前运行
    compose build
    以确保镜像为最新版本。
  • 除非部署明确要求,否则不要在
    antithesis/config/
    下添加单独的Dockerfile。

Self-Review

自我检查

Before declaring this skill complete, review your work against the criteria below. If your agent supports spawning sub-agents, create a new agent with fresh context to perform this review — give it the path to this skill file and have it read all output artifacts. A fresh-context reviewer catches blind spots that in-context review misses. If your agent does not support sub-agents, perform the review yourself: re-read the success criteria at the top of this file, then systematically check each item below against your actual output.
Review criteria:
  • antithesis/config/docker-compose.yaml
    exists and every service has
    build:
    (for local images) or
    image:
    (for public images) configured correctly
  • Every service in docker-compose.yaml includes
    platform: linux/amd64
  • The instrumentation inventory from
    references/instrumentation.md
    is fully implemented: each service is instrumented, cataloged-only, or explicitly documented as uninstrumented
  • The relevant Antithesis SDK is installed in the SUT dependency graph
  • A bootstrap property exists in a simple, guaranteed-to-run code path (not behind rare behavior)
  • /opt/antithesis/catalog/
    or
    /symbols/
    is exposed correctly for each service's language
  • The
    setup_complete
    signal is wired in at least one entrypoint
  • snouty validate
    on
    antithesis/config/
    succeeds
  • All built images target
    amd64
    (verified via
    podman image inspect
    or
    docker image inspect
    )
  • The harness is ready for the
    antithesis-workload
    skill — test template directories exist or are wired for later use
在声明本技能完成前,请根据以下标准检查你的工作。如果你的Agent支持生成子Agent,请创建一个带有全新上下文的新Agent来执行此检查——将本技能文件的路径提供给它,并让它读取所有输出产物。全新上下文的审查者能发现上下文内审查遗漏的盲点。如果你的Agent不支持子Agent,请自行执行审查:重新阅读本文件顶部的成功标准,然后系统地将以下每一项与你的实际输出进行比对。
检查标准:
  • antithesis/config/docker-compose.yaml
    已存在,且每个服务都正确配置了
    build:
    (针对本地镜像)或
    image:
    (针对公共镜像)
  • docker-compose.yaml中的每个服务都包含
    platform: linux/amd64
  • references/instrumentation.md
    中的插桩清单已完全实现:每个服务都已插桩、仅编目,或明确记录为未插桩
  • SUT依赖图中已安装相关的Antithesis SDK
  • 在简单的、确保会执行的代码路径中存在一个启动属性(而非在罕见行为背后)
  • 每个服务的语言对应的
    /opt/antithesis/catalog/
    /symbols/
    目录已正确暴露
  • 至少一个入口点已连接
    setup_complete
    信号
  • antithesis/config/
    执行
    snouty validate
    验证通过
  • 所有构建的镜像都以
    amd64
    为目标(通过
    podman image inspect
    docker image inspect
    验证)
  • 测试框架已准备好使用
    antithesis-workload
    技能——测试模板目录已存在或已为后续使用做好配置