Skip to content

fix(ui): chat send failures were invisible when the session pane was hidden - #124473

Merged
steipete merged 3 commits into
mainfrom
steipete/fix-ui-silent-send-failures
Aug 16, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/fix-ui-silent-send-failures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators sending a chat message from the Control UI would see no outcome at all when the send terminally failed while the owning session pane was not visible (after navigating to another session, a reconnect, alias drift, or split-pane routing). The failure was recorded only on the stored queue item; nothing on screen changed.

Worse, a non-retryable Gateway rejection (e.g. auth loss) during the FIFO outbox head's history reconcile was treated as a silent retryable "blocked", wedging the head — and every message queued behind it — permanently with no visible outcome. This is the worst bug class under the repo's severity order: an action ending in silence.

A smaller sibling: the composer's cloud-startup-pending gate disabled the composer with no stated reason, and an existing draft hid the disabled-reason placeholder.

Why This Change Was Made

Terminal delivery failures must always end in a visible outcome. A new canonical surfaceChatDeliveryFailure() helper in steer-lifecycle.ts (the shared error-text owner) routes every terminal failure: a visible pane keeps the inline chat error exactly as before; otherwise the failure surfaces through the existing global toast host, naming the owning session. All terminal failure sites in chat-send-delivery.ts, chat-outbox-drain.ts, chat-send-queue-state.ts, and steer-lifecycle.ts now use it — no per-site visibility gating remains.

For the wedged-head case, reconcileStoredChatOutboxHead now distinguishes non-retryable GatewayRequestError rejections: a never-attempted head terminally fails with a visible outcome and the lane continues draining; an attempted head parks as unconfirmed (duplicate-send safety — we cannot prove the Gateway never executed it). The composer's cloud-startup gate gets a stated reason, and the disabled reason renders even while a draft hides the placeholder.

User Impact

Operators always see why a message did not deliver: inline in the chat pane when they are looking at it, or as a global toast naming the session when they are not. A dead credential no longer silently freezes a session's outgoing queue forever — the queue either fails visibly or parks unconfirmed with an explanation, and later messages still drain.

Evidence

Regression tests (fail pre-fix, stash-verified): 3 new tests in ui/src/pages/chat/chat-send.test.ts (hidden-pane terminal failure surfaces via toast; non-retryable never-attempted head fails visibly and the lane drains the next message; attempted head parks unconfirmed) and 1 in ui/src/pages/chat/chat-composer.test.ts (disabled reason visible with draft text present). Full files pass post-rebase: 329 tests, 2 files (node scripts/run-vitest.mjs ui/src/pages/chat/chat-send.test.ts ui/src/pages/chat/chat-composer.test.ts).

Mock-gateway E2E lane: ui/src/e2e/chat-flow.messaging.e2e.test.ts — 17 passed post-rebase.

Before/after visual proof (mocked Gateway, Playwright-driven Chromium; scenario: a queued send for "Deploy helper" drains after reconnect while the operator is viewing "Research notes", and the Gateway rejects chat.send non-retryably with UNAUTHORIZED: gateway auth failed):

Before (origin/main @ e2e070c) — send fails while another session is visible; no visible outcome anywhere:

before: silent failure, no toast

After (this branch) — global toast names the owning session and the error:

after: toast "Deploy helper: gateway auth failed"

Video of the after-fix flow:

ui-proof-after-toast.mp4

LOC delta: +87 production / +166 test (net). The production growth carries two missing capabilities that no existing owner could absorb: global failure-surface routing (surfaceChatDeliveryFailure + toast session naming) and terminal head handling in the outbox reconcile (fail-visible vs park-unconfirmed discrimination). Reviewed for a net-neutral absorbing refactor; the per-site visibleSessionMatches guards it replaces were the smaller shape only because they dropped the failure on the floor.

Checks: node scripts/check-changed.mjs clean (typecheck UI, lint, i18n verify, dead-export scan). Autoreview clean (0.98).

Terminal chat send failures were recorded only on the queue item when the
owning pane was not visible (reconnect, alias drift, split-pane routing),
so the operator saw nothing at all — an action ending in silence.

Root cause: every error surface in the send/drain path was gated on
visibleSessionMatches(...), and the FIFO outbox drain treated every
chat.history reconcile rejection as a silent retryable "blocked", so a
non-retryable rejection (e.g. auth loss) wedged the head — and everything
behind it — permanently with no visible outcome.

Fix, at the owner:
- New surfaceChatDeliveryFailure() in steer-lifecycle.ts (the shared
  error-text owner): visible pane keeps the inline chat error; otherwise
  the failure routes through the existing global toast host, naming the
  session. All terminal failure sites in chat-send-delivery,
  chat-outbox-drain, chat-send-queue-state, and steer-lifecycle now use it.
- reconcileStoredChatOutboxHead: a non-retryable GatewayRequestError on the
  head now terminally fails a never-attempted head (unblocking the lane)
  or parks an attempted head as unconfirmed — both with a visible outcome —
  instead of blocking the lane forever.
- Composer disabled-reason: the reason now also renders while a draft hides
  the placeholder, and the cloud-startup-pending gate gets a reason instead
  of a silently disabled composer.

Regression tests: hidden-pane terminal failure surfaces via toast; wedged
head fails visibly and the lane drains the next message; attempted head
parks unconfirmed; disabled reason visible with draft text present.
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 07:41
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 16, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 16, 2026, 4:28 AM ET / 08:28 UTC.

ClawSweeper review

What this changes

The PR surfaces hidden-session terminal chat-send failures through a global toast, unblocks non-retryable outbox reconciliation failures, and explains the cloud-startup composer disablement.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 3 items remain

A P1 remains: an interrupted settings update can still fail an off-screen queued send with no visible outcome, so this PR is not ready to merge.

Priority: P1
Reviewed head: 9812f941fe5968bba8025b10b79ccd2c913f9cb4

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The reported path has direct browser proof and focused tests, but a source-proven sibling terminal path remains silent after navigation.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (recording): The PR body includes before/after Playwright Chromium evidence and a recording showing the reported hidden-session Gateway rejection become a named global toast.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR body includes before/after Playwright Chromium evidence and a recording showing the reported hidden-session Gateway rejection become a named global toast.
Evidence reviewed 5 items Remaining silent terminal path: When a pending settings update resolves false after navigation, this branch marks the queued item failed and returns without using the new shared failure surface.
Existing source reproduction: The existing route-switch test proves this exact settings failure remains in the original session’s stored queue after the operator navigates away, but does not assert any visible error surface.
Current-main baseline: Current main uses visibility-gated inline error handling in this delivery path, establishing the pre-PR silent hidden-session behavior.
Findings 1 actionable finding [P1] Surface interrupted settings failures after navigation
Security None None.

How this fits together

The Control UI persists queued chat sends while sessions reconnect or change. Its outbox decides whether to send, wait, fail, or park a message, and terminal failures must reach either the active chat pane or the global toast.

flowchart LR
  A[Operator queues chat] --> B[Settings update and outbox]
  B --> C[Gateway send or history reconcile]
  C --> D{Terminal result}
  D -->|Visible session| E[Inline chat error]
  D -->|Hidden session| F[Global toast]
  D -->|Unconfirmed send| G[Park for review]
Loading

Before merge

  • Surface interrupted settings failures after navigation (P1) - Late finding: when the pending settings update resolves false after the operator has left the session, this branch marks the queued item failed and returns without calling surfaceChatDeliveryFailure(). That repeats the silent off-screen outcome this PR otherwise fixes; route it through the canonical helper and cover the route-switch case.
  • Resolve merge risk (P1) - A settings update that is interrupted after navigation still leaves a failed queued send only in its off-screen session.
  • Resolve merge risk (P1) - The bug fix adds production net +102 lines; its required global-surface and reconciliation behavior should not retain another silent terminal branch.

Findings

  • [P1] Surface interrupted settings failures after navigation — ui/src/pages/chat/chat-send-delivery.ts:108-112
Agent review details

Security

None.

PR surface

Source +102, Tests +245, Other 0. Total +347 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 6 156 54 +102
Tests 3 245 0 +245
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 3 0
Total 10 404 57 +347

Review metrics

Metric Value Why it matters
Production versus test LOC production +156/-54 (net +102); tests +245/-0; baseline config +3/-3 The added global failure routing and reconcile behavior are meaningful bug-fix growth, and the remaining silent branch shows the invariant is not yet fully covered.

Merge-risk options

Maintainer options:

  1. Complete hidden-session failure coverage (recommended)
    Route the interrupted-settings failure through the canonical delivery-failure helper and add a route-switch regression before merge.

Technical review

Best possible solution:

Route the interrupted-settings failure through the shared helper, add the off-screen regression, and retain only the global presentation and reconciliation logic that cannot be absorbed into the old visibility-gated paths.

