Repository navigation
fix: restore media uploads through protected egress - #144902
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: blocked before merge. Reviewed September 12, 2026, 10:01 PM ET / September 13, 2026, 02:01 UTC (Revision 12). ClawSweeper reviewWhat this changesThe PR preserves measured lengths for bounded uploads through the protected-egress proxy, adds resource and authorization coverage, documents limits, and aligns a companion-plugin test expectation. Merge readiness⛔ Blocked before merge - 4 items remain This remains a useful correction: current main still loses fixed-length upload framing. No actionable code defect was found, but the documented operating-envelope decision remains outstanding. Priority: P2 Review scores
Verification
How this fits togetherThe protected-egress proxy lets Gateway-hosted commands use credentials without receiving their plaintext. It authenticates the run, checks destination bindings, substitutes protected values, and forwards HTTPS requests. flowchart TD
A[Gateway command upload] --> B[Authenticate run and destination]
B --> C{Known length within limit?}
C -->|Yes| D[Reserve memory and collect bytes]
D --> E[Recheck bindings and substitute]
E --> F[HTTPS with measured length]
C -->|No| G[Scanned chunked streaming]
G --> H[Destination response]
F --> H
Decision needed
Why: The implementation and transport proof support the bounded fix, but accepting new collection latency and capacity/timeout refusals requires owner judgment explicitly left outstanding in the PR. Before merge
Agent review detailsSecurityNone. PR surfaceSource +230, Tests +714, Docs +6. Total +950 across 10 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one forwarding owner with measured lengths, unchanged scanning and revocation, and an explicitly accepted operating envelope for existing installations. Do we have a high-confidence way to reproduce the issue? Yes: current main strips fixed-length framing, and the supplied real CONNECT/TLS control demonstrates rejection by a length-requiring origin. This read-only review did not execute a reproduction. Is this the best way to solve the issue? Yes for bounded fixed-length interoperability: the patch reuses the existing scanner and forwarding owner while checking current authority before sending. The operating limits still need explicit owner acceptance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 745ee6af3429. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
cf6d822 to
8602bab
Compare
|
@clawsweeper re-review Please review head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8602bab to
1ea7231
Compare
|
Head |
Preserve fixed-length upload framing after bounded, destination-authorized substitution while retaining larger and unknown-length streaming. Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: VACInc <[email protected]>
Validate the safe-integer, nonnegative, and 100 MiB contract at the allocation boundary. Keep routing, aggregate reservations, request count, and deadlines unchanged; use the existing refusal and cleanup path. Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: VACInc <[email protected]>
Keep safe-integer, nonnegative, and inclusive 100 MiB validation beside Buffer.allocUnsafeSlow in a private owner. Preserve admission, resource limits, streaming, and the existing caller cleanup boundary. Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: VACInc <[email protected]>
Keep the exact upgrade-survivor assertion aligned with the upstream producer, which now supplies the default discord plugin ID. Retain strict equality for all four baseline versions; no runtime or allocator contract changes. Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: VACInc <[email protected]>
f2967ed to
d77f100
Compare
vincentkoc
left a comment
There was a problem hiding this comment.
SecOps reviewed exact head d77f100320b6241eb02b0ac83b7a26e9027a824c and accepts the documented 100 MiB per-request, 128 MiB shared, 64-request, and five-minute buffering envelope. The change preserves per-run proxy authentication, exact-host secret binding, send-time authority checks, binary sentinel scanning, TLS verification, and run-revocation resource ownership.
Approved for the demonstrated transport/framing restoration. Successful authenticated GitHub attachment acceptance/readback remains separate product proof. A separate narrow follow-up will tighten cancellation granularity while sending an already-buffered body, without changing these limits or security boundaries.
|
Merged via squash.
|
* commit '2acbeee461474b6ba41f5186ae1a4e0e80f4087a': (117 commits) fix(ui): import the shared deferred helper in sidebar scope tests (#146862) fix(ui): copy chat content from its context menu (#146679) perf(memory): defer legacy sidecar writer imports (#146815) fix(e2e): accept expected Kitchen Sink worker rejection (#146681) fix(ui): distinguish absolute and relative file links (#146572) feat(ui): keep file previews in tabs and render HTML (#146672) refactor: reuse shared deferred promises in UI tests (#146670) fix: gateway stop/restart refuses a healthy gateway when the Windows process snapshot misses (#146387) improve(crabbox): keep healthy cloud desktops warm on resume (#146816) fix: report blocked SQLite WAL checkpoints in status and doctor (#146775) feat: share browser dashboards with agents (#146702) fix(doctor): continue repairs after legacy agent directory collisions (#146092) feat(agents): retry cyber-refused embedded turns on Daybreak (#145291) fix: restore media uploads through protected egress (#144902) refactor(qa): share capture filter rendering (#146696) fix(cli): keep running stream jobs visible as running (#146793) refactor(parallels): share gateway readiness loop (#146694) fix(sessions): avoid rewriting already-consumed input on release (#146795) fix: preserve scheduled conversation delivery after Doctor (#146794) perf(ui): avoid redundant session-row provenance work (#146797) ...
Send buffered protected-egress uploads in cancellation-aware 64 KiB slices, honoring backpressure and rechecking live run authority before each write and final end. Preserve measured framing, substitution, TLS, destination authorization, and transport-owned reservation release. Six deterministic cancellation regressions cover revoke, stop, and disconnect across drain and next-turn continuations. Exact-head CI and security checks pass; ClawSweeper reports no findings. Already-submitted bytes remain in flight. Follow-up to #144902.
Preserve fixed-length upload framing after bounded, destination-authorized secret substitution while retaining larger and unknown-length streaming. Keep per-run authentication, exact-host binding, current authorization checks, binary integrity, TLS verification, and revocation resource ownership. SecOps accepts the documented 100 MiB per-request, 128 MiB shared, 64-request and five-minute operating envelope. Real transport coverage proves the framing correction; authenticated GitHub attachment acceptance/readback remains separate product proof. Related: openclaw#144662 Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: VACInc <[email protected]>
…w#146840) Send buffered protected-egress uploads in cancellation-aware 64 KiB slices, honoring backpressure and rechecking live run authority before each write and final end. Preserve measured framing, substitution, TLS, destination authorization, and transport-owned reservation release. Six deterministic cancellation regressions cover revoke, stop, and disconnect across drain and next-turn continuations. Exact-head CI and security checks pass; ClawSweeper reports no findings. Already-submitted bytes remain in flight. Follow-up to openclaw#144902.
Related: #144662
What Problem This Solves
Fixes: destinations requiring a fixed request length reject uploads through protected egress even when the client supplies the correct file size.
User Impact
User impact: known-length uploads up to 100 MiB preserve their bytes and use the measured outgoing length after authorized secret substitution.
Buffered uploads share a 128 MiB reservation budget, including 256 KiB headroom per request, with at most 64 requests preparing or sending. Capacity exhaustion returns 503; the five-minute preparation/send deadline returns 504. Larger or unknown-length uploads retain scanned chunked streaming and can still be rejected by fixed-length-only destinations. Listed security-owner acceptance of this operating envelope remains outstanding.
Why This Change Was Made
The existing forwarding owner collects bounded bodies, rechecks current run/destination/credential authority, and reuses the binary scanner before sending. The allocation site also directly validates a safe, nonnegative integer length within the existing 100 MiB ceiling immediately before allocating. Routing, budgets, deadlines, TLS verification, and cleanup are unchanged; no clamping, new configuration, or body-file storage is introduced.
Evidence
Worked on by @IWhatsskill and @VACInc.