Skip to content

fix: revalidate unchanged managed image thumbnails - #156384

Merged
vincentkoc merged 8 commits into
mainfrom
fix/control-ui-m5-thumbnail-conditional-20260923
Oct 18, 2026
Merged

vincentkoc merged 8 commits into
mainfrom
fix/control-ui-m5-thumbnail-conditional-20260923

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Managed thumbnail responses cannot revalidate unchanged image bytes, so conditional GET and HEAD requests resend thumbnails instead of returning an empty 304.

User Impact

Authorized clients can reuse unchanged thumbnails. Missing or stale validators retain the existing 200 response. The current integration preserves bounded, width-aware WebP output and the existing ticket/cache policy; it adds no setting, migration or permission change.

Why This Change Was Made

The thumbnail response owner combines the existing final-byte digest and weak/list/wildcard If-None-Match matcher. Response delegation remains after stream closure, current-authority revalidation and the missing-thumbnail check. Full-media handling, disposition and security headers are preserved.

The four-path integration retains the original PR ancestry and frozen main cd4a35072fb0d7f5699961ba4aaef2da538db187. The last correction preserves real exports in the three test mocks; it does not change production code, test inputs or assertions.

Provenance: the original thumbnail implementation came from 77017, authored by @Ittiz. The authority flow from 154792, authored by @steipete, remains intact.

Evidence

Merged via native squash as dcbf2c725a8d. CI39096340012 completed successfully for 9b668920e7141b1b075a881866b7a8744e8f8903. Full source review and the subsequent mock correction review found no actionable findings.

  • Linux/Bun job117583773453 executed the exact conditional test file: six passed, zero failed, zero skipped, with all six expected case names verified. Its database-worker group passed23 cases across two files. Tested merge 597ea98ed80cba98c9431edecbba3126fc8ff341 has this head and main a39a4348b997a2e9265afafe9d6eaca618c93747 as its parents; all four changed blobs match the published candidate exactly. Log SHA256: df1e7ec870ea828500f56cdd18621762a18910c41431344d5112713f9bc096ca.

  • Current four-path formatting, mock-export ratchet, production/test types and lint passed. The actual mock-export command returned success; core lint includes the Gateway typed stripe. The exact-head native CI watcher completed green with zero pending checks. This proves the current partial-mock fixture without replaying the predecessor's completed sibling/baseline campaign.

  • Linux proof run39092915761, bound to predecessor 3f04a052551d5012147464ee51d96f9d1a0180ad, produced four intended missing-validator failures and two passing authorization controls on the frozen baseline; the repaired six cases passed with zero skips. Real loopback HTTP, decoded WebP dimensions, distinct width validators, ticket reauthorization, eviction stability and source changes were exercised. These are historical results after the mock-initialization correction, not current-head passes.

  • The same predecessor passed 57 sibling cases with zero skips: 46 managed-image, eight authority and three branch-retention cases. Production/core test types and lint passed. The initial sibling command had a nonexistent filename and ran no tests; only that missing leg was corrected.

  • The broad changed-check aggregate failed. Scoped formatter output and typed partial mocks address the two in-scope findings. Frozen-baseline execution separately reproduces the remaining graph budget and dead-export failures: gateway-root729 and infra741 exceed720; the candidate adds one gateway root. Dead-export inventories match exactly: 13 production, 19 full-tree, zero scripts. No cap, ignore, baseline exception or unrelated cleanup was added. These failures are not represented as passing checks.

  • The original lease completed and cleanup reconciled to exit0. Its GitHub Actions cancellation was owner cleanup after workload completion, not an application or provider failure.

  • The current-candidate Testbox never admitted a workload: it remained queued for the five-minute readiness deadline. Native stop reports completed, with cleanup exit5 retaining the claim/key because no GitHub run association exists. No current-head runtime result is claimed, and no allocation retry loop or local application execution was used.

Final Verification

Current-head Linux execution of src/gateway/managed-image-attachments.conditional.test.ts and all six expected cases, format/mock-export/type/lint checks, and required CI are complete. Native completed-hosted preparation and squash landing passed without a pending/admin exception. The native completion receipt is complete; the signed squash is reachable from main, and all four landed blobs match both the tested candidate and the inspected current main. Native checkout removal and registration absence were verified. The stopped, never-admitted Testbox claim/key remains separately retained pending authoritative GitHub run association; it is not an application-proof or merge blocker. ClawSweeper's retained integration/validation request is addressed by the published main integration and successful resulting-head CI; its old review is not relabeled as a review of this head.

The older UI-fixture failure and unexplained historical Windows behavior below remain preserved. Canonical fixes are incorporated in the current integration; their presence alone does not establish historical causality or qualify current CI.

Historical published-head evidence and failure investigation

Current Source Status (October 14)

