Repository navigation
fix: revalidate unchanged managed image thumbnails - #156384
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed October 2, 2026, 9:09 PM ET / October 3, 2026, 01:09 UTC (Revision 7). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +32, Tests +210. Total +242 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
* 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 ...
|
Merged via squash.
|
* 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]>
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
200response. 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-Matchmatcher. 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
597ea98ed80cba98c9431edecbba3126fc8ff341has this head and maina39a4348b997a2e9265afafe9d6eaca618c93747as 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.tsand 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 unconditional200after thumbnail generation, stream closure and current-authority revalidation. This PR's final-byte ETag and conditional304behavior remain distinct.Preserve the existing signed private integration
28b276060af6b7383587d6e6199e94296ed7d001and 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
304response. Missing or stale validators preserve the existing200response and GET/HEAD behavior.Why This Change Was Made
The thumbnail response owner composes the existing byte digest and weak/list/wildcard
If-None-Matchmatcher. 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-initnow 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
fe38a0856b86f7069c41bec652f1c7a831e23632, treeb3eeb65018ac5658a769b770b5d3e8e8b1e6839f, incorporates mainbf2883a22e341cdc0cbbdd60fadfacf505b68c62. 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.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.e0259da5791d2f6074cb8e0ad3a501cc4a3d5e6cevidence 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.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 into1fda703fb4d3630e4633461967b2a2186e8f15fd; 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-loadedstage 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.