f1-test-drive
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseF1 Test Drive
F1测试流程
Run comprehensive F1 test drives that validate the full pipeline:
- Issue-tracker behavior
- EdgeWorker execution flow
- Activity rendering/output quality
运行全面的F1测试流程,验证完整的流水线:
- 问题追踪器行为
- EdgeWorker执行流程
- 活动渲染/输出质量
Mission
任务目标
Execute test drives that verify:
- Issue-tracker correctness
- EdgeWorker worktree/session behavior
- Activity output visibility and formatting
执行测试流程以验证:
- 问题追踪器正确性
- EdgeWorker工作树/会话行为
- 活动输出的可见性与格式
Test Drive Protocol
测试流程协议
Phase 1: Setup
第一阶段:环境搭建
-
Create a fresh test repository (if needed):bash
cd apps/f1 ./f1 init-test-repo --path /tmp/f1-test-drive-<timestamp> -
Start F1 server:bash
CYRUS_PORT=3600 CYRUS_REPO_PATH=/tmp/f1-test-drive-<timestamp> bun run apps/f1/server.ts & -
Verify server health:bash
CYRUS_PORT=3600 ./f1 ping CYRUS_PORT=3600 ./f1 status
-
创建新的测试仓库(如有需要):bash
cd apps/f1 ./f1 init-test-repo --path /tmp/f1-test-drive-<timestamp> -
启动F1服务器:bash
CYRUS_PORT=3600 CYRUS_REPO_PATH=/tmp/f1-test-drive-<timestamp> bun run apps/f1/server.ts & -
验证服务器健康状态:bash
CYRUS_PORT=3600 ./f1 ping CYRUS_PORT=3600 ./f1 status
Phase 2: Issue-Tracker Verification
第二阶段:问题追踪器验证
-
Create test issue:bash
CYRUS_PORT=3600 ./f1 create-issue \ --title "<issue title>" \ --description "<issue description>" -
Verify issue ID and issue creation response.
-
创建测试问题:bash
CYRUS_PORT=3600 ./f1 create-issue \ --title "<issue title>" \ --description "<issue description>" -
验证问题ID和问题创建响应。
Phase 3: EdgeWorker Verification
第三阶段:EdgeWorker验证
-
Start agent session:bash
CYRUS_PORT=3600 ./f1 start-session --issue-id <issue-id> -
Monitor activities:bash
CYRUS_PORT=3600 ./f1 view-session --session-id <session-id> -
Verify:
- session started
- activities appear
- agent is processing issue
-
启动agent会话:bash
CYRUS_PORT=3600 ./f1 start-session --issue-id <issue-id> -
监控活动:bash
CYRUS_PORT=3600 ./f1 view-session --session-id <session-id> -
验证以下内容:
- 会话已启动
- 活动已生成
- agent正在处理问题
Phase 3.5: Slack Chat Session Verification (optional)
第三阶段补充:Slack聊天会话验证(可选)
Use when validating the Slack → ChatSessionHandler → ClaudeRunner path. F1 exposes a test-only endpoint that injects a synthetic event without going through Slack signature verification ( no-ops Slack API calls when is undefined).
/cli/dispatch-chatapp_mentionSlackChatAdapterslackBotToken-
Dispatch a synthetic chat event:bash
CYRUS_PORT=3600 ./f1 start-chat-session \ --channel C_TEST_CHAN \ --user U_TEST_USER \ --text "hello"The response contains aof the formthreadKey. Reuse the same<channel>:<ts>to address the same chat thread on subsequent dispatches.--thread-ts -
Verify shared auto-memory wiring:
- The chat workspace exists at .
<cyrusHome>/slack-workspaces/<sanitized-threadKey>/ - The shared auto-memory directory exists (or is lazily creatable) at .
<cyrusHome>/slack-memory/ - The event emitted by
claude_query_optionscarriesClaudeRunner.cqo.settingsAutoMemoryDirectory=<cyrusHome>/slack-memory
- The chat workspace exists at
-
Verify per-thread workspace isolation alongside shared memory:
- Dispatch a second event in a different channel/thread.
- Confirm a separate directory exists (workspaces remain isolated).
slack-workspaces/<other-thread-key>/ - Confirm both dispatches' telemetry resolve to the same path (memory is shared).
slack-memory
用于验证Slack → ChatSessionHandler → ClaudeRunner流程。F1提供了一个仅用于测试的端点,可注入模拟的事件,无需经过Slack签名验证(当未定义时,会让Slack API调用无操作)。
/cli/dispatch-chatapp_mentionslackBotTokenSlackChatAdapter-
分发模拟聊天事件:bash
CYRUS_PORT=3600 ./f1 start-chat-session \ --channel C_TEST_CHAN \ --user U_TEST_USER \ --text "hello"响应包含格式为的<channel>:<ts>。后续分发时可复用相同的threadKey来定位同一聊天线程。--thread-ts -
验证共享自动内存配置:
- 聊天工作区存在于路径下。
<cyrusHome>/slack-workspaces/<sanitized-threadKey>/ - 共享自动内存目录存在(或可延迟创建)于路径下。
<cyrusHome>/slack-memory/ - 发出的
ClaudeRunner事件包含claude_query_options配置。cqo.settingsAutoMemoryDirectory=<cyrusHome>/slack-memory
- 聊天工作区存在于
-
验证线程专属工作区隔离与共享内存并存:
- 在不同的频道/线程中分发第二个事件。
- 确认存在独立的目录(工作区保持隔离)。
slack-workspaces/<other-thread-key>/ - 确认两次分发的遥测数据指向同一个路径(内存共享)。
slack-memory
Phase 4: Renderer Verification
第四阶段:渲染器验证
-
Validate activity payload quality:
- expected types (for example ,
thought,action)response - timestamps present
- content well-formed and readable
- expected types (for example
-
Validate pagination behavior:bash
CYRUS_PORT=3600 ./f1 view-session --session-id <session-id> --limit 10 --offset 0
-
验证活动负载质量:
- 符合预期的类型(例如、
thought、action)response - 包含时间戳
- 内容格式规范且可读
- 符合预期的类型(例如
-
验证分页行为:bash
CYRUS_PORT=3600 ./f1 view-session --session-id <session-id> --limit 10 --offset 0
Phase 5: Cleanup
第五阶段:环境清理
-
Stop active session:bash
CYRUS_PORT=3600 ./f1 stop-session --session-id <session-id> -
Stop background server process.
-
停止活跃会话:bash
CYRUS_PORT=3600 ./f1 stop-session --session-id <session-id> -
停止后台服务器进程。
Reporting Format
报告格式
Write report under :
apps/f1/test-drives/markdown
undefined在目录下撰写报告:
apps/f1/test-drives/markdown
undefinedTest Drive #NNN: [Goal Description]
Test Drive #NNN: [Goal Description]
Date: YYYY-MM-DD
Goal: [One sentence]
Test Repo: [Path]
Date: YYYY-MM-DD
Goal: [One sentence]
Test Repo: [Path]
Verification Results
Verification Results
Issue-Tracker
Issue-Tracker
- Issue created
- Issue ID returned
- Issue metadata accessible
- Issue created
- Issue ID returned
- Issue metadata accessible
EdgeWorker
EdgeWorker
- Session started
- Worktree created (if applicable)
- Activities tracked
- Agent processed issue
- Session started
- Worktree created (if applicable)
- Activities tracked
- Agent processed issue
Renderer
Renderer
- Activity format correct
- Pagination works
- Search works
- Activity format correct
- Pagination works
- Search works
Session Log
Session Log
[commands + key outputs + pass/fail]
[commands + key outputs + pass/fail]
Final Retrospective
Final Retrospective
[what worked, issues, recommendations]
undefined[what worked, issues, recommendations]
undefinedPass/Fail Criteria
通过/失败标准
Pass when:
- Server starts
- Issue created successfully
- Session starts and activities appear
- Activity payloads are coherent
- Session stops cleanly
- No unhandled errors
Fail when:
- server startup fails
- issue creation fails
- session does not start
- no activities after reasonable wait
- malformed activity data
- unhandled exceptions
满足以下条件则通过:
- 服务器成功启动
- 问题创建成功
- 会话启动且活动生成
- 活动负载内容连贯
- 会话正常停止
- 无未处理错误
出现以下情况则失败:
- 服务器启动失败
- 问题创建失败
- 会话无法启动
- 等待合理时间后仍无活动生成
- 活动数据格式错误
- 出现未处理异常
Important Notes
重要注意事项
- Prefer fixed port unless already in use.
3600 - Use fresh test repos per drive.
- Preserve failed state when debugging.
- For major runner/harness changes, run at least one F1 end-to-end validation before merge.
- 优先使用固定端口,除非该端口已被占用。
3600 - 每次测试流程使用新的测试仓库。
- 调试时保留失败状态。
- 对于runner/harness的重大变更,合并前至少运行一次F1端到端验证。
Multi-Harness Note
多适配层说明
This skill is intentionally harness-agnostic:
- Claude subagents can call this skill.
- Codex/OpenCode workflows can reference the same skill content.
- Harness-specific adapters should be thin wrappers around this canonical skill.
本技能设计为适配层无关:
- Claude子agent可调用本技能。
- Codex/OpenCode工作流可引用相同的技能内容。
- 适配层专属的适配器应作为本标准技能的轻量包装。