Retain; not superseded or merge-ready. At inspected main 44898a369528, the thumbnail response path still returns an unconditional 200 after thumbnail generation, stream closure and current-authority revalidation. This PR's final-byte ETag and conditional 304 behavior remain distinct.

Preserve the existing signed private integration 28b276060af6b7383587d6e6199e94296ed7d001 and native preparation; do not recreate them or replay completed conditional/retention proof. The response delegation must remain after stream closure, authority revalidation and the missing-thumbnail check. Preserve cache/disposition/security headers and GET/HEAD behavior. The conditional test file and single worker-routing entry still need current-input integration review; this bounded source audit does not qualify the private candidate or unrelated main changes.

Full remote qualification remains unrun. The existing failed review and CI history below remain intact; after required current-input proof, follow ordinary native publication/review and green exact-head CI before squash. The prior helper/fixture repairs are historical integration context, not proof that the present candidate passes. No source edit, new runtime proof, native retry or landing is claimed.

Historical Published-Head Context

What Problem This Solves

Managed thumbnail responses lack a representation validator, so conditional GET and HEAD requests cannot revalidate the final PNG bytes.

User Impact

Authorized clients can reuse unchanged thumbnails with an empty 304 response. Missing or stale validators preserve the existing 200 response and GET/HEAD behavior.

Why This Change Was Made

The thumbnail response owner composes the existing byte digest and weak/list/wildcard If-None-Match matcher. Authentication, current transcript membership, authority, ticket expiry and file-descriptor validation still precede the response. Cache policy, disposition, security headers, rendition generation and full-media behavior remain unchanged.

The main integration preserves branch-retention behavior and current test routing. Moving filename/disposition handling into the existing thumbnail response owner keeps the caller within its unchanged size limit; no ratchet, assertion or timeout was relaxed.

Provenance: the original thumbnail implementation came from 77017, authored by @Ittiz. The later authority flow in 154792, authored by @steipete, remains intact.

Landing Status (October 3)

Preparation admitted; not merge-ready. The canonical UI fixture repair has landed. Native review validation and ordinary prepare-init now completed for this unchanged public head, retaining its failed CI result and exact run/attempt attribution. Earlier preparation receipts were preserved. No source integration, push, new application proof or merge is claimed by this control-plane step.

Next: integrate canonical main, complete build/check/test remotely, and publish through the native workflow. After publication, initialize a fresh review for the new head, preserving the superseded failed review, then require green exact-head CI and ordinary completed-evidence squash. Native merge refuses the currently active failed-CI review. Main's separate bootstrap line-cap defect still prevents full gates on those known-failing inputs; retain the existing owner handoff instead of replaying them. No pending mode, prior-CI admin admission, weakened checks or local application execution.

Evidence

  • Published candidate fe38a0856b86f7069c41bec652f1c7a831e23632, tree b3eeb65018ac5658a769b770b5d3e8e8b1e6839f, incorporates main bf2883a22e341cdc0cbbdd60fadfacf505b68c62. Composition proof passed five conditional HTTP cases and two branch-retention cases, with zero failures or skips. Separate single-worker command walls were 25.35s and 23.07s, including preparation. Explicit four-path formatting and diff checks passed; all 16 source pins remained unchanged. Controller exit0, native settlement and exact lease completion were verified independently. The portal-reporting timeout is separate from application proof and cleanup.
  • Response-owner proof, bound to earlier ff0094be5b5c5a06adb86110e94c432abfc1415a, passed five HTTP cases and all 34 selected checks, including 27 type graphs, production types, lint, formatting and repository guards. All 15 source pins and cleanup passed. These completed checks were not replayed for the composition-only follow-up.
  • Earlier integration passed 72 unique cases before failing the caller-size ratchet. That failed aggregate remains failed; the response-owner change addresses its cause without changing the bound. The first composition request was superseded in a pending Testbox budget slot before application execution. After verified admission recovery, the resumed request used the identical payload, source and limits.
  • Original e0259da5791d2f6074cb8e0ad3a501cc4a3d5e6c evidence remains separately bound: three intended conditional failures and two fail-closed controls on baseline, five positive loopback HTTP cases, 137 connected sibling cases and scoped checks. No original causal proof or unchanged sibling campaign was replayed.
  • Fresh scoped AutoReview and independent composition review found no actionable P0-P2 issue. Fixtures use real loopback HTTP, generated PNG bytes and native SQLite, with mocked authorization decisions and transcript context; no deployed-Gateway or live identity-provider proof is claimed.

Remaining Before Merge

Published-head CI completed with failure: Windows node shard 2 and the aggregate gate failed; no jobs remain running. The real UI validator fixture lacks asset-manifest.json. The shard recorded 132 passes, one failure and 19 skips. Its checkout merges this head into 1fda703fb4d3630e4633461967b2a2186e8f15fd; source comparison confirms the same main-side fixture mismatch blocking 157151. The separate fixture proof and canonical-owner handoff remain outside this thumbnail patch. No failed CI is waived.

