The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(install-e2e): a fresh install has no state.db until the first turn
ethernet5e4c6ea0aed3
diff --git a/tests/install/e2e-assets/user-state-actions.sh b/tests/install/e2e-assets/user-state-actions.shindex a423125385e..3f64e49d6e0 100644--- a/tests/install/e2e-assets/user-state-actions.sh+++ b/tests/install/e2e-assets/user-state-actions.sh@@ -58,10 +58,16 @@ user_state_produce() {fail "the installed CLI has no one-shot chat flag; this leg cannot produce a session through the user path"fiafter="$(_user_state_db_sessions)"- if [ "${before:-0}" -ge 0 ] && [ "${after:-0}" -gt "${before:-0}" ]; then- ok "a real turn created a session (state.db sessions $before -> $after)"+ # A fresh install has NO state.db until the first turn, so the probe's -1+ # ("no readable db yet") is the expected starting point, not a failure. Only+ # growth matters: the turn must have created rows.+ local before_n after_n+ if [ "${before:-0}" -lt 0 ]; then before_n=0; else before_n="${before:-0}"; fi+ if [ "${after:-0}" -lt 0 ]; then after_n=0; else after_n="${after:-0}"; fi+ if [ "$after_n" -gt "$before_n" ]; then+ ok "a real turn created a session (state.db sessions $before_n -> $after_n)"else- fail "the chat turn produced no session row (state.db sessions $before -> $after)"+ fail "the chat turn produced no session row (state.db sessions $before_n -> $after_n)"fi# --- a pooled credential -------------------------------------------------diff --git a/tests/install/windows-e2e.ps1 b/tests/install/windows-e2e.ps1index a978a6f7f5e..55e7126982b 100644--- a/tests/install/windows-e2e.ps1+++ b/tests/install/windows-e2e.ps1@@ -977,7 +977,11 @@ function Invoke-UserStateActions {Write-LogGroup 'first real chat turn' $logif ($chatExit -ne 0) { throw "the first chat turn failed (exit $chatExit); see $log" }$after = Get-UserStateSessionCount- if (-not ($before -ge 0 -and $after -gt $before)) {+ # A fresh install has no state.db until the first turn: -1 means "no+ # readable db yet", the expected starting point, not a failure.+ if ($before -lt 0) { $before = 0 }+ if ($after -lt 0) { $after = 0 }+ if (-not ($after -gt $before)) {throw "the chat turn produced no session row (state.db sessions $before -> $after)"}Write-Host " a real turn created a session (state.db sessions $before -> $after)"