Update E2E Triage Skill: Clarify real-bug vs flaky/test-bug
Context
The e2e-triage skill has two classifications: real-bug and flaky. The real-bug category should only be for bugs in the CLI product code (cmd/entire/cli/). Test infrastructure issues (auth, env propagation, tmux setup, test helper bugs) should fall under flaky since they're test problems, not product bugs.
Example: fails consistently because doesn't propagate auth env vars. This looks like from re-runs alone (consistent failure), but it's actually a test infra problem — should be classified as (test-bug subtype).
TestInteractiveMultiStep
NewTmuxSession
real-bug
flaky
Changes
File: .claude/skills/e2e-triage/SKILL.md
Step 2 classification signals: Add test-bug indicators to the flaky category:
Agent "Not logged in" / auth errors → test env setup issue, not CLI bug
Env vars not propagated to agent session → tmux/test harness bug
Error references test code (e2e/) not CLI code (cmd/entire/cli/)
Test helper logic errors (wrong assertions, bad globs)
Consistent failure BUT root cause is in e2e/ code, not cmd/entire/cli/
Classification table: Add note that consistent failures can still be flaky if the bug is in test infrastructure, not CLI code. The key question: "Is the bug in cmd/entire/cli/ or in e2e/?"
real-bug signals: Clarify these apply only when the root cause is in CLI product code
Action sections (4a/4b): For test-bug flaky fixes, the fix targets e2e/ code rather than test prompts
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/alisha/.claude/projects/-Users-alisha-Projects-devenv-cli/0282e2ee-e881-46b2-8222-09914d070914.jsonl
Assistant
Now let me apply the changes to clarify real-bug vs flaky/test-bug classification.
Assistant
★ Insight ─────────────────────────────────────
The key insight here is about classification accuracy in triage workflows. A test that fails consistently can still be a test infrastructure bug, not a product bug. The re-run signal (pass/fail pattern) is necessary but not sufficient — you also need to check where the root cause lives (cmd/entire/cli/ vs e2e/). This is a common pitfall in CI triage: conflating "deterministic failure" with "product bug."
─────────────────────────────────────────────────
I'll make the edits in sequence. First, update the classification table to note that consistent failures can still be flaky if the bug is in test infra:
Assistant
Next, add test-bug indicators to the flaky signals section:
Assistant
Now clarify that real-bug signals apply only when root cause is in CLI product code:
Assistant
Now add test-infra fixes to the flaky fixes lists in both Step 4a and 4b:
Assistant
Now add the same test-infra fixes to the CI mode (Step 4b) flaky list:
Assistant
Now update the Step 4a local mode sections to mention that test-bug flaky fixes target e2e/ code. The "For flaky failures" proposed fix template and "For real-bug failures" root cause template need a note:
Assistant
All changes applied. Let me verify the final state looks correct.
Assistant
All five changes are applied. Here's a summary of what was updated in .claude/skills/e2e-triage/SKILL.md:
Classification table (Step 2): The all-fail row now says real-bug OR flaky (test-bug) with a note explaining the distinction — check whether root cause is in cmd/entire/cli/ vs e2e/.
real-bug signals: Header clarified to "(root cause must be in cmd/entire/cli/, not e2e/)" with a key question callout at the bottom.
flaky signals: Split into two sub-sections — "Agent behavior (non-deterministic)" for the existing items, and new "Test-bug" section with indicators like auth errors, env propagation failures, test helper bugs, and errors referencing e2e/ code.
Flaky fixes lists (both 4a and 4b): Added three test-infra fix types: auth/env propagation, test helper bugs, and tmux session setup issues — all targeting e2e/ code.
Step 4a proposed fix template: Added guidance that test-bug flaky fixes target e2e/ infrastructure code rather than test prompts, with updated example text.
★ Insight ─────────────────────────────────────
The core classification change is moving from a 1D signal (pass/fail pattern) to a 2D signal (pass/fail pattern × root cause location). This prevents the common triage mistake of equating "consistent failure" with "product bug."
The flaky (test-bug) subtype is important because it changes the fix target — instead of modifying prompts or CLI code, you fix e2e/ infrastructure. This affects which files get touched in PRs and which team should review.
─────────────────────────────────────────────────
User
commit
User
Context
Current git status: On branch alisha/e2e-triage
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: .claude/skills/e2e-triage/SKILL.md
no changes added to commit (use "git add" and/or "git commit -a")
Current git diff (staged and unstaged changes): diff --git a/.claude/skills/e2e-triage/SKILL.md b/.claude/skills/e2e-triage/SKILL.md
index b8e06ded..8b69d67d 100644
--- a/.claude/skills/e2e-triage/SKILL.md
+++ b/.claude/skills/e2e-triage/SKILL.md
@@ -130,15 +130,19 @@ Use re-run results as the primary signal, supplemented by artifact analysis.
Original
Re-run 1
Re-run 2
Classification
-
FAIL
FAIL (same error)
FAIL (same error)
+
FAIL
FAIL (same error)
FAIL (same error)
FAIL
PASS
PASS
flaky
FAIL
PASS
FAIL
flaky (non-deterministic)
FAIL
FAIL
PASS
flaky (non-deterministic)
FAIL
FAIL (different error)
FAIL (different error)
needs deeper analysis — examine artifacts
-#### Strong real-bug signals (supplement re-runs):
+Important: Consistent failures can still be flaky (test-bug). When all re-runs fail, check where the root cause is:
+- Root cause in cmd/entire/cli/ → real-bug (product code is broken)
+- Root cause in e2e/ (test infra, test helpers, tmux setup, env propagation) → flaky (test-bug) — the CLI works fine, the test is broken
-- entire.log contains "level":"ERROR" or panic/stack traces
+#### Strong real-bug signals (root cause must be in cmd/entire/cli/, not e2e/):
+
+- entire.log contains "level":"ERROR" or panic/stack traces from CLI code
Let me read the existing plan file and start exploring the artifacts.
Assistant
This is a different task — the user is now running the e2e-triage skill against artifacts, not continuing the previous plan. Let me explore the artifacts first.
Assistant
Good — only 1 failure. Let me read the detailed artifacts for that failure to classify it properly.
Assistant
Now let me look at the cursor-cli agent's startup handling to understand how workspace trust is managed, and check if this is a known issue.
Assistant
Now let me check if similar tests had this issue before and look at how other tests succeeded.
Assistant
Now I have a clear picture. Let me also check the resume_test.go around line 84 to understand the test structure.
Assistant
Good — I now have all the information I need. Let me write the plan.
User
[Request interrupted by user for tool use]
User
Shared Analysis & Classification
Step 1: Analyze Each Failure
For each failure, examine available artifacts:
Read console.log — what did the agent actually do? Full chronological transcript.
Read test source at file:line — what was expected?
Read entire-logs/entire.log — any CLI errors, panics, unexpected behavior?
Read git-log.txt / git-tree.txt — repo state at failure time
Read checkpoint-metadata/ — corrupt or missing metadata?
Step 2: Classify Each Failure
Use re-run results as the primary signal, supplemented by artifact analysis.
Re-run signals (strongest):
Original
Re-run 1
Re-run 2
Classification
FAIL
FAIL (same error)
FAIL (same error)
real-bug OR flaky (test-bug) — see below
FAIL
PASS
PASS
flaky
FAIL
PASS
FAIL
flaky (non-deterministic)
FAIL
FAIL
PASS
flaky (non-deterministic)
FAIL
FAIL (different error)
FAIL (different error)
needs deeper analysis — examine artifacts
Important: Consistent failures can still be flaky (test-bug). When all re-runs fail, check where the root cause is:
Root cause in cmd/entire/cli/ → real-bug (product code is broken)
Root cause in e2e/ (test infra, test helpers, tmux setup, env propagation) → flaky (test-bug) — the CLI works fine, the test is broken
Strong real-bug signals (root cause must be in cmd/entire/cli/, not e2e/):
entire.log contains "level":"ERROR" or panic/stack traces from CLI code
gh workflow run e2e-isolated.yml -f agent=<agent> -f test=<TestName>
Wait for run to register (~5s), then find the run ID:
bash
gh run list -w e2e-isolated.yml -L 1 --json databaseId -q '.[0].databaseId'
Poll until complete (check every 30s, timeout after 25 minutes):
bash
gh run view <run-id> --json status,conclusion
Download re-run artifacts:
bash
gh run download <run-id> --dir <rerun-artifact-dir>
Repeat for a second re-run (same test+agent).
Step C4: Collect Results
For each test+agent pair, record: (test, agent, original_result, rerun_1_result, rerun_2_result)
Proceed to Shared Analysis (Step 1 below).
User
Local Mode
Step L1: Parse User Input
The user provides one or more of:
Test name(s) — e.g., TestInteractiveMultiStep
--agent <agent> — optional, defaults to all agents that previously failed
A local artifact path — skip straight to analysis of existing artifacts
Cost warning: Real E2E tests consume API tokens. Before running, confirm with the user unless they provided specific test names (implying intent to run).
Step L2: First Run
bash
mise run test:e2e --agent <agent> <TestName>
Capture the artifact directory from the artifacts: <path> output line.
Step L3: Re-run on Failure
If the test passes on first run: report as passing, done for this test.
If the test fails: run a second time with the same parameters.
Step L4: Tiebreaker (if needed)
If results are split (1 pass, 1 fail): run a third time as tiebreaker.
Step L5: Collect Results
For each test+agent pair, record: (test, agent, run_1_result, run_2_result, [run_3_result])
Proceed to Shared Analysis (Step 1 below).
User
e2e-triage
/e2e-triage
get latest CI run
User
Shared Analysis & Classification
Step 1: Analyze Each Failure
For each failure, examine available artifacts:
Read console.log — what did the agent actually do? Full chronological transcript.
Read test source at file:line — what was expected?
Read entire-logs/entire.log — any CLI errors, panics, unexpected behavior?
Read git-log.txt / git-tree.txt — repo state at failure time
Read checkpoint-metadata/ — corrupt or missing metadata?
Step 2: Classify Each Failure
Use re-run results as the primary signal, supplemented by artifact analysis.
Re-run signals (strongest):
Original
Re-run 1
Re-run 2
Classification
FAIL
FAIL (same error)
FAIL (same error)
real-bug OR flaky (test-bug) — see below
FAIL
PASS
PASS
flaky
FAIL
PASS
FAIL
flaky (non-deterministic)
FAIL
FAIL
PASS
flaky (non-deterministic)
FAIL
FAIL (different error)
FAIL (different error)
needs deeper analysis — examine artifacts
Important: Consistent failures can still be flaky (test-bug). When all re-runs fail, check where the root cause is:
Root cause in cmd/entire/cli/ → real-bug (product code is broken)
Root cause in e2e/ (test infra, test helpers, tmux setup, env propagation) → flaky (test-bug) — the CLI works fine, the test is broken
Strong real-bug signals (root cause must be in cmd/entire/cli/, not e2e/):
entire.log contains "level":"ERROR" or panic/stack traces from CLI code
Re-run results: No re-runs performed (artifact-only analysis — root cause is unambiguous)
Evidence:
Cursor CLI crashed on startup with ENOENT: no such file or directory, rename '/home/runner/.config/cursor/cli-config.json.tmp' -> '/home/runner/.config/cursor/cli-config.json' — the cursor config directory doesn't exist in the CI runner environment
The Workspace Trust dialog appeared but cursor died before acceptTrustDialogIfNeeded() could send "a" to accept it
entire.log shows only normal git hook activity (prepare-commit-msg, post-commit for setup) then session-end — no CLI errors, no panics
42/43 other cursor-cli tests passed in the same run, indicating intermittent startup race on CI
Root cause is in e2e/agents/cursor_cli.go (test infra), NOT cmd/entire/cli/ (product code)
Proposed fix: Pre-create cursor config directory before launching the agent
File: e2e/agents/cursor_cli.go — Bootstrap() or startInteractiveSession()
Change: Add os.MkdirAll(filepath.Join(os.Getenv("HOME"), ".config", "cursor"), 0o755) to ensure the config directory exists before cursor-cli starts, preventing the ENOENT race
Should I fix this?
TestResumeSquashMergeMultipleCheckpoints (cursor-cli) — flaky (test-bug): pre-create ~/.config/cursor/ dir
Session state file missing or malformed when expected
Hooks did not fire at all (no hook invoked log entries)
@@ -146,8 +150,11 @@ Use re-run results as the primary signal, supplemented by artifact analysis.
Same test fails across 3+ agents with same non-timeout symptom
Error references CLI code (panic in cmd/entire/cli/)
+Key question: Is the bug in cmd/entire/cli/ (product code) or in e2e/ (test code)? Only the former is a real-bug.
+
Strong flaky signals (unless overridden by real-bug):
+Agent behavior (non-deterministic):
signal: killed (timeout)
context deadline exceeded or WaitForCheckpoint.*exceeded deadline
Agent asked for confirmation instead of acting
@@ -156,6 +163,14 @@ Use re-run results as the primary signal, supplemented by artifact analysis.
Agent committed when it shouldn't have (or vice versa)
Duration near timeout limit
+Test-bug (consistent failure, but root cause is in e2e/ not cmd/entire/cli/):
+- Agent "Not logged in" / auth errors → test env setup doesn't propagate auth credentials
+- Env vars not propagated to agent session → tmux/test harness bug
+- Error references test code (e2e/) not CLI code (cmd/entire/cli/)
+- Test helper logic errors (wrong assertions, bad globs, incorrect expected values)
+- Consistent failure BUT root cause traced to e2e/ code, not cmd/entire/cli/
+- Test setup/teardown issues (missing git config, temp dir cleanup, port conflicts)
+
Ambiguous cases:
Read entire.log carefully:
@@ -188,10 +203,12 @@ For each test+agent pair, print a findings block:
For flaky failures: describe the proposed fix
+For agent-behavior flaky issues, fixes typically modify test prompts. For test-bug flaky issues, fixes target e2e/ infrastructure code (harness setup, helpers, env propagation).
+
code
**Proposed fix:** <description>
- - File: <path to test file>
- - Change: <what will be modified — e.g., append "Do not ask for confirmation" to prompt>
+ - File: <path to test file or e2e infrastructure file>
+ - Change: <what will be modified — e.g., append "Do not ask for confirmation" to prompt, or fix env propagation in NewTmuxSession>
Common flaky fixes (same as CI mode):
@@ -200,6 +217,9 @@ Common flaky fixes (same as CI mode):
Agent committed when shouldn't -> add "Do not commit" to prompt
Agent timeout (signal: killed) -> increase per-test timeout, simplify prompt
+- Auth/env not propagated -> fix test harness env setup in e2e/ code
+- Test helper bug (wrong assertion, bad glob) -> fix test helper in e2e/
+- tmux session setup issue -> fix NewTmuxSession or session config in e2e/
For real-bug failures: describe root cause analysis
@@ -252,6 +272,9 @@ For real-bug fixes the user approved:
- Agent committed when shouldn't -> add "Do not commit" to prompt
- Checkpoint wait timeout -> increase timeout argument
- Agent timeout (signal: killed) -> increase per-test timeout, simplify prompt
Auth/env not propagated -> fix test harness env setup in e2e/ code
Test helper bug (wrong assertion, bad glob) -> fix test helper in e2e/
tmux session setup issue -> fix NewTmuxSession or session config in e2e/
Run verification:
bash
mise run test:e2e:canary # Must pass
Current branch: alisha/e2e-triage
Recent commits: 1ca90ee4 Split E2E triage Take Action and Summary steps by local vs CI mode
1e50aba5 Add local mode and CI re-run verification to E2E triage skill
3edf654f Fix JSON injection bug and add webhook guards in E2E triage Slack notifications
71218856 Add Slack notifications to E2E triage workflow
b4cd09c3 Add E2E triage automation: skill, CI workflow, and artifact download script
1d44b117 Merge pull request #642 from entireio/soph/copilot-do-what-I-told-ya
93a6c7f4 Merge pull request #643 from pjbgf/bump-gogit
664e25cc Replace empty PlainOpenWithOptions calls with PlainOpen
88ee56bf Bump to go-git/v6
0fa52951 Merge pull request #644 from entireio/soph/fix-releaser
Your task
Based on the above changes, create a single git commit.
You have the capability to call multiple tools in a single response. Stage and create the commit using a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.
checkpoint_id
strategy
Session state file missing or malformed when expected
Hooks did not fire at all (no hook invoked log entries)
Shadow/metadata branch has wrong tree structure
Same test fails across 3+ agents with same non-timeout symptom
Error references CLI code (panic in cmd/entire/cli/)
Key question: Is the bug in cmd/entire/cli/ (product code) or in e2e/ (test code)? Only the former is a real-bug.
Strong flaky signals (unless overridden by real-bug):
Agent behavior (non-deterministic):
signal: killed (timeout)
context deadline exceeded or WaitForCheckpoint.*exceeded deadline
Agent asked for confirmation instead of acting
Agent created file at wrong path / wrong name
Agent produced no output
Agent committed when it shouldn't have (or vice versa)
Duration near timeout limit
Test-bug (consistent failure, but root cause is in e2e/ not cmd/entire/cli/):
Env vars not propagated to agent session → tmux/test harness bug
Error references test code (e2e/) not CLI code (cmd/entire/cli/)
Test helper logic errors (wrong assertions, bad globs, incorrect expected values)
Consistent failure BUT root cause traced to e2e/ code, not cmd/entire/cli/
Test setup/teardown issues (missing git config, temp dir cleanup, port conflicts)
Ambiguous cases:
Read entire.log carefully:
If hooks fired correctly and metadata is valid -> lean flaky
If hooks fired but produced wrong results -> lean real-bug
Step 3: Cross-Agent Correlation
Before acting, check correlations using re-run data:
Same test fails for 3+ agents, all re-runs also fail -> strong real-bug
Same test fails for multiple agents, but re-runs pass -> flaky (shared prompt issue)
One agent fails consistently, others pass -> agent-specific issue (still real-bug if re-runs confirm)
Step 4a: Take Action — Local Mode
In local mode, present findings interactively. Do not create branches, PRs, or GitHub issues.
Present Findings Report
For each test+agent pair, print a findings block:
code
## <TestName> (<agent>) — <classification>
**Re-run results:** original=FAIL, rerun1=PASS, rerun2=PASS
**Evidence:**
- <1-2 sentence summary of what went wrong>
- <key artifact evidence: entire.log excerpt, console.log excerpt, etc.>
For flaky failures: describe the proposed fix
For agent-behavior flaky issues, fixes typically modify test prompts. For test-bug flaky issues, fixes target e2e/ infrastructure code (harness setup, helpers, env propagation).
code
**Proposed fix:** <description>
- File: <path to test file or e2e infrastructure file>
- Change: <what will be modified — e.g., append "Do not ask for confirmation" to prompt, or fix env propagation in NewTmuxSession>
Common flaky fixes (same as CI mode):
Agent asked for confirmation -> append "Do not ask for confirmation" to prompt
Agent wrote to wrong path -> be more explicit about paths in prompt
Agent committed when shouldn't -> add "Do not commit" to prompt
Each entry in actions corresponds to one row in the summary table. Include all failures that had an action taken. The link field must be the full URL to the PR or issue.
ARGUMENTS: get latest CI run
checkpoint_id
strategy
Session state file missing or malformed when expected
Hooks did not fire at all (no hook invoked log entries)
Shadow/metadata branch has wrong tree structure
Same test fails across 3+ agents with same non-timeout symptom
Error references CLI code (panic in cmd/entire/cli/)
Key question: Is the bug in cmd/entire/cli/ (product code) or in e2e/ (test code)? Only the former is a real-bug.
Strong flaky signals (unless overridden by real-bug):
Agent behavior (non-deterministic):
signal: killed (timeout)
context deadline exceeded or WaitForCheckpoint.*exceeded deadline
Agent asked for confirmation instead of acting
Agent created file at wrong path / wrong name
Agent produced no output
Agent committed when it shouldn't have (or vice versa)
Duration near timeout limit
Test-bug (consistent failure, but root cause is in e2e/ not cmd/entire/cli/):
Env vars not propagated to agent session → tmux/test harness bug
Error references test code (e2e/) not CLI code (cmd/entire/cli/)
Test helper logic errors (wrong assertions, bad globs, incorrect expected values)
Consistent failure BUT root cause traced to e2e/ code, not cmd/entire/cli/
Test setup/teardown issues (missing git config, temp dir cleanup, port conflicts)
Ambiguous cases:
Read entire.log carefully:
If hooks fired correctly and metadata is valid -> lean flaky
If hooks fired but produced wrong results -> lean real-bug
Step 3: Cross-Agent Correlation
Before acting, check correlations using re-run data:
Same test fails for 3+ agents, all re-runs also fail -> strong real-bug
Same test fails for multiple agents, but re-runs pass -> flaky (shared prompt issue)
One agent fails consistently, others pass -> agent-specific issue (still real-bug if re-runs confirm)
Step 4a: Take Action — Local Mode
In local mode, present findings interactively. Do not create branches, PRs, or GitHub issues.
Present Findings Report
For each test+agent pair, print a findings block:
code
## <TestName> (<agent>) — <classification>
**Re-run results:** original=FAIL, rerun1=PASS, rerun2=PASS
**Evidence:**
- <1-2 sentence summary of what went wrong>
- <key artifact evidence: entire.log excerpt, console.log excerpt, etc.>
For flaky failures: describe the proposed fix
For agent-behavior flaky issues, fixes typically modify test prompts. For test-bug flaky issues, fixes target e2e/ infrastructure code (harness setup, helpers, env propagation).
code
**Proposed fix:** <description>
- File: <path to test file or e2e infrastructure file>
- Change: <what will be modified — e.g., append "Do not ask for confirmation" to prompt, or fix env propagation in NewTmuxSession>
Common flaky fixes (same as CI mode):
Agent asked for confirmation -> append "Do not ask for confirmation" to prompt
Agent wrote to wrong path -> be more explicit about paths in prompt
Agent committed when shouldn't -> add "Do not commit" to prompt
Each entry in actions corresponds to one row in the summary table. Include all failures that had an action taken. The link field must be the full URL to the PR or issue.