That same job passed the formerly stalled checked-out-wrapper case in 1.779s. This is current Windows boundary evidence, not proof of the old stall's exact cause. The other four Windows jobs completed successfully, with test-step wall times of 5m23s, 4m21s, 5m27s and 3m57s for shards 1, 3, 4 and 5 respectively. Declaration-case identity and individual cost remain unverified: the first candidate log crossed this campaign's excluded-source boundary, so that read stopped without alternative retrieval. Job-level success does not supply that missing case-level evidence. No duplicate Windows proof has been launched.

Historical original-head CI remains failed. Its Windows job timed out before the wrapper fixture's identity-module-loaded stage under its unchanged 10-second child deadline. The declaration fixture took 208.156s against its 120-second budget, with successful measured child exits. The original import stall and Windows budget margin remain unproved.

This integration already includes 158086, which prepares the wrapper graph before the child deadline; the declaration cached-group correction; and 163374, which removes redundant compiler copying. These address specific owner work but do not establish historical Windows causality by themselves. 156011 was already present in the original head, not an absent fix.

The completed ClawSweeper review found no introduced source/security defect and requested Windows attribution and successful required CI. The bounded investigation above records the original failures, owner changes, current wrapper result and remaining uncertainty without claiming an established historical cause. Under the frozen test-failure policy, that unresolved history is documented rather than made an additional root-cause approval gate. The actual current UI-fixture failure still requires integration of the landed canonical correction and successful resulting-head CI before normal native landing. No unrelated-flake classification, inherited-red waiver or pending/admin shortcut is claimed.

@vincentkoc vincentkoc self-assigned this Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 2, 2026, 9:09 PM ET / October 3, 2026, 01:09 UTC (Revision 7).

ClawSweeper review

What this changes

The PR adds byte-based ETags and empty conditional GET and HEAD responses for managed image thumbnails, with HTTP regression coverage.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The PR remains useful: current main and the latest release still lack thumbnail ETags. No introduced correctness or security defect was found, and member-authored work remains open for the native landing workflow.

Priority: P2
Reviewed head: fe38a0856b86f7069c41bec652f1c7a831e23632

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused patch with meaningful boundary regressions and no actionable source finding; the documented landing gate remains separate from patch quality.
Proof confidence 🌊 off-meta tidepool Not applicable: Member-authored work is exempt from the external-contributor gate, and the diff does not materially change authority. Recorded loopback HTTP evidence exercises the production thumbnail response with generated PNGs and native SQLite; authorization and transcript context are mocked. Linked job logs were proxy-blocked, so reported subcommand results remain independently unverified. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Member-authored work is exempt from the external-contributor gate, and the diff does not materially change authority. Recorded loopback HTTP evidence exercises the production thumbnail response with generated PNGs and native SQLite; authorization and transcript context are mocked. Linked job logs were proxy-blocked, so reported subcommand results remain independently unverified. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: The verified merge-base-to-head diff introduces the conditional response owner, its caller integration, HTTP regression tests, and database-worker test registration.
Still necessary on current main: Fetched main generates the thumbnail, checks current authority, and unconditionally returns 200 without an ETag or thumbnail conditional matching.
Latest release comparison: The v2026.9.7 source likewise returns thumbnail responses without an ETag; this capability is not already supplied by the latest release.
Findings None None.
Security None None.

How this fits together

The Gateway serves generated-image previews after checking credentials or media tickets, transcript membership, and current authority. Its thumbnail response supplies PNG bytes to clients such as Control UI.

flowchart TD
  A[Client thumbnail request] --> B[Credentials or media ticket]
  B --> C[Transcript membership and file read]
  C --> D[Generate thumbnail and recheck authority]
  D --> E[Compare byte validator]
  E --> F[Unchanged response 304]
  E --> G[PNG response 200]
Loading

Before merge

  • Complete next step (P2) - Integrate main's landed staged-manifest fixture repair, complete the documented resulting-head validation, and publish through the native workflow with successful resulting-head CI.
Agent review details

Security

None.

PR surface

Source +32, Tests +210. Total +242 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 38 6 +32
Tests 2 210 0 +210
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 248 6 +242

Review metrics

None.

Technical review

Best possible solution:

Keep thumbnail validation in the response owner, using the shared byte digest and HTTP matcher after existing authority checks.

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

Yes, source establishes a focused path: conditional GET or HEAD to the current-main thumbnail route still returns 200 without an ETag. No application code was executed in this read-only review.

Is this the best way to solve the issue?