Do we have a high-confidence way to reproduce the issue?

Yes in source: start a settings update for a queued send, navigate to another session, then resolve the update false; the queue item fails without invoking the global surface.

Is this the best way to solve the issue?

No: the shared helper is the right owner, but the PR does not invoke it for every reachable terminal queued-send failure.

Full review comments:

  • [P1] Surface interrupted settings failures after navigation — ui/src/pages/chat/chat-send-delivery.ts:108-112
    Late finding: when the pending settings update resolves false after the operator has left the session, this branch marks the queued item failed and returns without calling surfaceChatDeliveryFailure(). That repeats the silent off-screen outcome this PR otherwise fixes; route it through the canonical helper and cover the route-switch case.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b097aaab2061.

Labels

Label justifications:

  • P1: An operator can still receive no visible outcome for a failed queued chat send after navigating away.
  • merge-risk: 🚨 message-delivery: Merging with this uncovered terminal path preserves a silent failed delivery state for an off-screen session.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (recording): The PR body includes before/after Playwright Chromium evidence and a recording showing the reported hidden-session Gateway rejection become a named global toast.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after Playwright Chromium evidence and a recording showing the reported hidden-session Gateway rejection become a named global toast.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body includes before/after Playwright Chromium evidence and a recording showing the reported hidden-session Gateway rejection become a named global toast.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current PR commits that own the shared chat-delivery failure surface and its route-switch follow-up. (role: recent area contributor; confidence: high; commits: c6c65651527a, 9812f941fe59; files: ui/src/pages/chat/chat-send-delivery.ts, ui/src/pages/chat/chat-outbox-drain.ts, ui/src/pages/chat/steer-lifecycle.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Route the interrupted-settings failure through surfaceChatDeliveryFailure() and add the route-switch regression test.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-16T07:48:25.380Z sha c6c6565 :: found issues before merge. :: [P1] Surface stale local-command failures | [P2] Match the toast label to the global-session agent
  • reviewed 2026-08-16T08:00:31.687Z sha 7dddb11 :: found issues before merge. :: [P1] Surface stale local-command failures | [P2] Select the owning agent's global session row

…in workspace-sync test clock

The chat send path now imports session-display naming for the global
failure toast, adding ~1 KiB gzip to startup JS (335452 B on CI's Linux
builder, still well under the 358400 B committed cap).

workspace-sync "never commands" asserted the exact dispatch timeoutMs
(777) but the impl derives it from a Date.now() deadline, so any elapsed
ms between admission and dispatch failed the exact-equality assertion on
a loaded runner. Pin the clock like the sibling timeout tests do.
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 16, 2026
…al toast naming

ClawSweeper review findings on #124473:

- A queued local command failing after the operator navigated away hit
  failCommand(error) with expose=false; the dispatcher's stale-scope
  guard had already withheld the inline error, so a successful state
  write recorded the failure invisibly — the silent class this PR
  removes. Expose it globally when the scope is stale and the owning
  pane is hidden; a stale scope with the pane still visible keeps the
  failed queue chip (the new connection owns the inline surface).
- Global session rows are agent-scoped behind one shared "global" key,
  so the toast row lookup could borrow another agent's label. Match the
  row's agentId to the failed outbox's agent for global keys.

Both regression tests fail pre-fix (stash-verified).
@steipete

Copy link
Copy Markdown
Contributor Author

Both ClawSweeper findings and both rank-up moves are applied as of 9812f941fe5:

  • [P1] Surface stale local-command failures — chat-outbox-drain.ts: a queued local command that fails after a route switch now surfaces globally (failCommand(error, expose) with expose when the command scope is stale and the owning pane is hidden). A stale scope with the pane still visible keeps the failed queue chip, because the replacement connection owns the inline surface — this preserves the protected "does not borrow a replacement connection error for a stale queued command" behavior. Regression test: "surfaces a failed local command globally after a route switch" (fails pre-fix, stash-verified).
  • [P2] Match the toast label to the global-session agent — steer-lifecycle.ts: for global session keys the toast row lookup now requires the row's agentId to match the failed outbox's agent, so a hidden global-session failure can no longer borrow another agent's label. Regression test: "names the failed agent's global session in the toast, not another agent's row" (fails pre-fix, stash-verified).
  • [P1] Resolve merge risk (net +87 prod) — both fixes route through the single canonical surfaceChatDeliveryFailure(); no second error-routing path was added (net +4 prod lines across the two fixes, the rest is tests). The +87 base remains justified by the two missing capabilities named in the PR body; the per-site visibility gates it replaces were smaller only because they dropped failures silently.

Also in this push series: 7dddb11e3e3 fixes the two CI failures from the first run — the startup-JS budget baseline (+~1 KiB gzip from session-display naming joining the chat startup path, still well under the committed cap) and a loaded-runner flake in workspace-sync.test.ts ("never commands" asserted an exact timeoutMs derived from a live Date.now() deadline; the clock is now pinned like the sibling timeout tests).

Focused proof: chat-send.test.ts + chat-composer.test.ts 331 passed; chat-flow.messaging e2e 17 passed; node scripts/check-changed.mjs green; autoreview clean (0.99).

@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Aug 16, 2026
@steipete
steipete merged commit 32ddbb3 into main Aug 16, 2026
200 checks passed
@steipete
steipete deleted the steipete/fix-ui-silent-send-failures branch August 16, 2026 08:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 16, 2026
…og noise (#124560)

* fix(ui): surface hidden-pane steer terminal failures globally

Three terminal branches in steer-lifecycle.ts (transport null result,
failed queue-row restore, failed queue-row removal) still gated their
error on itemStillVisible, so a steer that failed after the operator
navigated away parked the error on the queue row with no visible
outcome — the exact invariant #124473 introduced
surfaceChatDeliveryFailure() to protect.

Route all three through the canonical helper and delete the divergent
visibility-only branches. Regression test fails pre-fix
(stash-verified): steer transport failure with the pane hidden now
surfaces the session-named global toast.

* fix(logging): demote per-turn gateway log noise to debug

Live campaign evidence showed three lines dominating operator logs at
info level with no per-turn diagnostic value:

- 'tool policy removed N tool(s)': the policy pipeline runs on every
  turn, so this repeated 42x in one session. Demote to debug and delete
  the now-dead toolPolicyAuditLogLevel/auditLogLevel plumbing that only
  existed to lower diagnostic probes to the level that is now the
  default (net -13 production LOC).
- 'codex app-server one-shot cleanup checked shared client retirement':
  routine per-attempt teardown detail; demote to debug.
- 'codex trajectory capture requires the SQLite host recorder': static
  config condition warned per attempt; warn once per process.

Skipped: the [model-fetch] info carve-out in model-transport-debug.ts is
a named contract (docs/logging.md, #89648) — always-info by design.

* fix(codex): drop test-only trajectory warn-once reset export

Knip's production unused-export gate rejects
resetCodexTrajectoryRecorderWarningForTest — it was a test-only seam in
production code. Reset the process-wide warn-once flag via
vi.resetModules() + fresh dynamic import in the test instead.

* test(cron): wait for backoff re-arm instead of fixed sleep

The 0ms retry timer arms only after async watcher-state persistence, so
'await delay(5)' races it on loaded CI workers (flaked on
checks-node-compact-large-2: spawn called 1 time, expected 2). Replace
both fixed-sleep re-arm waits with vi.waitFor on the spawn count. The
remaining delay(5) guards a negative no-further-spawn assertion after
cancel, where a bounded sleep is the correct shape.

* fix(codex): scope trajectory recorder warn dedupe to session

ClawSweeper P2: the host recorder factory returns null for per-session
target-mapping conflicts, not only static config, so a process-wide
warn-once flag silenced a later distinct session's recorder loss. Warn
once per session (bounded set, cleared past 64 entries) so retries stay
quiet but each newly affected session records its loss. Regression
covers a later distinct session still warning.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
…hidden (openclaw#124473)

* fix(ui): always surface terminal chat send failures

Terminal chat send failures were recorded only on the queue item when the
owning pane was not visible (reconnect, alias drift, split-pane routing),
so the operator saw nothing at all — an action ending in silence.

Root cause: every error surface in the send/drain path was gated on
visibleSessionMatches(...), and the FIFO outbox drain treated every
chat.history reconcile rejection as a silent retryable "blocked", so a
non-retryable rejection (e.g. auth loss) wedged the head — and everything
behind it — permanently with no visible outcome.

Fix, at the owner:
- New surfaceChatDeliveryFailure() in steer-lifecycle.ts (the shared
  error-text owner): visible pane keeps the inline chat error; otherwise
  the failure routes through the existing global toast host, naming the
  session. All terminal failure sites in chat-send-delivery,
  chat-outbox-drain, chat-send-queue-state, and steer-lifecycle now use it.
- reconcileStoredChatOutboxHead: a non-retryable GatewayRequestError on the
  head now terminally fails a never-attempted head (unblocking the lane)
  or parks an attempted head as unconfirmed — both with a visible outcome —
  instead of blocking the lane forever.
- Composer disabled-reason: the reason now also renders while a draft hides
  the placeholder, and the cloud-startup-pending gate gets a reason instead
  of a silently disabled composer.

Regression tests: hidden-pane terminal failure surfaces via toast; wedged
head fails visibly and the lane drains the next message; attempted head
parks unconfirmed; disabled reason visible with draft text present.

* fix(ci): raise startup JS baseline for global failure surfacing and pin workspace-sync test clock

The chat send path now imports session-display naming for the global
failure toast, adding ~1 KiB gzip to startup JS (335452 B on CI's Linux
builder, still well under the 358400 B committed cap).

workspace-sync "never commands" asserted the exact dispatch timeoutMs
(777) but the impl derives it from a Date.now() deadline, so any elapsed
ms between admission and dispatch failed the exact-equality assertion on
a loaded runner. Pin the clock like the sibling timeout tests do.

* fix(ui): surface route-switched command failures and agent-scope global toast naming

ClawSweeper review findings on openclaw#124473:

- A queued local command failing after the operator navigated away hit
  failCommand(error) with expose=false; the dispatcher's stale-scope
  guard had already withheld the inline error, so a successful state
  write recorded the failure invisibly — the silent class this PR
  removes. Expose it globally when the scope is stale and the owning
  pane is hidden; a stale scope with the pane still visible keeps the
  failed queue chip (the new connection owns the inline surface).
- Global session rows are agent-scoped behind one shared "global" key,
  so the toast row lookup could borrow another agent's label. Match the
  row's agentId to the failed outbox's agent for global keys.

Both regression tests fail pre-fix (stash-verified).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
…og noise (openclaw#124560)

* fix(ui): surface hidden-pane steer terminal failures globally

Three terminal branches in steer-lifecycle.ts (transport null result,
failed queue-row restore, failed queue-row removal) still gated their
error on itemStillVisible, so a steer that failed after the operator
navigated away parked the error on the queue row with no visible
outcome — the exact invariant openclaw#124473 introduced
surfaceChatDeliveryFailure() to protect.

Route all three through the canonical helper and delete the divergent
visibility-only branches. Regression test fails pre-fix
(stash-verified): steer transport failure with the pane hidden now
surfaces the session-named global toast.

* fix(logging): demote per-turn gateway log noise to debug

Live campaign evidence showed three lines dominating operator logs at
info level with no per-turn diagnostic value:

- 'tool policy removed N tool(s)': the policy pipeline runs on every
  turn, so this repeated 42x in one session. Demote to debug and delete
  the now-dead toolPolicyAuditLogLevel/auditLogLevel plumbing that only
  existed to lower diagnostic probes to the level that is now the
  default (net -13 production LOC).
- 'codex app-server one-shot cleanup checked shared client retirement':
  routine per-attempt teardown detail; demote to debug.
- 'codex trajectory capture requires the SQLite host recorder': static
  config condition warned per attempt; warn once per process.

Skipped: the [model-fetch] info carve-out in model-transport-debug.ts is
a named contract (docs/logging.md, openclaw#89648) — always-info by design.

* fix(codex): drop test-only trajectory warn-once reset export

Knip's production unused-export gate rejects
resetCodexTrajectoryRecorderWarningForTest — it was a test-only seam in
production code. Reset the process-wide warn-once flag via
vi.resetModules() + fresh dynamic import in the test instead.

* test(cron): wait for backoff re-arm instead of fixed sleep

The 0ms retry timer arms only after async watcher-state persistence, so
'await delay(5)' races it on loaded CI workers (flaked on
checks-node-compact-large-2: spawn called 1 time, expected 2). Replace
both fixed-sleep re-arm waits with vi.waitFor on the spawn count. The
remaining delay(5) guards a negative no-further-spawn assertion after
cancel, where a bounded sleep is the correct shape.

* fix(codex): scope trajectory recorder warn dedupe to session

ClawSweeper P2: the host recorder factory returns null for per-session
target-mapping conflicts, not only static config, so a process-wide
warn-once flag silenced a later distinct session's recorder loss. Warn
once per session (bounded set, cleared past 64 entries) so retries stay
quiet but each newly affected session records its loss. Regression
covers a later distinct session still warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant