Skip to content

fix(ui): large attachment batches fail before active-run steering - #133052

Merged
steipete merged 6 commits into
mainfrom
steipete/sweet-poincare-a26147
Aug 30, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/sweet-poincare-a26147

Conversation

@steipete

@steipete steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #132833

Landing coordination: this bounded attachment repair is proceeding first after renewed maintainer direction. The canonical Main/global session identity repair remains unmerged; its owner has been notified to rebase that later migration onto this Blob-storage contract. Both branches independently introduced a v3 browser metadata format and must not be merged without owner-level integration. Native preparation and merge completed at the verified head, landing as baef6e0ed070853d1a25b35bf7b57841c3a0b294, without an admin bypass.

Published head: c2d2fc21b4703da17a95fafb177cca6e5c860b83. Local, native-browser, build, review, and real-Gateway proof below apply to this candidate. Exact-head CI run 33302931394 and the required openclaw/ci-gate are green; native OPENCLAW_TESTBOX=1 scripts/pr prepare-run completed without changing the head. The final rebase preserved main's stronger selected-session/quota ownership repair and dropped our redundant ten-line quota fixture; all original auth assertions remain. The six-line responsive correction waits for normal visibility and settled geometry without changing CSS, bounds, or timeouts; its pre-fix failure was CI-only, not reproduced locally.

An inherited main typecheck error required one additional, net-zero caller-import repair in Code Mode recovery: use the existing plugins/tool-metadata helper rather than its retired plugins/tools export. The exact failing typecheck now passes, as do all 15 existing recovery tests. No replay or ownership policy changed; the same correction is now canonically merged through the metadata-leaf import repair.

What Problem This Solves

Fixes an issue where users steering an active Control UI turn with two valid 2,404,765-byte PNGs would hit the reconnect-storage error before any chat.send. Both files fit the separate 25 MiB composer-draft limit, but their data URLs alone consume 12,825,512 bytes under Chromium's UTF-16 session-storage accounting, exceeding its 10,485,760-byte quota before JSON overhead. One large PNG and a large-plus-small batch already worked.

Why This Change Was Made

Store immutable outbox-owned attachment Blobs in the existing browser IndexedDB database and keep delivery metadata/references in tab session storage. Commit the entire binary batch before admission, hydrate all bytes before transport, and transfer complete attachments into the local transcript/cache before retiring their outbox storage. This repairs the persistence owner instead of weakening active-run durability or borrowing editable, expiring draft records.

The explicitly approved browser schema upgrade preserves existing draft records and readable inline queues. Shared database opening, draft retirement, Blob conversion, and terminal/reconnect handoff reuse or replace existing paths rather than adding parallel implementations. Async operations retain exact credential, queue-attempt, and payload-reference ownership. Uncertain retries preserve their original idempotency key; failed inline migration preserves its original bytes. Credential transitions publish their new owner before synchronous pane notifications, and passive recovery respects the caller's frame-coalesced rendering. The event entrypoint keeps its existing void API.

The final review repair removes mutable conversation scope from the immutable Blob owner: bytes belong to the generated queued-input ID, exact opaque reference, Gateway, authenticated recovery owner, and source tab. Queue metadata still owns routing and strict attempt/reference CAS; physical deletion still requires the document's held Web Lock. Alias reclassification no longer strands readable bytes. Each preparation caller must establish recovery/Incognito eligibility before sharing work, and coalescing requires matching queue/reference identities and ordered attachment MIME/name/size metadata. Previously observed offline owners remain valid, and handoff never allocates a duplicate copy. This follow-up removes ten production lines and adds no schema version, migration, configuration, or fallback.

Independent of the merged stored-image steering repair. No provider-behavior, Gateway protocol, SQLite, product configuration, dependency, or performance-budget changes; the sole non-UI production edit is the inherited caller-import repair described above. The original history-image report was a capture-timing false alarm: this adds only the complete-byte handoff required by the new outbox backing store, not a general history repair. Current main's cloud pending-input custody is preserved and covered by a Blob-backed custody-transfer regression.

User Impact

Active-run attachment batches that fit the storage and Gateway limits can be sent without expanding binary data into session storage. The reproduced two-image batch now uses 2,156 bytes of queue metadata, plus a 130-byte tab marker. Storage failures retain input or a visible recovery row; no partial attachment send or new volatile fallback is allowed. Lost acknowledgements do not trigger automatic replay.

Binary outbox storage requires IndexedDB and Web Locks over HTTPS or localhost. Retention is bounded at 25 MiB per message, 250 MiB and 1,000 bundles per browser origin, with no age-based eviction of queued input. Delivery/discard retires owned bundles. Closed tabs or interrupted copies/cleanup can leave bounded unadopted bundles; the documented recovery is to preserve needed drafts before clearing site data, which also clears browser drafts and sign-in state. Incognito stays on its tab-only inline storage path. Duplicated tabs preserve submission IDs, copy their bytes, and require explicit delivery review; a late duplicate whose source already retired reports missing attachments. Independent tabs remain independent.

