antithesis-launch

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Antithesis Launch

Antithesis 运行启动

Prerequisites

前置条件

  • DO NOT PROCEED if
    snouty
    is not installed. See
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
    for installation options.
  • 如果未安装
    snouty
    ,请勿继续操作。查看
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
    获取安装选项。

Goal

目标

Launch an Antithesis run in this order only:
  1. docker compose build
  2. snouty validate
  3. if validation fails, stop and report the error
  4. snouty run
仅按以下顺序启动Antithesis运行:
  1. docker compose build
  2. snouty validate
  3. 如果验证失败,停止操作并报告错误
  4. snouty run

Required Input

必填输入

  • duration
    in minutes is required. If the user did not provide it, ask before submitting the run.
  • 必须提供以分钟为单位的
    duration
    (运行时长)。如果用户未提供,在提交运行前询问用户。

Discovery

探索步骤

  • Start from any user-provided path, command, or Antithesis directory name.
  • Otherwise, inspect the repo to understand how the harness is wired. Check nearby
    AGENTS.md
    ,
    README*
    ,
    Makefile*
    , and Antithesis-specific scripts before choosing commands.
  • Find the config directory by locating the
    docker-compose.yaml
    intended for Antithesis. Prefer directories like
    antithesis/config
    , but support non-standard layouts.
  • Treat these as strong Antithesis signals: nearby
    scratchbook/
    or
    test/
    directories, compose content mentioning
    /opt/antithesis
    ,
    ANTITHESIS_
    env vars,
    setup_complete
    , or existing
    snouty
    examples.
  • If multiple compose files look plausible, prefer the one referenced by repo docs or existing
    snouty run
    examples. If the choice is still ambiguous, ask the user instead of guessing.
  • Use the directory containing
    docker-compose.yaml
    as the
    snouty validate <CONFIG>
    and
    snouty run --config <CONFIG>
    argument.
  • Build against that exact file with
    docker compose -f <CONFIG>/docker-compose.yaml build
    . If
    docker compose
    is unavailable, fall back to
    docker-compose -f ... build
    .
  • 从用户提供的路径、命令或Antithesis目录名称开始。
  • 若用户未提供上述信息,则检查代码仓库以了解测试harness的架构。在选择命令前,先查看附近的
    AGENTS.md
    README*
    Makefile*
    以及Antithesis专用脚本。
  • 通过定位用于Antithesis的
    docker-compose.yaml
    文件找到配置目录。优先选择
    antithesis/config
    这类目录,但也支持非标准布局。
  • 将以下内容视为明确的Antithesis标识:附近的
    scratchbook/
    test/
    目录、compose文件中提及
    /opt/antithesis
    ANTITHESIS_
    环境变量、
    setup_complete
    ,或已有的
    snouty
    示例。
  • 如果有多个compose文件看起来都合理,优先选择仓库文档或现有
    snouty run
    示例中引用的文件。如果仍无法确定,询问用户而非猜测。
  • 将包含
    docker-compose.yaml
    的目录作为
    snouty validate <CONFIG>
    snouty run --config <CONFIG>
    的参数。
  • 使用
    docker compose -f <CONFIG>/docker-compose.yaml build
    命令针对该文件构建镜像。如果
    docker compose
    不可用,回退到
    docker-compose -f ... build
    命令。

Run Arguments

运行参数

  • Determine the webhook in this order: explicit user input, existing repo docs/scripts/examples, otherwise default to
    basic_test
    .
  • snouty run --config
    requires
    ANTITHESIS_REPOSITORY
    . Reuse the current environment if it is already set. If not, stop and ask the user for it.
  • Always set all of these explicitly:
    • --duration
      : the user-provided duration
    • --source
      : repo name
    • --test-name
      : repo name plus branch or config name
    • --description
      : short, readable description of the run, including details such as the branch name, currently goal, or what you changed since the last run.
  • 按以下顺序确定webhook:用户明确输入、仓库现有文档/脚本/示例、否则默认使用
    basic_test
  • snouty run --config
    需要
    ANTITHESIS_REPOSITORY
    参数。如果当前环境已设置该参数,则复用;否则停止操作并询问用户获取该参数。
  • 始终显式设置以下所有参数:
    • --duration
      :用户提供的运行时长
    • --source
      :仓库名称
    • --test-name
      :仓库名称加上分支或配置名称
    • --description
      :简短易懂的运行描述,包含分支名称、当前目标或自上次运行以来的更改等细节。

Execution

执行步骤

  • These commands can take a long time. Prefer background execution or generous timeouts instead of assuming quick completion.
  • Do not run
    snouty run
    unless the build succeeded and
    snouty validate
    exited successfully.
sh
docker compose -f "$CONFIG_DIR/docker-compose.yaml" build
snouty validate "$CONFIG_DIR"
snouty run \
  --webhook "$WEBHOOK" \
  --config "$CONFIG_DIR" \
  --duration "$DURATION" \
  --source "$SOURCE" \
  --test-name "$TEST_NAME" \
  --description "$DESCRIPTION"
  • 这些命令可能需要较长时间运行。优先选择后台执行或设置充足的超时时间,而非假设会快速完成。
  • 仅在构建成功且
    snouty validate
    命令执行成功后,才运行
    snouty run
    命令。
sh
docker compose -f "$CONFIG_DIR/docker-compose.yaml" build
snouty validate "$CONFIG_DIR"
snouty run \
  --webhook "$WEBHOOK" \
  --config "$CONFIG_DIR" \
  --duration "$DURATION" \
  --source "$SOURCE" \
  --test-name "$TEST_NAME" \
  --description "$DESCRIPTION"

Output

输出要求

  • Report the config directory, compose build command, validate command, and final
    snouty run
    command shape before submission.
  • If validation fails, stop immediately and show the failing command plus the key error.
  • 在提交前,报告配置目录、compose构建命令、验证命令以及最终
    snouty run
    命令的格式。
  • 如果验证失败,立即停止操作并显示失败的命令以及关键错误信息。

Self-Review

自我检查

  • The chosen config directory is the one that actually contains the Antithesis
    docker-compose.yaml
    .
  • The build, validate, and run steps all point at the same config.
  • snouty validate
    succeeded before
    snouty run
    was invoked.
  • The run set
    source
    ,
    test-name
    ,
    description
    , and
    duration
    explicitly.
  • Missing blockers such as
    duration
    ,
    ANTITHESIS_REPOSITORY
    , or an ambiguous config location caused a stop instead of a bad submission.
  • 所选的配置目录确实包含Antithesis的
    docker-compose.yaml
    文件。
  • 构建、验证和运行步骤都指向同一个配置。
  • 在调用
    snouty run
    之前,
    snouty validate
    已执行成功。
  • 运行命令已显式设置
    source
    test-name
    description
    duration
    参数。
  • 若存在缺失的必要项(如
    duration
    ANTITHESIS_REPOSITORY
    )或配置位置不明确的情况,已停止操作而非提交错误的运行请求。