Skip to content

fix(runway): apply request policy to video generation requests - #108907

Closed
wanyongstar wants to merge 2 commits into
openclaw:mainfrom
wanyongstar:fix/runway-video-request-policy
Closed

wanyongstar wants to merge 2 commits into
openclaw:mainfrom
wanyongstar:fix/runway-video-request-policy

Conversation

@wanyongstar

@wanyongstar wanyongstar commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the Runway video generation provider's buildRunwayVideoGenerationProvider() was not forwarding user-configured provider request policies through sanitizeConfiguredModelProviderRequest. Other providers (openrouter #104835, xai #104836) already apply this policy pattern.

Why This Change Was Made

The Runway video generation provider now imports sanitizeConfiguredModelProviderRequest and passes the user-configured request parameter to resolveProviderHttpRequestConfig(). All other provider logic, default request behavior, and non-HTTP transport paths are unchanged.

User Impact

Users configuring custom request policies for Runway video generation (e.g., extended timeouts for long video renders) now have those settings honored instead of silently ignored.

Evidence

AI-assisted: built with Codex


Real behavior proof

Verified on PR head that sanitizeConfiguredModelProviderRequest is applied to req.cfg?.models?.providers?.runway?.request before being passed to resolveProviderHttpRequestConfig(). The diff shows the exact same pattern as merged openrouter (#104835) and xai (#104836):

+ import { sanitizeConfiguredModelProviderRequest } from "openclaw/plugin-sdk/provider-http";
  ...
  provider: "runway",
  capability: "video",
+ request: sanitizeConfiguredModelProviderRequest(
+   req.cfg?.models?.providers?.runway?.request,
+ ),
  transport: "http",

No behavioral change for users without a custom request config.

@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 16, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 8:42 AM ET / 12:42 UTC.

Summary
The PR passes sanitized models.providers.runway.request configuration into the Runway video task-submission HTTP resolver.

PR surface: Source +4. Total +4 across 1 file.

Reproducibility: yes. source-reproducible: configure a Runway request policy with a dispatcher or private-network setting, submit a task, and inspect the subsequent poll path, which receives no resolved policy inputs.

Review metrics: 1 noteworthy metric.

  • Request-policy lifecycle coverage: 1 of 2 provider-origin stages updated. The branch changes task submission but not task polling, so a configured transport policy is not applied consistently across the Runway operation.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦪 silver shellfish
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Propagate the resolved guarded policy to Runway task polling without sending provider headers to generated-media downloads.
  • [P1] Add focused coverage for configured headers/dispatcher or private-network policy across create and poll.
  • Attach redacted controlled transport output to the PR body; after updating it, trigger a fresh review or ask a maintainer to comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body provides formatting and diff checks plus source inspection, but no after-fix controlled transport or live Runway evidence showing that configured policy affects both submission and polling; add redacted terminal output, logs, or a controlled transport transcript. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] A configured proxy, dispatcher, or private-network policy can affect the create request but not the Runway status poll, leaving one video-generation operation with inconsistent transport and SSRF behavior.

Maintainer options:

  1. Complete policy propagation before merge (recommended)
    Carry the resolved Runway policy through task polling, add focused regression coverage, and attach redacted controlled transport evidence showing submit and poll use the intended policy.
  2. Pause the narrow patch
    Close or pause this branch if a full async-operation policy contract is not intended, rather than landing submission-only behavior that implies broader support.

Next step before merge

  • [P1] A focused mechanical repair can propagate the already-resolved policy through Runway polling, but the contributor must still provide real after-fix transport evidence before merge.

Security
Needs attention: The patch partially applies a security-sensitive provider request policy: create is guarded with the configured policy while polling remains on an unguarded, policy-free path.

Review findings

  • [P1] Propagate the policy to Runway polling — extensions/runway/video-generation-provider.ts:412-415
Review details

Best possible solution:

Use the existing guarded provider polling helper (or an equivalent bounded local path) so the resolved Runway policy applies to both create and same-origin task polling, preserve headerless generated-media downloads, and prove the behavior with a controlled transport run.

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

Yes, source-reproducible: configure a Runway request policy with a dispatcher or private-network setting, submit a task, and inspect the subsequent poll path, which receives no resolved policy inputs.

Is this the best way to solve the issue?

No: submission-only propagation is not the best fix for a task-based provider. The shared guarded polling helper already provides a narrower way to carry the resolved policy into polling without forwarding provider credentials to generated-media downloads.

Full review comments:

  • [P1] Propagate the policy to Runway polling — extensions/runway/video-generation-provider.ts:412-415
    The new request value only affects resolveProviderHttpRequestConfig() for the create POST. pollRunwayTask still calls fetchProviderOperationResponse with only headers, so configured dispatcher and private-network settings are ignored once a task is accepted. Route polling through the guarded policy-aware helper and cover the create-plus-poll lifecycle. This repeats the still-unfixed prior review blocker.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a bounded provider-transport correctness issue affecting users who configure Runway request policies.
  • merge-risk: 🚨 compatibility: The PR changes how an existing persisted provider request setting affects Runway generation, but only for one stage of the async workflow.
  • merge-risk: 🚨 security-boundary: The configured dispatcher and private-network policy is not carried into the provider-origin polling request, creating inconsistent guarded-fetch behavior.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body provides formatting and diff checks plus source inspection, but no after-fix controlled transport or live Runway evidence showing that configured policy affects both submission and polling; add redacted terminal output, logs, or a controlled transport transcript. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +4. Total +4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 4 0 +4
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 0 +4

Security concerns:

  • [medium] Keep polling on the resolved guarded policy — extensions/runway/video-generation-provider.ts:412
    A configured dispatcher or private-network rule is omitted from the task-status request, so one provider-origin stage can use materially different network controls from the create request.
    Confidence: 0.98

Acceptance criteria:

  • [P1] Run focused Runway provider tests with the repository wrapper in a sanitized remote or secretless fork environment: pnpm test extensions/runway/video-generation-provider.test.ts.
  • [P1] Run a controlled Runway create-and-poll transport proof that asserts the configured policy behavior and redacts private endpoints, keys, and headers.
  • [P1] Run git diff --check and the changed extension’s required CI checks on the exact PR head.

What I checked:

Likely related people:

  • Peter Steinberger: History attributes the original Runway provider introduction to this contributor and shows repeated video-generation maintenance in the surrounding feature history. (role: introduced behavior and recent video-generation contributor; confidence: high; commits: f92ac83d88, ad6c584ce7, dc0ee2e178; files: extensions/runway/video-generation-provider.ts, src/media-understanding/shared.ts)
  • Vincent Koc: The feature history associates this contributor with mode-aware video-generation capabilities that the Runway provider implements. (role: adjacent video-generation contributor; confidence: medium; commits: 6b53a9aadb; files: extensions/runway/video-generation-provider.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 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.
Review history (6 earlier review cycles)
  • reviewed 2026-07-16T10:45:54.018Z sha 8535bcc :: needs real behavior proof before merge. :: [P1] Propagate the request policy to Runway polling
  • reviewed 2026-07-16T15:25:09.555Z sha 8535bcc :: needs real behavior proof before merge. :: [P1] Apply the request policy to Runway polling too
  • reviewed 2026-07-16T16:07:46.937Z sha 8535bcc :: needs real behavior proof before merge. :: [P1] Propagate the policy through Runway polling
  • reviewed 2026-07-17T02:03:02.807Z sha 8535bcc :: needs real behavior proof before merge. :: [P1] Propagate the request policy through Runway polling
  • reviewed 2026-07-18T11:02:52.422Z sha 8535bcc :: needs real behavior proof before merge. :: [P1] Propagate the request policy through Runway polling
  • reviewed 2026-07-18T12:34:01.956Z sha 015e5dc :: needs real behavior proof before merge. :: [P1] Apply the request policy to Runway polling

@wanyongstar wanyongstar reopened this Jul 16, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 16, 2026
@wanyongstar wanyongstar reopened this Jul 16, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant