fix(pdf): guard native provider requests#97872
Conversation
|
Behavioral and compatibility proof for ClawSweeper, updated for commit What changed in the blocker fix:
Fresh real endpoint proof at the pushed SHA:
{"sha":"6be4158786c0441521c95dd4f7fddaac638c020f","exactOrigin":"loopback-ok","offOriginWithoutOptIn":"blocked","offOriginWithOptIn":"loopback-ok","sdkReturnHasTrustField":false,"coreReturnTrustsConfiguredOrigin":true}Guard diagnostic for the denied redirect: Fresh validation on the committed tree:
Commit: eleqtrizit@6be4158 |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 6:50 PM ET / 22:50 UTC. Summary PR surface: Source +113, Tests +109. Total +222 across 6 files. Reproducibility: yes. for source-level review: current main still uses direct native PDF provider fetches with bare success JSON parsing and no model request transport metadata. The contributor also posted live loopback output proving the guarded after-fix behavior. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the guarded native PDF transport after maintainers explicitly accept the stricter native provider network boundary and normal required checks are green. Do we have a high-confidence way to reproduce the issue? Yes, for source-level review: current main still uses direct native PDF provider fetches with bare success JSON parsing and no model request transport metadata. The contributor also posted live loopback output proving the guarded after-fix behavior. Is this the best way to solve the issue? Yes, with maintainer acceptance of the boundary change: reusing the shared guarded provider HTTP path is the narrow owner-boundary fix, and the latest head preserves the SDK-facing resolver shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cbdbb22c603e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +113, Tests +109. Total +222 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
* fix(pdf): guard native provider requests * fix(pdf): preserve configured origin trust * fix(pdf): preserve resolver compatibility
* fix(pdf): guard native provider requests * fix(pdf): preserve configured origin trust * fix(pdf): preserve resolver compatibility
* fix(pdf): guard native provider requests * fix(pdf): preserve configured origin trust * fix(pdf): preserve resolver compatibility
* fix(pdf): guard native provider requests * fix(pdf): preserve configured origin trust * fix(pdf): preserve resolver compatibility
Summary
Route native Anthropic/Gemini PDF provider requests through OpenClaw's shared guarded provider HTTP path.
Changes
resolveProviderHttpRequestConfigandpostJsonRequestfor native PDF provider POSTs.res.json()parsing with boundedreadProviderJsonResponseparsing.allowPrivateNetworkopt-in, and oversized successful JSON responses.Validation
corepack pnpm install --frozen-lockfilenode scripts/run-vitest.mjs src/agents/tools/pdf-native-providers.test.ts src/agents/tools/pdf-tool.test.tscorepack pnpm format:check -- src/agents/tools/pdf-native-providers.ts src/agents/tools/pdf-tool.ts src/agents/tools/pdf-native-providers.test.tscorepack pnpm tsgo:core.agents/skills/autoreview/scripts/autoreview --mode local --parallel-tests "node scripts/run-vitest.mjs src/agents/tools/pdf-native-providers.test.ts src/agents/tools/pdf-tool.test.ts"clean, no accepted/actionable findingsNotes
corepack pnpm check:changed -- src/agents/tools/pdf-native-providers.ts src/agents/tools/pdf-tool.ts src/agents/tools/pdf-native-providers.test.tsdid not run checks because the delegated Blacksmith Testbox path failed at localcrabboxbinary sanity checks before executing the lane.