Documentation: https://docs.openclaw.ai/web/control-ui#chat-behavior

Evidence

  • Before: native Chromium reproduction failed for two large PNGs with the storage banner, intact draft/previews, no queue admission, and zero chat.send; the smaller control batches passed. Fixtures are generated CRC-valid PNGs, not committed binary assets. Native quota probing accepted 10,485,760 bytes and rejected 10,485,762.
  • After: the full Control UI suite passes 12,013 tests across 780 files (86 existing skipped tests across 20 skipped files), plus 44 native Chromium E2E tests across eight files. Coverage includes complete-byte terminal/reconnect handoff, stale credentials/attempts/references, inline migration failure and reload, repeated uncertain retries, blocked upgrades, duplicate/independent tabs, corruption, editing, deletion, draft retention, pending-input custody, attachment-read lifecycle, and frame-coalesced rendering. Removing the exact-reference fence makes both delayed-read regressions fail for the intended reasons. The complete eight-test history/recovery file also passes after adding an explicit same-transport-route retry assertion.
  • Review/CI repairs: ClawSweeper's P1 reproduced in native Chromium: while native arbitration denied the duplicate's copied lock and its callback was held, removing the duplicate row deleted the source's exact Blob key despite intact source metadata/lock. Cleanup now awaits the lock-confirmed document identity in the sole payload deleter; the same test passes and sends the source's exact bytes with its original ID. CI separately exposed a live-main versus stored-global comparison consuming manual retry admission. The unchanged ACK-lost E2E failed before and passed after canonical stored-row reconciliation, retaining the original idempotency key and transport route. Current-format storage readbacks, authenticated same-owner fixtures, unconditional teardown, and a one-shot FileReader fault were corrected without weakening production ownership, byte checks, or timeouts. One queue-reorder sleep was replaced by its asserted storage-error outcome.
  • Alias/coalescer red → green: the established-client configured-alias regression prepares/adopts real PNG+PDF bytes under agent:work:workspace, clears the warm byte registry, then changes configured mainKey from main to workspace. Actual metadata normalization preserves queue/run/reference identity but old hydration returns missing while the original owner still reads both exact files. It now hydrates and sends both files once with the original run ID. Nine caller variants reject alone but were wrongly accepted concurrently: queue ID, reference tab/recovery owner, Incognito, never-observed client, attachment count, MIME, filename, and size. All now reject; matching and remembered-offline controls stay ready and share one read. All 403 focused owner tests pass. The review's ordinary before-first-hello unresolved-Blob producer was not established: defaults publish before recovery readiness and cold clients cannot prepare these bytes. No fabricated cold-start admission test was added; existing bare-main/raw-global metadata tests remain green. Routing policy itself is unchanged.
  • Real running surface: isolated real Gateway with a local synthetic OpenAI-compatible provider, on both Main and a normally created new session. Each pass waits for an actual streaming model request before steering. Both 2,404,765-byte PNGs match their original SHA-256 values in outbound frames, receive successful Gateway ACKs, remain recoverable through reload before model release, and reach the provider as two image inputs of the original byte lengths. Reload issues no duplicate attachment send; both images appear in the completed conversation. No operator Gateway, credentials, or private conversation data used.
  • Complete changed-file checks pass with no skips, including dead exports, core/UI typechecks, lint, styles, and i18n. Full pnpm build passes; startup JS is 345,628 B gzip, below the existing 346,761 B enforcement limit. No budget or baseline edits in this PR.
  • Fresh isolated Codex autoreview is scoped-clean at the requested P0 threshold; it is not represented as a broader-priority certificate. Synthetic before/after pictures and a sanitized live-flow video were captured and inspected locally. Media publication blocker: the local GitHub CLI guard rejects both gh pr comment --attach and the authenticated REST upload to GitHub's user-attachments endpoint with string rewrite protection blocked unsupported or unsafe input. No guard bypass or alternate credentials were used. The proof comment records the verified flow and this publication gap; CI artifact links will be added if emitted.

Size/ownership: production +1,613/-569 (net +1,044, 28 files); tests/test support +2,674/-403 (net +2,271, 18 files); docs +24. The cleanup-authority and canonical-retry follow-ups each add only four net production lines. Raw churn includes moves/extractions. The production growth implements the approved immutable binary-persistence boundary, tab/credential ownership, complete-before-send admission, and complete-byte handoff; reusing mutable seven-day draft records or allowing volatile sends would not preserve the queued-input contract.

Known separate follow-up: Main-session outbox recovery stores a global conversation identity while foreground sends use agent:main:main, so recovery can query the wrong history and retain an already-delivered text row as unconfirmed. Source and isolated runtime evidence show this predates the repair; it is owned by the separate Main/global identity issue and canonical repair. Both live attachment flows pass without changing that routing policy. Browser queued-followup receipt timing also remains unchanged; a startup ACK alone is not proof that a model is ready for direct injection.

Related scope: Credential-replacement queue isolation remains separate: this repair fences binary references and live ownership but does not introduce a general credential-identity policy for unreferenced text rows. Recorded-idle queue wake-up and its draft repair concern a different publication owner and are not claimed fixed here. The disconnected steering-state report is already closed via its merged queue-state repair. Live states and pinned-main source were verified; no duplicate closure is warranted.

AI-assisted implementation and review. No agent transcripts included.

Exact local validation commands
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=.artifacts/vitest-cache-outbox-scope-full-ui OPENCLAW_VITEST_MAX_WORKERS=3 node scripts/run-vitest.mjs ui/src
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=.artifacts/vitest-cache-outbox-scope-native OPENCLAW_VITEST_MAX_WORKERS=3 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner \
  ui/src/e2e/chat-outbox-capacity.e2e.test.ts \
  ui/src/e2e/chat-outbox-payloads.e2e.test.ts \
  ui/src/e2e/composer-draft-store.e2e.test.ts \
  ui/src/e2e/session-management.delete.e2e.test.ts \
  ui/src/e2e/chat-flow.history-recovery.e2e.test.ts \
  ui/src/e2e/chat-flow.queue-reorder.e2e.test.ts \
  ui/src/e2e/chat-attachment-read-lifecycle.e2e.test.ts \
  ui/src/e2e/chat-quota-pill-93041.e2e.test.ts
node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/code-mode-reconciliation.test.ts
node scripts/check-changed.mjs -- \
  docs/web/control-ui.md \
  src/agents/embedded-agent-runner/run/code-mode-reconciliation.ts \
  ui/src/app/app-host.deleted-session.test.ts \
  ui/src/e2e/chat-attachment-read-lifecycle.e2e.test.ts \
  ui/src/e2e/chat-flow.history-recovery.e2e.test.ts \
  ui/src/e2e/chat-flow.queue-reorder.e2e.test.ts \
  ui/src/e2e/chat-outbox-capacity.e2e.test.ts \
  ui/src/e2e/chat-outbox-payloads.e2e.test.ts \
  ui/src/e2e/composer-draft-store.e2e.test.ts \
  ui/src/e2e/session-management.delete.e2e.test.ts \
  ui/src/i18n/locales/en.ts \
  ui/src/lib/chat/chat-types.ts \
  ui/src/lib/chat/composer-draft-retirement.runtime.ts \
  ui/src/lib/chat/composer-draft-store.runtime.ts \
  ui/src/lib/chat/control-ui-database.runtime.ts \
  ui/src/lib/chat/outbox-payload-store.runtime.ts \
  ui/src/lib/chat/outbox-store-codec.ts \
  ui/src/lib/chat/outbox-store-projection.ts \
  ui/src/lib/chat/outbox-store-retirement.ts \
  ui/src/lib/chat/outbox-store.test.ts \
  ui/src/lib/chat/outbox-store.ts \
  ui/src/pages/chat/attachment-api.ts \
  ui/src/pages/chat/attachment-payload-store.ts \
  ui/src/pages/chat/chat-history-cursor.test.ts \
  ui/src/pages/chat/chat-outbox-drain.ts \
  ui/src/pages/chat/chat-outbox-owner.ts \
  ui/src/pages/chat/chat-pending-inputs.test.ts \
  ui/src/pages/chat/chat-queue.ts \
  ui/src/pages/chat/chat-reset-delivery.ts \
  ui/src/pages/chat/chat-responsive.browser.test.ts \
  ui/src/pages/chat/chat-send-actions.ts \
  ui/src/pages/chat/chat-send-contract.ts \
  ui/src/pages/chat/chat-send-delivery.ts \
  ui/src/pages/chat/chat-send-queue-state.ts \
  ui/src/pages/chat/chat-send-submit.test.ts \
  ui/src/pages/chat/chat-send-submit.ts \
  ui/src/pages/chat/chat-send-support.ts \
  ui/src/pages/chat/chat-send.test.ts \
  ui/src/pages/chat/chat-state-events.ts \
  ui/src/pages/chat/composer-persistence.test.ts \
  ui/src/pages/chat/composer-persistence.ts \
  ui/src/pages/chat/durable-composer-persistence.ts \
  ui/src/pages/chat/outbox-browser.test-support.ts \
  ui/src/pages/chat/outbox-payloads.ts \
  ui/src/pages/chat/queued-message-edit.test.ts \
  ui/src/pages/chat/queued-message-edit.ts \
  ui/src/test-helpers/gateway-client.ts
node scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/ui.tsbuildinfo
pnpm build

@clawsweeper

clawsweeper Bot commented Aug 30, 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 docs Improvements or additions to documentation app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 30, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. 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 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 5:10 AM ET / 09:10 UTC.

ClawSweeper review

What this changes

This branch makes the Control UI retain large queued attachment payloads in browser storage and coalesce concurrent payload preparation only when their captured queue, tab, recovery, and Gateway ownership match.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

The refreshed coalescer repair addresses the prior payload-reference concern on source and regression-test evidence; keep the protected PR open pending exact-head integration/CI completion and maintainer review of the browser-persistence upgrade.

Priority: P1
Reviewed head: c2d2fc21b4703da17a95fafb177cca6e5c860b83
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The refreshed owner-bound coalescer has focused source and regression coverage plus reported real-flow evidence, with exact-head integration still outstanding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied final-candidate evidence describes an isolated Gateway flow with two retained 2,404,765-byte PNGs surviving reload and producing one send with two provider image parts; source tests additionally exercise the coalescer’s owner boundaries.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The supplied final-candidate evidence describes an isolated Gateway flow with two retained 2,404,765-byte PNGs surviving reload and producing one send with two provider image parts; source tests additionally exercise the coalescer’s owner boundaries.
Evidence reviewed 6 items Refreshed coalescer owner validation: Payload preparation validates the retained reference against the queue, tab/reference identity, recovery scope, Gateway URL, and caller eligibility before it can be shared; routing alias changes do not mutate the persisted payload owner.
Concurrent-call regression coverage: The refreshed tests cover mismatched queue/reference/tab/recovery owners and eligible matching callers, including re-checking state after asynchronous preparation.
Persisted-owner implementation: The browser payload store keeps payload data behind an owner-bound reference rather than using mutable routing metadata as its storage authority.
Findings None None.
Security None None.

How this fits together

The Control UI admits messages and attachments into a browser outbox before sending them through the Gateway. Payload preparation retrieves retained attachment bytes only after validating the queue item’s captured recovery and browser-owner identity, then the delivery path sends the resulting message.

flowchart LR
  A[User queues message with attachments] --> B[Control UI outbox]
  B --> C[Payload preparation]
  C --> D{Captured owner valid?}
  D -->|Yes| E[Browser payload storage]
  E --> F[Gateway message delivery]
  D -->|No| G[Retain or recover safely]
Loading

Decision needed

Question Recommendation
Should this browser-persistence upgrade be integrated after exact-head validation with the related queued-message recovery work? Integrate and validate exact head: Resolve current-main integration, run the exact-head required checks, and confirm the two browser-state migrations preserve queued attachments.

Why: The PR changes persisted outbox state and overlaps related open recovery migration work, so maintainers must choose the integration sequencing despite the refreshed coalescer source evidence.

Before merge

  • Resolve merge risk (P1) - Exact-head hosted checks and integration against the current mainline are still incomplete.
  • Resolve merge risk (P1) - The session-storage v3 and IndexedDB v2 persistence upgrade can affect existing offline queues and requires maintainer confirmation alongside the overlapping recovery migration.
  • Resolve merge risk (P1) - Raw parent blobs were unavailable in this partial checkout, preventing an independent exact parent-to-head hunk audit.
  • Complete next step (P2) - Protected browser-persistence work needs maintainer-controlled integration and exact-head validation, not an automated repair dispatch.
Agent review details

Security

None.

PR surface

Source +1126, Tests +2189, Docs +24. Total +3339 across 47 files.

View PR surface stats
Area Files Added Removed Net
Source 30 1695 569 +1126
Tests 16 2592 403 +2189
Docs 1 24 0 +24
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 47 4311 972 +3339

Review metrics

Metric Value Why it matters
Browser persistence formats 1 session-storage format added (v3); IndexedDB version 1→2 Existing offline queues and retained attachments must migrate safely across browser upgrades.
Production versus test LOC Final coalescer follow-up: production net −10; regression/docs files also changed The refreshed behavior is a small corrective follow-up within a larger browser-storage and test change set.

Stored data model

Persistent data-model change detected: serialized state: ui/src/lib/chat/composer-draft-store.runtime.ts, serialized state: ui/src/lib/chat/control-ui-database.runtime.ts, serialized state: ui/src/pages/chat/outbox-browser.test-support.ts, unknown-data-model-change: ui/src/lib/chat/composer-draft-store.runtime.ts, unknown-data-model-change: ui/src/lib/chat/control-ui-database.runtime.ts, unknown-data-model-change: ui/src/pages/chat/outbox-browser.test-support.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete exact-head integration validation (recommended)
    Resolve mainline drift and verify persisted offline queues and attachment delivery on the resulting exact head before merge.
  2. Sequence with recovery migration
    Pause until the related queued-message recovery work has a confirmed compatible persistence boundary.

Technical review

Best possible solution:

Land only after exact-head integration validation is green and the browser-state owner confirms this persistence upgrade composes safely with the related queued-message recovery migration.

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

Yes for a source-backed browser harness scenario: the regression tests exercise concurrent payload preparation with mismatched and matching captured owners, although this read-only review did not execute them.

Is this the best way to solve the issue?

Yes: binding immutable binary references to their actual captured owner and coalescing only after per-caller eligibility checks fixes the prior alias-reclassification failure without weakening outbox ownership.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied final-candidate evidence describes an isolated Gateway flow with two retained 2,404,765-byte PNGs surviving reload and producing one send with two provider image parts; source tests additionally exercise the coalescer’s owner boundaries.

Label justifications:

  • P1: The changed path governs queued attachment delivery during active or recovered browser sessions, where failure can leave user messages parked.
  • merge-risk: 🚨 compatibility: The branch changes persisted Control UI session metadata and IndexedDB schema/version behavior for existing offline queues.
  • merge-risk: 🚨 message-delivery: The modified payload preparation and outbox hydration path runs before queued attachments are submitted through chat delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The supplied final-candidate evidence describes an isolated Gateway flow with two retained 2,404,765-byte PNGs surviving reload and producing one send with two provider image parts; source tests additionally exercise the coalescer’s owner boundaries.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied final-candidate evidence describes an isolated Gateway flow with two retained 2,404,765-byte PNGs surviving reload and producing one send with two provider image parts; source tests additionally exercise the coalescer’s owner boundaries.

Evidence

Acceptance criteria:

  • [P1] Resolve the current-main integration and run required exact-head hosted checks.
  • [P1] Exercise retained queued attachments through browser reload and recovery on the integrated head.
  • [P1] Confirm existing offline queue migration behavior alongside the related queued-message recovery work.

What I checked:

  • Refreshed coalescer owner validation: Payload preparation validates the retained reference against the queue, tab/reference identity, recovery scope, Gateway URL, and caller eligibility before it can be shared; routing alias changes do not mutate the persisted payload owner. (ui/src/pages/chat/outbox-payloads.ts:189, c2d2fc21b470)
  • Concurrent-call regression coverage: The refreshed tests cover mismatched queue/reference/tab/recovery owners and eligible matching callers, including re-checking state after asynchronous preparation. (ui/src/pages/chat/chat-send.test.ts:6983, c2d2fc21b470)
  • Persisted-owner implementation: The browser payload store keeps payload data behind an owner-bound reference rather than using mutable routing metadata as its storage authority. (ui/src/lib/chat/outbox-payload-store.runtime.ts:1, c2d2fc21b470)
  • User contract: The Control UI documentation describes retained attachment payloads, offline/reload behavior, duplicate-tab handling, capacity, and recovery outcomes. Public docs: docs/web/control-ui.md. (docs/web/control-ui.md:655, c2d2fc21b470)
  • Final-head provenance limitation: The final commit has parent 8023d67… and changes the coalescer/tests, but this partial checkout could not materialize raw parent blobs because its attempted promisor fetch failed DNS resolution; the review therefore does not make a raw-parent introduced-hunk claim beyond available host evidence. (ui/src/pages/chat/outbox-payloads.ts:189, c2d2fc21b470)
  • Area history: History on the central outbox owner includes attachment retention and cleanup work, supporting routing to current UI outbox contributors without asserting line introduction. (ui/src/lib/chat/outbox-store.ts:90, 17c9633444fb)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Resolve current-main integration and obtain green exact-head required checks.
  • Confirm compatibility with the related queued-message recovery persistence migration.

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 (7 earlier review cycles)
  • reviewed 2026-08-30T03:40:53.934Z sha f04666d :: found issues before merge. :: [P1] Fence cleanup with a lock-confirmed tab identity
  • reviewed 2026-08-30T03:55:07.777Z sha f04666d :: found issues before merge. :: [P1] Fence cleanup with a lock-confirmed tab identity
  • reviewed 2026-08-30T05:09:23.944Z sha 9761cb1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T05:54:19.851Z sha 9761cb1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T06:34:50.696Z sha 9761cb1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T07:11:43.171Z sha a15723d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T08:00:16.589Z sha 8023d67 :: found issues before merge. :: [P1] Keep payload references valid when resolving an unresolved queue

@steipete

Copy link
Copy Markdown
Contributor Author

Verified head: f04666d893d07abde80321582d52babaf4948c60.

The original native Chromium reproduction rejected two valid 2,404,765-byte PNGs before chat.send, retained the draft/previews, and admitted no queue row. With this repair, both files are durably stored before transport; queue metadata occupies 2,156 bytes plus the tab marker instead of more than 12.8 MB of UTF-16 image strings.

Real isolated Gateway proof passed on both Main and a normally created session, using a local synthetic provider. The driver waited for the seed's actual streaming model request, submitted both images through the active-run control, verified the exact outbound byte lengths and SHA-256 hashes, reloaded while browser custody remained, observed both decoded previews before model release, and completed with both images in the conversation. The provider recorded two image parts of 2,404,765 bytes each. Reload never repeated the attachment send. No operator Gateway, credentials, or private conversation data were used; all owned test services are stopped.

Local validation is green: 639 unit/browser tests, 15 native Chromium E2E tests, complete changed-file checks, full build, and fresh P0-scoped Codex autoreview. The PR body contains the exact validation commands, ownership/retention limits, and the separately recorded pre-existing Main recovery-routing issue.

Visual evidence publication is blocked in this session. Before/reload/completion screenshots and a sanitized video were captured and inspected, but the GitHub CLI guard rejects both the attachment command and authenticated REST upload with string rewrite protection blocked unsupported or unsafe input. No successful media upload is available, and no guard bypass or alternate credential was used. The local inspected evidence is retained under .artifacts/control-ui-e2e/outbox-capacity/ and .artifacts/control-ui-e2e/outbox-capacity-live/; the final video is public-flow-clean.mp4 (cropped synthetic main pane, half-speed playback for legibility). CI artifact links will be added if the UI lane emits them.

@steipete
steipete marked this pull request as ready for review August 30, 2026 03:49
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 30, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the cleanup-ownership finding in 9761cb13b29b31bfb57bdf477391e186174c8265.

The new native Chromium regression first failed at the exact missing-source-Blob assertion: the source still held its native lock and original queue metadata, while the duplicate removed its row before its denied lock callback was released. The sole payload deleter now awaits the lock-confirmed document identity and filters references there; the metadata collector no longer trusts the copied session-storage marker. The same test passes, reconnects the source with its original idempotency key and complete bytes, and verifies zero duplicate sends. Existing after-adoption source/copy retirement also passes.

CI exposed a second, distinct repair: explicit ACK-lost retry compared a live main route with canonical global storage after consuming its admission token. The existing E2E failed before and passes after reconciling the canonical stored row. The exact-version comparator remains strict, and retry preserves both its original idempotency key and transport route. Current-format storage fixtures/readbacks, authenticated same-owner test fixtures, unconditional cleanup, and the one-shot FileReader fault were corrected rather than weakening production ownership or timeouts.

Full local proof: 11,926 Control UI tests pass (86 existing skips), 39 native browser tests pass, complete changed-file checks pass, and the full build passes at 346,325 B startup gzip under the unchanged 346,761 B limit. Fresh isolated Codex autoreview is scoped-clean at P0; an independent source review plus the native red/green regression separately verified the P1 repair. Both final isolated real-Gateway flows (Main and a normally created new session) again retained both exact 2,404,765-byte PNGs through reload and delivered them once to the local synthetic provider. All owned test services are stopped.

The review's ownership-race, compactness, and upgrade-proof items are addressed: the two follow-up production fixes each add four net lines; legacy inline queues, blocked upgrades, old draft records, and failure-preserving migration remain covered. Whole-PR growth implements the explicitly approved browser binary-storage boundary, as explained in the PR body. No SQLite, protocol, product configuration, dependency, budget, or baseline change.

The inspected synthetic screenshots and final video remain local: this session's GitHub CLI guard rejects the attachment command and authenticated upload endpoint. No bypass, alternate credential, release, or repository proof asset was used. The PR body records this publication gap and the separate pre-existing Main history-routing follow-up. Exact-head CI is pending; this comment does not claim merge readiness.

@clawsweeper re-review — the canonical retry repair is an additional behavior change beyond the original cleanup finding.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 30, 2026
@steipete
steipete force-pushed the steipete/sweet-poincare-a26147 branch from 9761cb1 to a15723d Compare August 30, 2026 07:05
Store immutable browser outbox payloads as Blobs before admission, preserve complete bytes through terminal and reconnect handoff, and keep uncertain retries on their original submission identity. Preserve existing drafts and inline queues during upgrade; fail visibly without partial sends or a new volatile fallback. Fixes #132833.
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 30, 2026
@steipete
steipete force-pushed the steipete/sweet-poincare-a26147 branch from a15723d to 8023d67 Compare August 30, 2026 07:51
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Aug 30, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Final locally verified head: 8023d6754e635c2e3e0efc609b5de2387ab48115.

The final built candidate passed the real isolated-Gateway flow on both Main and a normally created new session, using only a local synthetic provider. Both valid PNGs are exactly 2,404,765 bytes; outbound SHA-256 values match the originals, reload retains both decoded previews while browser custody remains, and the provider receives two complete image parts with only one attachment send. The committed source fingerprint matches the live-tested files. All owned test services are stopped.

Local validation: 12,001 Control UI tests pass (86 existing skips), 44 native Chromium tests pass, and all 15 Code Mode recovery tests pass. Full build passes at 345,615 B startup gzip under the unchanged 346,761 B limit. Fresh full-candidate isolated Codex review is scoped-clean at P0 (0.94); the earlier P1 duplicate-cleanup race is separately covered by native red/green and independent source inspection. Exact commands and the persistence boundaries are in the PR body.

The last conflict preserved main's selected-session ownership and quota fixture repair and dropped our redundant fixture copy. One inherited typecheck error was corrected by importing the existing tool-owner metadata helper from its canonical leaf, preserving its policy and avoiding a heavy re-export; the exact failing typecheck and 15 owner tests now pass. That import repair is also present on the latest inspected main.

Exact-head CI run 33300196928 is still pending; this is local proof, not a hosted-green or merged claim. The later Main/global identity migration remains separate and its owner has been notified to integrate with the Blob contract rather than overwrite it.

The before/reload/completion captures and video were inspected and contain synthetic data only; no operator Gateway, credentials, private conversations, or private model identifiers were used.

Media publication gap: a fresh attempt through the documented gh pr comment --attach command was rejected by the active CLI guard with string rewrite protection blocked unsafe input. No partial comment or successful upload resulted. No alternate credential, transport, release, or repository-asset bypass was attempted. Inspected local proof remains under .artifacts/control-ui-e2e/outbox-capacity/ and .artifacts/control-ui-e2e/outbox-capacity-live/; the final video is verified-new-video.mp4.

Bind immutable attachment bytes to the queued input rather than mutable session aliases. Validate each caller before coalescing equivalent payload reads. Preserve gateway, authenticated recovery, reference, queue, and lock-confirmed tab ownership.

Reproduced alias reclassification and nine concurrent validation failures before repair; 403 focused tests, 12,013 UI tests, 44 native Chromium tests, changed gates, full build, fresh isolated review, and real Gateway two-image steering/reload proof pass. Production follow-up is net -10 lines. Refs #133052, #132833.
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the latest payload-scope finding in c2d2fc21b4703da17a95fafb177cca6e5c860b83, with an owner simplification rather than a copy/rebinding migration.

Immutable attachment bytes now belong to the generated queued-input ID plus exact opaque reference, Gateway, authenticated recovery owner, and source tab. Mutable routing remains in the queue metadata, including strict route/attempt/reference CAS. Physical deletion still requires the document's held Web Lock. Only queued-payload scopeKey was removed; composer-draft scope and metadata routing are unchanged. This follow-up is net −10 production lines, with no additional database version, schema, config, fallback, or routing policy.

Red → green: on the previous head, a real prepared/admitted PNG+PDF queue for agent:work:workspace survives a cold byte-registry reset, then configured mainKey=workspace reclassifies its metadata to global/work. Queue/run/reference identity survives and the original owner reads both exact files, but hydration returns missing. The same regression now hydrates and sends both files once with the original run ID. The review's ordinary before-first-hello producer was not established: defaults are published before recovery readiness and cold clients cannot prepare durable payloads. I did not manufacture a cold-start admission fixture; existing bare-main/raw-global metadata-resolution coverage remains green, while this regression exercises the established-client configured-alias transition.

The investigation also found a concurrent-preparation validation gap. Nine callers correctly rejected alone but incorrectly joined a valid pending read: wrong queue ID, reference source tab/recovery scope, Incognito, never-observed client, and mismatched attachment count/MIME/name/size. Each caller now passes eligibility before sharing work, and the coalescer key includes all retained validation inputs. All nine reds are green; matching-owner and remembered-offline controls remain ready and prove one shared read. Handoff stays allocation-free and async owner fences remain intact.

Final candidate proof: 403 focused owner tests; 12,013 full UI tests (86 existing skips); 44 native Chromium tests across eight complete suites; all 47-path changed checks; full build at 345,628 B startup gzip under the unchanged 346,761 B limit; fresh isolated Codex autoreview scoped-clean at P0 (0.94), with the known P1 independently verified by source and red/green proof. Exact commands are in the updated PR body. The inherited import correction is now also canonical on main through the metadata-leaf import fix.

Refreshed live proof: the final built source passes Main and normally created new-session flows against an isolated real Gateway with a local synthetic provider. Each of the two PNGs is exactly 2,404,765 bytes; outbound SHA-256 values match, both decoded previews survive reload while browser custody remains, the provider receives both complete image parts, and only one attachment send occurs. The final video repeats the new-session flow. All refreshed captures and the video contact sheet were inspected; served asset bytes and committed source fingerprint match. Both owned services are stopped. No operator Gateway, credentials, or private conversations were used.

Rank-up/merge coordination: this repairs the scope-stability move without retaining a mutable Blob routing identity. The two synthetic unresolved cold-start variants were deliberately not added for the producer reason above. Per the recommended serialized order, this attachment contract lands first; the owner of the separate Main/global identity migration has been notified to hold its merge, rebase onto the landed Blob contract, and prove its combined upgrade/recovery flow there. No unmerged recovery implementation was imported here.

Publication gap: the documented GitHub media upload remains blocked by the active CLI guard (string rewrite protection blocked unsafe input), as recorded in the earlier proof comment. The refreshed synthetic screenshots/video remain inspected local artifacts; no media attachment or upload URL is claimed, and no alternate transport, credentials, release, or repository-asset bypass was used.

The new exact-head CI is still required before native prepare/merge; the earlier green run is not used as proof for this follow-up. No prepare/merge intent has been created.

@clawsweeper re-review — the coalescer repair adds behavior beyond the previous scope finding, so please refresh the exact-head review.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 30, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at c2d2fc21b4703da17a95fafb177cca6e5c860b83: CI run 33302931394 completed successfully, including the required openclaw/ci-gate. Native review artifacts validated and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 133052 completed using hosted exact-head gates, with no head change or force push.

The refreshed ClawSweeper review has no actionable code findings. Its remaining exact-head and provenance gaps are resolved: the raw 8023 parent and exact four-owner-file patch are available and personally inspected here. A conflict-free Git integration tree against inspected main 3483c892e22ec5c77f2c9464b59f2740860c9f11 retains the exact live-tested bytes for 46/47 PR files; the sole difference is main's unrelated microphone translation string. Adjacent selected-session presentation changes preserve the existing outbox and pending-model/drain contracts. This is source-composition proof, not a claim of an additional combined-tree live run.

The approved persistence decision remains the bounded binary owner with complete-before-admission/transport guarantees, distinct draft retention, strict credential/reference/queue custody, and lock-confirmed deletion. The later Main/global recovery migration is still open and deliberately sequenced afterward; its owner must integrate and re-prove its browser-state upgrade against the landed contract. No unmerged migration was imported, and compatibility with that branch as currently written is not claimed.

Final proof remains 12,013 UI tests, 44 native Chromium tests, 403 focused owner tests, changed gates, full build, fresh isolated P0 review, and refreshed real-Gateway Main/new/video flows. Two exact 2,404,765-byte images survive reload and reach the local synthetic provider in one attachment send. Commands, red/green details, production/test deltas, and the concrete media-upload guard gap are in the PR body and full proof response. All owned test services are stopped; no operator Gateway or credentials were accessed.

Proceeding through the native merge wrapper, without an admin bypass.

@steipete
steipete merged commit baef6e0 into main Aug 30, 2026
195 checks passed
@steipete
steipete deleted the steipete/sweet-poincare-a26147 branch August 30, 2026 09:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
…enclaw#133052)

* fix(ui): retain large attachment batches in the reconnect outbox

Store immutable browser outbox payloads as Blobs before admission, preserve complete bytes through terminal and reconnect handoff, and keep uncertain retries on their original submission identity. Preserve existing drafts and inline queues during upgrade; fail visibly without partial sends or a new volatile fallback. Fixes openclaw#132833.

* fix(ui): preserve event ownership during outbox custody handoffs

* fix(ui): fence outbox cleanup and canonicalize retry checks

* test(ui): settle mixed-attachment responsive layout

* fix(agents): use canonical tool metadata in recovery

* fix(ui): keep queued payload identity independent of routing

Bind immutable attachment bytes to the queued input rather than mutable session aliases. Validate each caller before coalescing equivalent payload reads. Preserve gateway, authenticated recovery, reference, queue, and lock-confirmed tab ownership.

Reproduced alias reclassification and nine concurrent validation failures before repair; 403 focused tests, 12,013 UI tests, 44 native Chromium tests, changed gates, full build, fresh isolated review, and real Gateway two-image steering/reload proof pass. Production follow-up is net -10 lines. Refs openclaw#133052, openclaw#132833.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI rejects active-run image batches at reconnect storage quota

1 participant