Yes, the patch composes existing validator helpers at the final response boundary and preserves ordinary responses and access checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 47286b0eaa45.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Thumbnail revalidation is a bounded HTTP improvement; existing image delivery remains functional.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Member-authored work is exempt from the external-contributor gate, and the diff does not materially change authority. Recorded loopback HTTP evidence exercises the production thumbnail response with generated PNGs and native SQLite; authorization and transcript context are mocked. Linked job logs were proxy-blocked, so reported subcommand results remain independently unverified. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

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

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 (6 earlier review cycles)
  • reviewed 2026-09-23T10:03:07.636Z sha e0259da :: needs changes before merge. :: none
  • reviewed 2026-09-23T11:29:59.060Z sha e0259da :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T05:37:05.224Z sha e0259da :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T05:45:38.077Z sha e0259da :: needs changes before merge. :: none
  • reviewed 2026-10-02T21:23:43.525Z sha fe38a08 :: blocked before merge. :: none
  • reviewed 2026-10-02T21:40:08.082Z sha fe38a08 :: needs changes before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 23, 2026 11:24
* commit '5c894c71b889408c0bf583ae4aa08e36129ab3a4': (178 commits)
  fix(gateway): keep worker bootstrap within lint limits (#163959)
  fix(media): preserve CR line boundaries in reply output (#163665)
  perf(plugins): admit plugins at load and delete the per-value boundary (#163818)
  feat(gateway): declarative role assignment by GitHub login (#163825)
  fix(release): 2026.10.1 plugin scan rejects reviewed inventory (#163920)
  fix(gateway): keep tool-policy config changes hot and drain forced restarts (#163931)
  fix(onboard): reruns overwrite trusted-proxy authentication (#150992)
  test(gateway): expect approved local legacy node capabilities
  refactor(reporting): bind plugin timers to service lifetimes (#163918)
  fix(gateway): report agent-store inspection as retryable while startup inspection continues (#163839)
  fix(test): route worker-state suites through brokers (#163915)
  fix(test): keep beta release fixtures version-independent (#163933)
  fix(telegram): keep queued albums alive and ordered per conversation (#163926)
  fix(test): stabilize update startup channel fixture (#163932)
  fix(release): derive future first-hop fixture versions (#163952)
  fix(test): parallelize model catalog fixture setup (#163944)
  test(infra): check policy parity without Swift aliases
  refactor(codex): split the session catalog index below the max-lines cap (#163809)
  test(plugins): remove low-value tests (batch d162) (#163951)
  test(cli): expect update reasons in JSON stderr
  ...
@vincentkoc
vincentkoc merged commit dcbf2c7 into main Oct 18, 2026
140 checks passed
@vincentkoc
vincentkoc deleted the fix/control-ui-m5-thumbnail-conditional-20260923 branch October 18, 2026 04:29
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
* fix: revalidate unchanged managed image thumbnails

* fix(gateway): integrate conditional thumbnail responses with main

* fix(gateway): keep thumbnail response handling in its owner

* fix(gateway): integrate thumbnail validation with attachment retention

* fix(gateway): integrate fixed main for CI

* commit 'f233854c1220a7370c087ef5e21a378c7d01e430': (178 commits)
  fix(gateway): keep worker bootstrap within lint limits (openclaw#163959)
  fix(media): preserve CR line boundaries in reply output (openclaw#163665)
  perf(plugins): admit plugins at load and delete the per-value boundary (openclaw#163818)
  feat(gateway): declarative role assignment by GitHub login (openclaw#163825)
  fix(release): 2026.10.1 plugin scan rejects reviewed inventory (openclaw#163920)
  fix(gateway): keep tool-policy config changes hot and drain forced restarts (openclaw#163931)
  fix(onboard): reruns overwrite trusted-proxy authentication (openclaw#150992)
  test(gateway): expect approved local legacy node capabilities
  refactor(reporting): bind plugin timers to service lifetimes (openclaw#163918)
  fix(gateway): report agent-store inspection as retryable while startup inspection continues (openclaw#163839)
  fix(test): route worker-state suites through brokers (openclaw#163915)
  fix(test): keep beta release fixtures version-independent (openclaw#163933)
  fix(telegram): keep queued albums alive and ordered per conversation (openclaw#163926)
  fix(test): stabilize update startup channel fixture (openclaw#163932)
  fix(release): derive future first-hop fixture versions (openclaw#163952)
  fix(test): parallelize model catalog fixture setup (openclaw#163944)
  test(infra): check policy parity without Swift aliases
  refactor(codex): split the session catalog index below the max-lines cap (openclaw#163809)
  test(plugins): remove low-value tests (batch d162) (openclaw#163951)
  test(cli): expect update reasons in JSON stderr
  ...

* chore: integrate canonical spawn boundary qualification repair

* fix(gateway): preserve WebP thumbnail revalidation on main

* test(gateway): preserve thumbnail fixture module exports

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant