[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCWXQAJ1HV3C3MRNFNM6ES":3,"skill-same:01M6CCWXQAJ1HV3C3MRNFNM6ES":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":62,"install":63,"resources":76},"01M6CCWXQAJ1HV3C3MRNFNM6ES","e2e-verify","E2E端到端验证","E2E verification with intent-aware scenario design and multi-probe evidence chains. Supports TWO modes: (A) live server testing with config manipulation, (B) integration test authoring for library\u002Fcore modules. Auto-detects mode from project structure. Use when: (1) user says \"verify\", \"e2e test\", \"production verify\", \"validate module\", \"生产验证\", \"验证模块\", (2) after completing a major feature that adds endpoints, tools, or code paths, (3) user runs \u002Fe2e-verify [target]. Analyzes git diff + user instructions to design positive\u002Fnegative\u002Fboundary scenarios. Flags: --debug (verbose output), --skip-build (reuse last binary).","端到端（E2E）验证，具备意图感知的场景设计与多探针证据链。支持两种模式：（A）通过配置操控对实时服务器进行测试；（B）为库\u002F核心模块编写集成测试。根据项目结构自动检测模式。适用场景：（1）用户说出“verify”“e2e test”“production verify”“validate module”“生产验证”“验证模块”等指令，（2）完成新增端点、工具或代码路径的重要功能后，（3）用户运行 \u002Fe2e-verify [target]。通过分析 git diff 与用户指令来设计正向、反向及边界场景。参数标志：--debug（输出详细信息）、--skip-build（复用上次的二进制文件）。","rootazero\u002FAleph","rootazero","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F124485722?v=4","01M6CCWSEZCM9XS2W4R9XR5YGH",null,"01M6CCWSK4WJ6D0W8VRJNSZZKA",4,"MIT","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fe2e-verify\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"verify","e2e verify","e2e","integration test","design","endpoints","e2e test","modules","evidence","auto","diff","use","debug","testing","boundary","test","server","verification","code","core","2026-11-10 10:12:30",false,"---\nname: e2e-verify\ndescription: >\n  E2E verification with intent-aware scenario design and multi-probe evidence\n  chains. Supports TWO modes: (A) live server testing with config manipulation,\n  (B) integration test authoring for library\u002Fcore modules. Auto-detects mode\n  from project structure. Use when: (1) user says \"verify\", \"e2e test\",\n  \"production verify\", \"validate module\", \"生产验证\", \"验证模块\", (2) after\n  completing a major feature that adds endpoints, tools, or code paths, (3) user\n  runs \u002Fe2e-verify [target]. Analyzes git diff + user instructions to design\n  positive\u002Fnegative\u002Fboundary scenarios.\n  Flags: --debug (verbose output), --skip-build (reuse last binary).\n---\n\n# E2E Verify\n\nNine steps. No skipping.\n\n| # | Step | What happens |\n|---|------|-------------|\n| 0 | Intent Analysis | User instructions + git diff + commit messages → test target list |\n| 1 | Mode Selection | Detect: **Server Mode** (live service) or **Library Mode** (integration tests) |\n| 2 | Coverage Gap Analysis | Existing tests vs diff paths → gap list |\n| 3 | Infrastructure | Server Mode: Kill → Build → Start → Verify. Library Mode: Build → Run existing tests |\n| 4 | Scenario Design | Test cards: positive + negative + boundary per target |\n| 5 | Execute | Server: backup → manipulate → probe → restore. Library: write tests → run → verify |\n| 6 | Report | Evidence-based summary table |\n\n## Step 0: Intent Analysis\n\nCross-reference three sources. Output a test target list.\n\n**Source 1 — User instructions**: Parse `\u002Fe2e-verify provider fallback` for explicit targets. No args → rely on sources 2+3.\n\n**Source 2 — Git diff**: `git diff HEAD~1..HEAD`. If empty, expand N until non-empty or prompt user.\nExtract: new\u002Fmodified functions (→ test targets), new error handling (→ **negative scenarios required**), new config\u002Fbranches (→ **boundary scenarios required**), new tracing (→ available probes).\n\n**Source 3 — Commit messages and existing tests**: Understand intent, find covered vs uncovered paths.\n\n**Output format:**\n```\nTest Targets:\n1. [positive] Normal request completes — source: user + diff\n2. [negative] Fallback on primary failure — source: diff (new error handling)\n3. [boundary] All options exhausted → graceful error — source: diff (conditional)\n```\n\n**Negative scenarios are NOT optional.** If diff contains error handling \u002F fallback \u002F degradation logic, corresponding negative scenarios are mandatory.\n\n## Step 1: Mode Selection\n\nDetermine execution mode based on project structure and test target nature.\n\n**Decision criteria:**\n\n| Signal | Mode |\n|--------|------|\n| Changed files are in `src\u002F` library code with no server endpoint | **Library Mode** |\n| Changed files are HTTP handlers \u002F RPC methods \u002F server config | **Server Mode** |\n| Project has `Cargo.toml` with `[[bin]]` and changes are in binary crate | **Server Mode** |\n| Project has `Cargo.toml` with `[lib]` and changes are in library modules | **Library Mode** |\n| Changes span both library and server code | **Both** (library tests first, then server verification) |\n| `scripts\u002F` directory has E2E client scripts | Suggests **Server Mode** available |\n\n**Library Mode** means: write and run integration tests (`cargo test`, `pytest`, `go test`, `jest`).\n**Server Mode** means: start a live server, manipulate its environment, hit it with probes.\n\n```\nMode: Library Mode\nReason: All changes are in core\u002Fsrc\u002Fagent_loop\u002F (library crate, no server endpoints)\nTest runner: cargo test -p alephcore --lib\n```\n\n## Step 2: Coverage Gap Analysis\n\n**Before designing scenarios, analyze what's already covered.**\n\n1. **List existing tests** for changed modules:\n   ```bash\n   # Rust\n   grep -n \"fn test_\\|async fn test_\" \u003Cchanged_files> \u003Ctest_files>\n   # Python\n   grep -n \"def test_\\|class Test\" tests\u002F\n   # JS\u002FTS\n   grep -rn \"it(\\|test(\\|describe(\" __tests__\u002F\n   ```\n\n2. **Map diff paths to tests**: For each function\u002Fbranch added in the diff, check if an existing test exercises that path.\n\n3. **Output gap table:**\n   ```\n   | Code Path | Existing Test | Gap? |\n   |-----------|--------------|------|\n   | stop_hooks block flow | test_hook_block (unit only) | YES — no integration test with main loop |\n   | tool_refresh mid-loop | test_tool_refresh_signal (unit) | YES — no test verifying registry rebuild in loop |\n   | chain_context depth limit | test_child_returns_none | NO — covered |\n   ```\n\n4. **Prioritize gaps** by risk: error handling paths > happy paths > edge cases.\n\n**This step prevents two failure modes:**\n- Writing redundant tests for already-covered paths\n- Missing critical gaps because \"the module has tests\" (but not for the new code)\n\n## Step 3: Infrastructure\n\n### Server Mode\n\nDiscover project specifics from CLAUDE.md, README, Makefile\u002Fjustfile\u002Fpackage.json. Check `scripts\u002F` and `references\u002F` in this skill's directory for existing tools.\n\n**Critical details only:**\n- **Kill**: Read CLAUDE.md for process management rules before killing anything.\n- **Build**: Compile the project. Skip with `--skip-build` flag.\n- **Start**: Start with elevated log level (`RUST_LOG=debug` \u002F `LOG_LEVEL=DEBUG` \u002F equivalent). Redirect stdout+stderr to `\u002Ftmp\u002Fe2e_server.log`. Record original level for restore.\n- **Verify**: If `scripts\u002F` has a client library, use it. Otherwise: `kill -0 $PID` + port check + optional auth.\n\n### Library Mode\n\n- **Build**: Compile and run existing tests for changed modules to establish baseline.\n  ```bash\n  cargo test -p \u003Ccrate> --lib -- \u003Cmodule_path> 2>&1 | tail -20\n  ```\n- **Baseline**: Record pass count. All existing tests must pass before writing new ones.\n- **No Kill\u002FStart\u002FVerify needed** — the test runner is the infrastructure.\n\n## Step 4: Scenario Design\n\nFor each target from Step 0 that has a gap from Step 2, produce a **test card**.\n\n### Server Mode test card:\n\n```\nTarget: [negative] Fallback on primary provider failure\nPreconditions:\n  - Backup: config.toml → config.toml.e2e.bak\n  - Manipulate: Change default provider API key to invalid value\nTrigger: Send chat request requiring LLM response\nExpected:\n  - Log probe: \"fallback\" or \"retry\" pattern in logs\n  - API probe: completed=true, text non-empty\nRestore: config.toml.e2e.bak → config.toml\n```\n\n### Library Mode test card:\n\n```\nTarget: [negative] Stop hook blocks → loop continues with injected message\nSetup:\n  - Mock: ProbeProvider returns [tool_call, completion, completion]\n  - Hook: Shell script that blocks first time (exit 2), allows second (exit 0)\nTrigger: agent.run(\"test blocking hook\", &mut cb)\nAssertions:\n  - result.iterations >= 3 (tool + block + retry)\n  - result.final_text contains expected response\n  - Hook marker file cleaned up\nIsolation: Temp files use unique paths to avoid test interference\n```\n\n**Mandatory scenario rules:**\n\n| Type | Required when | Example |\n|------|--------------|---------|\n| Positive | Always (≥1 per target) | Normal request completes |\n| Negative | Diff has error handling \u002F fallback \u002F degradation | Primary fails → fallback triggers |\n| Boundary | Diff has conditionals \u002F thresholds \u002F null handling | All exhausted → graceful error |\n\n**Enforcement** — if diff adds any of these patterns, negative\u002Fboundary scenarios are mandatory:\n- `fallback`, `retry`, `timeout`, `degrade`, `error`, `recover` (all languages)\n- Rust: `?`, `unwrap_or`, `match Err`, `Option::None`\n- Python: `except`, `try\u002Ffinally`, `raise`\n- Go: `if err != nil`\n- JS\u002FTS: `.catch()`, `try\u002Fcatch`, `??`\n\nIf diff genuinely has no error handling paths, only positive scenarios needed. Do NOT fabricate negative scenarios.\n\n## Probe System\n\n### Server Mode Probes\n\n| Probe | Method | Best for |\n|-------|--------|----------|\n| **Log** | grep `\u002Ftmp\u002Fe2e_server.log` for patterns | Code path verification (fallback triggered?) |\n| **API** | Check response content\u002Fstatus | Functional correctness |\n| **State** | Query DB \u002F check filesystem | Side effects landed? |\n| **Process** | Check port\u002FPID\u002Ffiles | Service behavior |\n\n### Library Mode Probes\n\n| Probe | Method | Best for |\n|-------|--------|----------|\n| **Assertion** | `assert_eq!`, `assert!`, `expect` in test code | Functional correctness |\n| **Capture** | Record provider calls, callback invocations, messages | Code path verification |\n| **Timing** | `Instant::now()` + duration checks | Concurrency \u002F timeout behavior |\n| **Structure** | Inspect message history, registry state after run | Side effects landed? |\n\n**Selection by scenario type:**\n\n| Type | Server Mode | Library Mode |\n|------|-------------|-------------|\n| Positive | API + State | Assertion + Structure |\n| Negative | **Log REQUIRED** + API | **Capture REQUIRED** + Assertion |\n| Boundary | Log + API | Capture + Assertion + Timing |\n\n**The rule that matters most:** For negative scenarios, \"returned success\" alone is NOT proof.\n- Server Mode: Log probe must confirm the error\u002Ffallback path was actually taken.\n- Library Mode: Captured data (provider calls, callback events, message history) must show the error path was exercised. A passing assertion on the final result is insufficient without verifying the intermediate path.\n\n## Step 5: Execute\n\n### Server Mode — Three-phase protocol\n\nPer test card. **Phase C always executes.**\n\n**Phase A — Backup**: Copy each file to `{name}.e2e.bak`. Verify backup exists and matches.\n\n**Phase B — Manipulate + Test + Collect**:\n1. Modify environment per test card\n2. Restart service if needed (keep elevated log level)\n3. Execute trigger\n4. **Collect ALL probe evidence NOW** (before Phase C)\n\n**Phase C — Restore** (mandatory, even on failure):\n1. Restore `.e2e.bak` → original path\n2. Verify checksum match **before** deleting backups\n3. Delete `.e2e.bak` files\n4. Restore original log level; restart if Phase B restarted\n5. **On restore failure**: STOP. Print `cp \u003Cbak> \u003Coriginal>` commands for each file. Do not continue.\n\n**Manipulation methods**: modify config files, set env vars, send special inputs, change endpoints to unreachable addresses.\n\n**Safety**: never modify DB files, never delete files, always restore.\n\n### Library Mode — Write-Run-Verify protocol\n\n**Phase A — Write tests**:\n1. Add test functions to the appropriate test module (prefer existing integration test files)\n2. Construct mock\u002Fprobe infrastructure that captures intermediate state\n3. Set up test conditions through mock configuration (not config file manipulation)\n4. Include assertions for BOTH final result AND intermediate path verification\n\n**Phase B — Run and collect**:\n1. Run only the new tests first to verify they compile and pass\n2. Run the full module test suite to verify no regressions\n3. Record pass counts (before vs after)\n\n**Phase C — Cleanup**:\n1. Remove any temp files created during tests (markers, lock files)\n2. Verify no test pollution (tests must be isolated and idempotent)\n3. If a test uses external resources (temp files, ports), use unique identifiers\n\n**Test isolation rules:**\n- Each test must be independently runnable (`cargo test \u003Ctest_name>`)\n- No shared mutable state between tests (no static mut, no shared temp files without unique names)\n- Async tests must handle cancellation cleanly (no leaked tasks)\n- Temp file paths should include test name or random suffix to prevent collisions\n\n## Step 6: Report\n\n```\n=== E2E Verification Report ===\nProject: {name} | Mode: {Server|Library} | Build: {type} ({duration})\nIntent: {sources} (commits {range})\n\n| # | Type | Target | Result | Evidence |\n|---|------|--------|--------|----------|\n| 1 | positive | ... | PASS | API: completed=true |\n| 2 | negative | ... | PASS | Log: \"fallback to X\" (L847) + API: ok |\n| 3 | boundary | ... | FAIL | Expected: error msg \u002F Actual: panic |\n\nTests: {before_count} → {after_count} (+{new_count} new)\nRestore: {status} | Summary: {pass}\u002F{total} PASS\n```\n\nOn FAIL: cite log lines or assertion output, show expected vs actual, suggest causes.\n\n### Library Mode report additions:\n```\nCoverage Delta:\n  Before: {N} tests in {module}\n  After: {N+M} tests (+{M} new integration probes)\n  New tests:\n    - test_stop_hook_allows_completion (E11, positive)\n    - test_stop_hook_blocks_then_allows (E12, negative)\n    ...\n```\n\n## Red Flags\n\n| Trap | Reality |\n|------|---------|\n| \"API success = fallback worked\" | No log\u002Fcapture probe = unverified |\n| \"No error handling in diff\" | `?`, `unwrap_or`, `else`, `match Err` count |\n| \"Config too complex to modify\" | That's the most important scenario to test |\n| \"Config restored, should be fine\" | Verify checksums |\n| \"Unit tests cover this\" | Unit ≠ E2E integration |\n| \"User didn't ask to test this\" | Git diff did |\n| \"The module has tests already\" | Check the GAP ANALYSIS — new code may be uncovered |\n| \"I'll just test the happy path\" | Diff added error handling → negative scenario is mandatory |\n| \"Library code doesn't need E2E\" | Integration probes through the full call chain ARE E2E for libraries |\n| \"Mock returns success so it works\" | Captured intermediate state must verify the PATH, not just the outcome |\n","# E2E Verify\n\nNine steps. No skipping.\n\n| # | Step | What happens |\n|---|------|-------------|\n| 0 | Intent Analysis | User instructions + git diff + commit messages → test target list |\n| 1 | Mode Selection | Detect: **Server Mode** (live service) or **Library Mode** (integration tests) |\n| 2 | Coverage Gap Analysis | Existing tests vs diff paths → gap list |\n| 3 | Infrastructure | Server Mode: Kill → Build → Start → Verify. Library Mode: Build → Run existing tests |\n| 4 | Scenario Design | Test cards: positive + negative + boundary per target |\n| 5 | Execute | Server: backup → manipulate → probe → restore. Library: write tests → run → verify |\n| 6 | Report | Evidence-based summary table |\n\n## Step 0: Intent Analysis\n\nCross-reference three sources. Output a test target list.\n\n**Source 1 — User instructions**: Parse `\u002Fe2e-verify provider fallback` for explicit targets. No args → rely on sources 2+3.\n\n**Source 2 — Git diff**: `git diff HEAD~1..HEAD`. If empty, expand N until non-empty or prompt user.\nExtract: new\u002Fmodified functions (→ test targets), new error handling (→ **negative scenarios required**), new config\u002Fbranches (→ **boundary scenarios required**), new tracing (→ available probes).\n\n**Source 3 — Commit messages and existing tests**: Understand intent, find covered vs uncovered paths.\n\n**Output format:**\n```\nTest Targets:\n1. [positive] Normal request completes — source: user + diff\n2. [negative] Fallback on primary failure — source: diff (new error handling)\n3. [boundary] All options exhausted → graceful error — source: diff (conditional)\n```\n\n**Negative scenarios are NOT optional.** If diff contains error handling \u002F fallback \u002F degradation logic, corresponding negative scenarios are mandatory.\n\n## Step 1: Mode Selection\n\nDetermine execution mode based on project structure and test target nature.\n\n**Decision criteria:**\n\n| Signal | Mode |\n|--------|------|\n| Changed files are in `src\u002F` library code with no server endpoint | **Library Mode** |\n| Changed files are HTTP handlers \u002F RPC methods \u002F server config | **Server Mode** |\n| Project has `Cargo.toml` with `[[bin]]` and changes are in binary crate | **Server Mode** |\n| Project has `Cargo.toml` with `[lib]` and changes are in library modules | **Library Mode** |\n| Changes span both library and server code | **Both** (library tests first, then server verification) |\n| `scripts\u002F` directory has E2E client scripts | Suggests **Server Mode** available |\n\n**Library Mode** means: write and run integration tests (`cargo test`, `pytest`, `go test`, `jest`).\n**Server Mode** means: start a live server, manipulate its environment, hit it with probes.\n\n```\nMode: Library Mode\nReason: All changes are in core\u002Fsrc\u002Fagent_loop\u002F (library crate, no server endpoints)\nTest runner: cargo test -p alephcore --lib\n```\n\n## Step 2: Coverage Gap Analysis\n\n**Before designing scenarios, analyze what's already covered.**\n\n1. **List existing tests** for changed modules:\n   ```bash\n   # Rust\n   grep -n \"fn test_\\|async fn test_\" \u003Cchanged_files> \u003Ctest_files>\n   # Python\n   grep -n \"def test_\\|class Test\" tests\u002F\n   # JS\u002FTS\n   grep -rn \"it(\\|test(\\|describe(\" __tests__\u002F\n   ```\n\n2. **Map diff paths to tests**: For each function\u002Fbranch added in the diff, check if an existing test exercises that path.\n\n3. **Output gap table:**\n   ```\n   | Code Path | Existing Test | Gap? |\n   |-----------|--------------|------|\n   | stop_hooks block flow | test_hook_block (unit only) | YES — no integration test with main loop |\n   | tool_refresh mid-loop | test_tool_refresh_signal (unit) | YES — no test verifying registry rebuild in loop |\n   | chain_context depth limit | test_child_returns_none | NO — covered |\n   ```\n\n4. **Prioritize gaps** by risk: error handling paths > happy paths > edge cases.\n\n**This step prevents two failure modes:**\n- Writing redundant tests for already-covered paths\n- Missing critical gaps because \"the module has tests\" (but not for the new code)\n\n## Step 3: Infrastructure\n\n### Server Mode\n\nDiscover project specifics from CLAUDE.md, README, Makefile\u002Fjustfile\u002Fpackage.json. Check `scripts\u002F` and `references\u002F` in this skill's directory for existing tools.\n\n**Critical details only:**\n- **Kill**: Read CLAUDE.md for process management rules before killing anything.\n- **Build**: Compile the project. Skip with `--skip-build` flag.\n- **Start**: Start with elevated log level (`RUST_LOG=debug` \u002F `LOG_LEVEL=DEBUG` \u002F equivalent). Redirect stdout+stderr to `\u002Ftmp\u002Fe2e_server.log`. Record original level for restore.\n- **Verify**: If `scripts\u002F` has a client library, use it. Otherwise: `kill -0 $PID` + port check + optional auth.\n\n### Library Mode\n\n- **Build**: Compile and run existing tests for changed modules to establish baseline.\n  ```bash\n  cargo test -p \u003Ccrate> --lib -- \u003Cmodule_path> 2>&1 | tail -20\n  ```\n- **Baseline**: Record pass count. All existing tests must pass before writing new ones.\n- **No Kill\u002FStart\u002FVerify needed** — the test runner is the infrastructure.\n\n## Step 4: Scenario Design\n\nFor each target from Step 0 that has a gap from Step 2, produce a **test card**.\n\n### Server Mode test card:\n\n```\nTarget: [negative] Fallback on primary provider failure\nPreconditions:\n  - Backup: config.toml → config.toml.e2e.bak\n  - Manipulate: Change default provider API key to invalid value\nTrigger: Send chat request requiring LLM response\nExpected:\n  - Log probe: \"fallback\" or \"retry\" pattern in logs\n  - API probe: completed=true, text non-empty\nRestore: config.toml.e2e.bak → config.toml\n```\n\n### Library Mode test card:\n\n```\nTarget: [negative] Stop hook blocks → loop continues with injected message\nSetup:\n  - Mock: ProbeProvider returns [tool_call, completion, completion]\n  - Hook: Shell script that blocks first time (exit 2), allows second (exit 0)\nTrigger: agent.run(\"test blocking hook\", &mut cb)\nAssertions:\n  - result.iterations >= 3 (tool + block + retry)\n  - result.final_text contains expected response\n  - Hook marker file cleaned up\nIsolation: Temp files use unique paths to avoid test interference\n```\n\n**Mandatory scenario rules:**\n\n| Type | Required when | Example |\n|------|--------------|---------|\n| Positive | Always (≥1 per target) | Normal request completes |\n| Negative | Diff has error handling \u002F fallback \u002F degradation | Primary fails → fallback triggers |\n| Boundary | Diff has conditionals \u002F thresholds \u002F null handling | All exhausted → graceful error |\n\n**Enforcement** — if diff adds any of these patterns, negative\u002Fboundary scenarios are mandatory:\n- `fallback`, `retry`, `timeout`, `degrade`, `error`, `recover` (all languages)\n- Rust: `?`, `unwrap_or`, `match Err`, `Option::None`\n- Python: `except`, `try\u002Ffinally`, `raise`\n- Go: `if err != nil`\n- JS\u002FTS: `.catch()`, `try\u002Fcatch`, `??`\n\nIf diff genuinely has no error handling paths, only positive scenarios needed. Do NOT fabricate negative scenarios.\n\n## Probe System\n\n### Server Mode Probes\n\n| Probe | Method | Best for |\n|-------|--------|----------|\n| **Log** | grep `\u002Ftmp\u002Fe2e_server.log` for patterns | Code path verification (fallback triggered?) |\n| **API** | Check response content\u002Fstatus | Functional correctness |\n| **State** | Query DB \u002F check filesystem | Side effects landed? |\n| **Process** | Check port\u002FPID\u002Ffiles | Service behavior |\n\n### Library Mode Probes\n\n| Probe | Method | Best for |\n|-------|--------|----------|\n| **Assertion** | `assert_eq!`, `assert!`, `expect` in test code | Functional correctness |\n| **Capture** | Record provider calls, callback invocations, messages | Code path verification |\n| **Timing** | `Instant::now()` + duration checks | Concurrency \u002F timeout behavior |\n| **Structure** | Inspect message history, registry state after run | Side effects landed? |\n\n**Selection by scenario type:**\n\n| Type | Server Mode | Library Mode |\n|------|-------------|-------------|\n| Positive | API + State | Assertion + Structure |\n| Negative | **Log REQUIRED** + API | **Capture REQUIRED** + Assertion |\n| Boundary | Log + API | Capture + Assertion + Timing |\n\n**The rule that matters most:** For negative scenarios, \"returned success\" alone is NOT proof.\n- Server Mode: Log probe must confirm the error\u002Ffallback path was actually taken.\n- Library Mode: Captured data (provider calls, callback events, message history) must show the error path was exercised. A passing assertion on the final result is insufficient without verifying the intermediate path.\n\n## Step 5: Execute\n\n### Server Mode — Three-phase protocol\n\nPer test card. **Phase C always executes.**\n\n**Phase A — Backup**: Copy each file to `{name}.e2e.bak`. Verify backup exists and matches.\n\n**Phase B — Manipulate + Test + Collect**:\n1. Modify environment per test card\n2. Restart service if needed (keep elevated log level)\n3. Execute trigger\n4. **Collect ALL probe evidence NOW** (before Phase C)\n\n**Phase C — Restore** (mandatory, even on failure):\n1. Restore `.e2e.bak` → original path\n2. Verify checksum match **before** deleting backups\n3. Delete `.e2e.bak` files\n4. Restore original log level; restart if Phase B restarted\n5. **On restore failure**: STOP. Print `cp \u003Cbak> \u003Coriginal>` commands for each file. Do not continue.\n\n**Manipulation methods**: modify config files, set env vars, send special inputs, change endpoints to unreachable addresses.\n\n**Safety**: never modify DB files, never delete files, always restore.\n\n### Library Mode — Write-Run-Verify protocol\n\n**Phase A — Write tests**:\n1. Add test functions to the appropriate test module (prefer existing integration test files)\n2. Construct mock\u002Fprobe infrastructure that captures intermediate state\n3. Set up test conditions through mock configuration (not config file manipulation)\n4. Include assertions for BOTH final result AND intermediate path verification\n\n**Phase B — Run and collect**:\n1. Run only the new tests first to verify they compile and pass\n2. Run the full module test suite to verify no regressions\n3. Record pass counts (before vs after)\n\n**Phase C — Cleanup**:\n1. Remove any temp files created during tests (markers, lock files)\n2. Verify no test pollution (tests must be isolated and idempotent)\n3. If a test uses external resources (temp files, ports), use unique identifiers\n\n**Test isolation rules:**\n- Each test must be independently runnable (`cargo test \u003Ctest_name>`)\n- No shared mutable state between tests (no static mut, no shared temp files without unique names)\n- Async tests must handle cancellation cleanly (no leaked tasks)\n- Temp file paths should include test name or random suffix to prevent collisions\n\n## Step 6: Report\n\n```\n=== E2E Verification Report ===\nProject: {name} | Mode: {Server|Library} | Build: {type} ({duration})\nIntent: {sources} (commits {range})\n\n| # | Type | Target | Result | Evidence |\n|---|------|--------|--------|----------|\n| 1 | positive | ... | PASS | API: completed=true |\n| 2 | negative | ... | PASS | Log: \"fallback to X\" (L847) + API: ok |\n| 3 | boundary | ... | FAIL | Expected: error msg \u002F Actual: panic |\n\nTests: {before_count} → {after_count} (+{new_count} new)\nRestore: {status} | Summary: {pass}\u002F{total} PASS\n```\n\nOn FAIL: cite log lines or assertion output, show expected vs actual, suggest causes.\n\n### Library Mode report additions:\n```\nCoverage Delta:\n  Before: {N} tests in {module}\n  After: {N+M} tests (+{M} new integration probes)\n  New tests:\n    - test_stop_hook_allows_completion (E11, positive)\n    - test_stop_hook_blocks_then_allows (E12, negative)\n    ...\n```\n\n## Red Flags\n\n| Trap | Reality |\n|------|---------|\n| \"API success = fallback worked\" | No log\u002Fcapture probe = unverified |\n| \"No error handling in diff\" | `?`, `unwrap_or`, `else`, `match Err` count |\n| \"Config too complex to modify\" | That's the most important scenario to test |\n| \"Config restored, should be fine\" | Verify checksums |\n| \"Unit tests cover this\" | Unit ≠ E2E integration |\n| \"User didn't ask to test this\" | Git diff did |\n| \"The module has tests already\" | Check the GAP ANALYSIS — new code may be uncovered |\n| \"I'll just test the happy path\" | Diff added error handling → negative scenario is mandatory |\n| \"Library code doesn't need E2E\" | Integration probes through the full call chain ARE E2E for libraries |\n| \"Mock returns success so it works\" | Captured intermediate state must verify the PATH, not just the outcome |\n",{"name":5,"description":7},"main","ad8cf9736a137eb206d78e1db13ac9d452fb27ac",".claude\u002Fskills\u002Fe2e-verify",1,"https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph","https:\u002F\u002Fwww.heyaleph.com","https:\u002F\u002Fgithub.com\u002Frootazero","2026-11-14 12:27:44",{"source":9,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add rootazero\u002FAleph --skill e2e-verify",{"tool":69,"command":70},"bunx","bunx skills add rootazero\u002FAleph --skill e2e-verify",{"tool":72,"command":73},"pnpm","pnpm dlx skills add rootazero\u002FAleph --skill e2e-verify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fe2e-verify\u002FSKILL.md",true,[77,83],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fwebsocket-protocol.md","REFERENCE","参考文档",1811,"https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fe2e-verify\u002Freferences\u002Fwebsocket-protocol.md",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Faleph_e2e_client.py","SCRIPT","脚本",11169,"https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fe2e-verify\u002Fscripts\u002Faleph_e2e_client.py",[90,98,119,130,139,144],{"skillNo":91,"name":92,"nameZh":13,"description":13,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":50},"01M6CCYRW46NCCDBJVXWDRMCFY","invalid-yaml","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmarkdown_skills\u002Finvalid-yaml\u002FSKILL.md",[],[96,97],"invalid yaml","yaml",{"skillNo":99,"name":100,"nameZh":13,"description":101,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":50},"01M6CCYNTM3981CQE5P8RXB6Y1","gh-pr-docker","GitHub PR operations (Aleph enhanced with Docker)","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmarkdown_skills\u002Fgh-pr-docker\u002FSKILL.md",[],[105,106,107,108,109,110,111,112,113,114,115,116,117,118],"gh pr docker","gh","gh pr","pr","docker","github","operations","view","list","write","format","repository","create","cli",{"skillNo":120,"name":121,"nameZh":13,"description":122,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":50},"01M6CCYME2FV26WMXFJHWDC96R","echo-basic","Basic echo command (frontmatter smoke fixture)","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmarkdown_skills\u002Fecho-basic\u002FSKILL.md",[],[126,127,128,129],"echo basic","Echo","smoke","command",{"skillNo":131,"name":132,"nameZh":13,"description":13,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":50},"01M6CCXQT84VNRDQE74JJXSYR8","review-results","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002Freview-results\u002Fskill.md",[],[136,137,138],"review","review results","results",{"skillNo":140,"name":132,"nameZh":13,"description":13,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":50},"01M6CCXFTHNVKMMCP7NTMN5HBM","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002Fdocs\u002Fengineering-reports\u002Freview-results\u002Fskill.md",[],[137,138,136],{"skillNo":145,"name":146,"nameZh":13,"description":147,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":50},"01M6CCXC4B64ACJWTQ033ECE4Y","severed-wire-audit","Find and resolve \"severed wires\" in a codebase — a producer and a consumer both exist and are fully implemented, but the connecting registration \u002F dispatch arm \u002F event subscription \u002F call site between them is missing, so a feature looks broken though both ends are done. dead-code lints CANNOT catch this: the producer isn't dead (it has tests) and the consumer connects to a stub or reads an inert config. Use when a feature \"looks unwired \u002F 没接上 \u002F 两端都在但连线断 \u002F 明明写了却调不到\"; after a refactor or middleware removal, to verify producers still reach consumers; when asked to \"审接缝 \u002F 找断线 \u002F seam audit \u002F wire audit \u002F connection audit\"; or when a method returns NOT_FOUND, a tool the model can't call, an event that never fires, or a config field nothing reads. Triages each finding into CONNECT (fix the wire) \u002F CUT (delete the dead abstraction) \u002F DECIDE (ask the human), enforces read-before-write so dead scaffolding is deleted not reconnected, and installs a grep-diff guard against regression.","https:\u002F\u002Fgithub.com\u002Frootazero\u002FAleph\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsevered-wire-audit\u002FSKILL.md",[],[151,152,153,48,30,154,155,156,40,157,158,159,160,161,162,163,164,41,165,166],"severed wire audit","audit","delete","guard","tool","model","regression","find","decide","broken","connect","ask","read","fix","dispatch","never"]