Skip to content

feat(pdf): add explicit OpenAI native document opt-in - #127770

Open
shannon0430 wants to merge 87 commits into
openclaw:mainfrom
shannon0430:fix/openai-native-pdf-transport
Open

shannon0430 wants to merge 87 commits into
openclaw:mainfrom
shannon0430:fix/openai-native-pdf-transport

Conversation

@shannon0430

@shannon0430 shannon0430 commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenAI Platform users cannot explicitly choose native PDF document input through the PDF tool while preserving existing upload and model-selection behavior.

User Impact

agents.defaults.pdfNativeOpenai: true opts an already-selected OpenAI vision model into complete-document input. Unset or false preserves extraction and the existing provider order, including saved configurations upgraded from the latest stable release. Selecting an OpenAI model alone does not authorize complete-document upload.

Page selection, passwords, unknown completeness, page/text/image truncation, size-limit violations, custom endpoints, Codex/ChatGPT transports and text-only models retain bounded extraction. Completeness checks still require the configured extractor. Existing Anthropic and Google paths are unchanged.

Implementation

This replaces the earlier automatic-upload/provider-preference proposal with one default-off core boolean at the existing PDF configuration owner. The bundled OpenAI provider implements a narrow optional media-understanding hook using the official PDF input contract: inline input_file, official Platform HTTPS /v1/responses, store: false, each PDF under 50 MB and combined PDF input at most 50 MB. There is no persistent Files upload, automatic provider preference or new dependency. The official configuration generator records the single additional core leaf; channel/plugin surfaces are unchanged.

Prepared credentials, headers and symbol-attached request/auth overrides use the existing scoped egress helpers. The native branch also reuses the host-owned withGuardedFetchRequestAuthority scope with assertModelCurrent, the original model's credential authority and the retained provider-resource assertion. The existing HTTP guard rechecks these synchronously immediately before dispatch after asynchronous preparation and on redirects. This closes the assert-only operator/credential retirement gap across lazy provider and DNS awaits without adding an authorization abstraction or changing shared HTTP behavior.

Capability adoption and the proposed setting placement remain normal maintainer product decisions. This branch provides a concrete default-preserving candidate for that decision.

Evidence

Current main integration — 2026-11-17 UTC

Current head: 8b861d6974eb48062717f6e79481a9b5fe067057; pinned official main: a958f1d25c1d77aff39bfcbf86d0d4c7bd8f539a. The normal merge had one generated config-baseline conflict, regenerated by its canonical owner. The explicit default-off OpenAI native PDF implementation and tests are unchanged.

Focused current-head proof passed 50 config, prepared-runtime, authority, PDF tool, and OpenAI transport assertions. Config docs and staged diff checks pass. No paid provider request or maintainer workflow approval was performed.

Earlier validated head: 95d83ad28f203ee6ec15ad60f69c06060a7235a5. Exact-head CI39994486818 passed: 75 jobs (47 success, 28 skipped), no failures or pending jobs.

  • 160 distinct relevant tests passed cumulatively: 128 PDF/provider/sibling/config tests, 26 official subagent-fixture tests and 6 new authority controls. The final-effect follow-up's affected suite is 48/48 (6 authority, 13 opt-in, 29 existing PDF), a subset of that total. Full/runtime builds, affected production/test typechecks, targeted lint/format, SDK exports, schema/docs and formal extension/core graph boundaries pass. Independent full-candidate, credential-handoff and final-effect reviews found no actionable P0/P1 defect.
  • Authority red/green: before the fence, each of four retired-owner cases sent one synthetic HTTP request. After it, operator and physical-credential retirement after provider or DNS awaits each require reached-injection, the correct owner failure, HTTP0 and no completion fallback. Allowed and nearest-forbidden controls also pass. Provider cases use the real bundled callback; DNS cases use the real guarded-fetch lookup seam. These are authority-owner tests, not live credential rotation.
  • Published stable 2026.10.6 saved-config upgrade: verified official artifact integrity, authored ordered settings with the published CLI, then validated and edited the same isolated saved state with the built candidate CLI. Ordering and limits are preserved, absent remains absent and explicit false remains false. This is configuration compatibility proof.
  • Earlier real OpenAI API proof: the actual PDF tool/prepared provider/extractor, using synthetic documents only, returned HTTP200 and expected results for native input and four extraction cases (unset, selected page, password/encrypted, configured text-only). An initial HTTP401 exposed the scoped sentinel-handoff error; the corrected native request returned HTTP200, native=true and expected values. Its successful result was reconciled without replay after a harness-only model-label assertion correction. This proof is bound to preceding implementation head ac5c3699; the relevant native transport/payload owners remain unchanged. It is separate from the real Gateway proof below.

Real isolated Gateway, normal agent route

The built official CLI and GatewayClient used real pinned WSS admission, health RPC, one durable synthetic profile, normal agent/same-run agent.wait, deliver: false, and actual users.setRole plus effective-role readback. The planner model remained allowed while the nearest negative excluded only the PDF model. PDF model/fallback selection was fixed explicitly.

The Gateway ran the actual run-owned PDF tool. Its planner/PDF HTTP used a synthetic loopback sink through the existing runtime-dependency seam, retaining real DNS/Agent/pinned dispatcher and the final synchronous HTTP authority check. Body/auth inspection was in memory only.

Condition Planner HTTP Native PDF HTTP Extraction PDF HTTP Observed result
Allowed 2 1 0 Expected actual PDF tool result; pinned dispatcher observed
Same-profile/scopes, PDF model denied 2 0 0 Actual model refusal while planner remained usable
Role retired while PDF input held 1 0 0 Official owner change; original run ended/error and active root work returned 1 → 0 after release before HTTP0 was recorded
pages: "2" 2 0 1 Selected-page BETA present; excluded-page ALPHA absent

All four submissions occurred once, and the original runs reached terminal state with backend work settled. The held-input Gateway retirement proves actual operator wiring; precise provider/DNS timing is covered separately by the focused red/green tests above.

The seven planner requests and seven other intercepted requests are counted separately. The latter remain unclassified and are not treated as PDF/fallback proof; there is no all-process external-egress claim. Gateway runtime build 4b0f4c12 was exercised from test-only source head 7c7816f3, with explicit runtime-owner bindings to this head. The build is not relabeled as a build of the later merge commit. No production service, employee role, customer document or real channel delivery was used. All task-owned Gateway/driver processes and temporary credential/config/profile/TLS/log state, including failed attempts, have been removed.

Current main integration (2026-11-18)

Exact head: c9a6ed237a73a7aa1fd0ca3bc825772f64939e85. Normally merged pinned official main f7c6804343843245d8ab6f37a91675ecc257a7b9 and regenerated the config counts/hash with their canonical generator. Main changed the test helper from (agentDir, options) to (options): the old second argument was ignored, producing 10 focused failures. Both authored fixture callers now use its current signature; production PDF behavior is unchanged.

The same 50 focused config, prepared-runtime, PDF-tool authority/opt-in, and provider-transport assertions now pass. Targeted agent-tools test typecheck, focused lint/format, config:docs:check, the authored diff whitespace check and publication secret gate pass. Historical paid-provider proof stays bound to its original head and scope; no paid request, channel send, workflow approval, or duplicate hosted re-review was performed here. Maintainer contract adoption and current-head native CI remain separate.

CI and Review Follow-through

Earlier CI found the generated config baseline and an inherited subagent fixture problem. Later official main changed that fixture's completion contract, so the borrowed adjustment was retired in favor of the exact official fixture files and its negative assertion. An authority test's private-extension import was also replaced with the existing public bundled-provider facade; both formal boundaries pass. These repairs add no PDF production behavior.

Previous implementation CI 39968310938 and authority CI 39986691358 passed at their respective heads. A final true conflict against official main 53fb615a was limited to the generated configuration hash. This branch normally merges that fixed main and resolves the hash with the official generator. Independent blob review preserves the feature/authority/Gateway owners; the only tracked help-file change comes from official main. Current-head CI is reported above separately from preceding evidence.

The items in the prior/current review are covered by explicit consent, bounded fallback, actual conflict repair, a concrete opt-in proposal, published-stable compatibility, the final-effect authority fence and actual Gateway evidence. The later evidence reminder is addressed by this refreshed evidence and description. The remaining adoption, setting-placement and merge decisions belong to maintainers.

2026-10-24 current-main integration

  • Merged upstream main at 05bc4bf5c9fc717841df38d169bb69fa3d88a52a normally into candidate f43a6edbca54b5e3ac6d288f0a9e79e919d6e427; no force push. The only merge conflict was the generated config-baseline hash, regenerated from the merged schemas.
  • Revalidated 40 focused PDF/config/authority tests, config-doc and Plugin SDK export/API contracts, core/extension/extension-test typechecks, touched-file type-aware lint and formatting, the full build (157 SDK subpaths), and a fresh P0/P1 autoreview with no actionable finding.
  • The prior real OpenAI/Gateway evidence remains applicable because the provider transport and final-effect authority owners are unchanged by the main integration; the changed generated baseline was regenerated and checked at the new head.

Current main integration — 2026-10-27

Integrated official shared-budget ancestor a6c, retaining6300000 (#185911 proposal), with no generated-file conflict. The exact official786 borrowed-workspace caller replaces our duplicate implementation; native-PDF defaults, provider/header behavior, lease/configless/metadata/foreign/freshness guards remain intact. Direct feature/caller inputs are unchanged. Fresh affected-boundary proof covers6 PDF final-effect authority cases and7 hello-first queue cases, plus current types and counter (6287819/6300000). Earlier real catalog HTTP/image/withdrawal proof retains its measured scope. The immutable candidate passes independent P0-P2 review and the fixed32679 merge model.

Integration base: a6c11850723c4c47fa30eba37d7a58dff9ef8ec4. Current PR head: 67fa979b96a30e6b8afa6de5a354887a70beaba4.

This exact head passed the hosted CI gate, including dependency and security-sensitive review. All current check lanes completed without failures. Previous-head results are not counted as this head's CI proof.

The existing maintainer adoption decision remains open. No downstream runtime or modified package was distributed.

2026-11-11 config-conflict maintenance

Integrated official main a38ea90f53272bd6e64ea7230d6556523d05c7aa to resolve actual generated-config conflicts and regenerated artifacts with their owning generators. The focused five-file PDF command, generated config checks, and the test-line ratchet against the exact prepared main all passed. The existing 661-line regression allocation and shared scalar are unchanged.

The earlier UI fixture failures map to official fixes #197016 and #197036 in that main. The earlier six-line test-budget excess was inherited from the exact CI base, rather than missing feature allocation. Current-head native CI 43034022492 completed successfully on attempt 1: 72 terminal jobs (44 success, 28 skipped), with no failures or reruns. The immutable CI merge contains exact PR head 5e609f185572a4c6dc2fc16a2cac0376956bcb2a and official main 04e941df29283d3c7a2e770c552a464e465f47ad. This maintenance provides no new live provider, Slack transport or employee-runtime acceptance.

2026-11-13 generated-conflict maintenance

Current published head 5f606b7b09e1426fa80d607a20509f93c02f21e8 normally merges immutable official main 439a9c3552da1e939803fc3c69d87bc6e16a6553 into the existing branch. The actual conflicts were the generated config counts and hash outputs; both were regenerated by their canonical owner. All 19 non-generated contribution inputs remain byte-identical to the preceding public head ed7cb9aba08f41dc422e843874ad12d02368218b.

Focused PDF/config/authority tests, core and OpenAI type-aware lint and typechecks passed. Canonical config/base-schema/bundled-channel checks, formatting, whitespace and the test-line ratchet against that exact main passed. Existing assertions, timeouts and allocations are unchanged. Native wrapper totals are routed pass events, so no distinct whole-suite test count is claimed. Earlier public Gateway/provider proofs retain their dated scope; no new provider transport or employee acceptance is claimed. The new head's first native CI is tracked independently from these local checks. Feature adoption and official package delivery remain maintainer decisions.

Exact-head CI disposition — 2026-11-13

The exact head's first native CI43436898958, attempt1, is terminal FAILURE, with the four post-cancel completion assertions in src/gateway/talk/handlers/client-native-control.test.ts:474 and the dependent CI gate. Actual logged checkout a407c3b16e2bce157197dafb43961f286944b8d8 has official main parent 6eb8095ae971f51bfa547644d4d249c21ebb8335 and this exact PR-head parent. The four controls are transcript-first/rejection, delegation-first/rejection, transcript-first/empty and delegation-first/partial.

Merged official #198248 explicitly documents the same four remaining post-readiness-repair assertions in its own CI43420254088. Its repair is already present in this prepared and actual source. The existing producer-retention proposal #179237 remains unmerged; its one-line probe is not full integration acceptance and was not applied here. Matching direct owner bytes and this official failure evidence identify the existing owner dependency; they do not claim that we executed the exact pure CI base or excluded every indirect interaction. Required CI remains blocking. No unrelated patch, CI rerun, assertion/timeout/line-budget change or private runtime was added.

Current upstream integration

Merged upstream main 20c363dbd03b into 062e51f5b767. Regenerated the configuration documentation baseline. The targeted PDF routing, authority, configuration and runtime context tests passed. Hosted CI awaits maintainer approval.

Published stable 2026.11.10 wrote an ordered PDF model and fallback list and two limits in an isolated saved configuration. The built candidate a75fd7c50718 validated and edited the same file. The ordered list and page limit survived the edit, the optional transport flag stayed absent, and an explicitly disabled flag remained false after reopening. This config-only check used no provider credentials or external delivery.

@clawsweeper

clawsweeper Bot commented Aug 22, 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.

@shannon0430
shannon0430 force-pushed the fix/openai-native-pdf-transport branch from ec19d4b to 6544389 Compare August 22, 2026 03:27
@shannon0430
shannon0430 marked this pull request as ready for review August 22, 2026 03:27
@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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 22, 2026
@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds a default-off setting and optional provider hook for sending eligible complete PDFs to the OpenAI Responses API.

Example: Analyze a complete two-page report.pdf with openai/gpt-4.1-mini and pdfNativeOpenai enabled.

  • Before: The PDF tool sends extracted text and page images and reports native: false.
  • After: The PDF tool sends inline input_file content to the official Responses endpoint and reports native: true.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has substantive production-flow evidence and no definite introduced defect; unresolved product-contract adoption caps overall readiness.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The full submission records real OpenAI HTTP200 native/extraction results and an isolated normal Gateway agent/PDF route with allowed and denied controls; later focused validation covers integration changes, while historical operator-retirement observations retain their original scope.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: OpenAI Platform users cannot explicitly select complete-document PDF input through the built-in PDF tool.
Reason: The capability is useful and bounded, but adds a core setting and public SDK hook without a recorded owner adoption decision.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it provides a distinct capability absent from current main, has substantive maintainer engagement, and awaits product adoption and current-head CI approval.

Reviewed head: a8ad789e9d00d44927737e1e8175b9c8064b3279
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should OpenClaw adopt agents.defaults.pdfNativeOpenai and the optional MediaUnderstandingProvider.analyzePdf contract proposed by this PR?
  • Recommendation: Sponsor the default-off proposal: Approve the setting placement and additive provider contract, retaining explicit full-document consent and existing extraction behavior.
  • Why: The implementation preserves existing defaults, but neither the maintainer proof request nor contributor validation establishes approval of these new product contracts.

Before merge

Findings

None.

Agent review details

How this fits together

The PDF tool loads permitted documents, resolves the selected model and credentials, checks extraction completeness, and dispatches either native document input or extracted content before returning analysis text.

flowchart TD
  A[PDF tool invocation] --> B[Document access and loading]
  B --> C[Model and credential resolution]
  C --> D[Opt-in and completeness checks]
  D --> E[OpenAI provider hook]
  D --> F[Existing extraction completion]
  E --> G[Analysis result]
  F --> G
Loading

Technical review

Best possible solution:

Have the feature owner settle the default-off configuration and additive SDK contract, then complete the approved current-head CI gate.

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

This is a missing capability rather than a demonstrated broken contract: current main intentionally uses extraction for OpenAI PDF analysis.

Is this the best way to solve the issue?

The proposal extends existing PDF and media-provider owners without changing model ordering, but adoption of a vendor-specific core setting remains a product decision.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 153168fd09e4.

Provenance checked

  • PDF native/extraction split keeps the original intent (d0ac1b0: Provide native document input for Anthropic and Google while using text/image extraction for other providers.)
  • PDF model configuration ownership keeps the original intent (ce7788f: Keep PDF model selection and limits in the existing model-policy owner while preserving runtime behavior.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned implementation: The introduced branch requires explicit true, an OpenAI image-capable model, no page selection or password, and complete extraction metadata before invoking the provider hook. (src/agents/tools/pdf-tool.ts:440, a8ad789e9d00)
  • Provider boundary: The provider accepts only the official Platform Responses route, enforces per-file and aggregate byte limits, uses guarded provider HTTP, and submits inline PDFs with store: false. (extensions/openai/pdf-analysis.ts:19, a8ad789e9d00)
  • Current main remains distinct: Current main dispatches native PDFs through Anthropic and Google and otherwise uses extraction; the proposed OpenAI setting and provider hook are absent. (src/agents/tools/pdf-tool.ts:451, 153168fd09e4)
  • Product contracts require adoption: The optional core boolean and public analyzePdf callback are new contracts; the full discussion and reviews contain a maintainer proof request but no recorded approval of their adoption or placement. (src/media-understanding/provider-types.ts:104, a8ad789e9d00)
  • Discussion and behavior proof: obviyus requested production-flow proof at feat(pdf): add explicit OpenAI native document opt-in #127770 (comment). Later contributor evidence records successful real OpenAI requests and an isolated Gateway route, superseding the failed historical Telegram candidate. The prepared Telegram images were inspected and do not independently establish provider success. (a8ad789e9d00)
  • Configuration compatibility: The optional schema field has no default insertion or migration writer; saved-config tests retain absent, false, true, model ordering and limits. The body also records a published 2026.11.10 CLI saved-config upgrade check. (src/config/pdf-native-openai.test.ts:47, a8ad789e9d00)

Likely related people:

  • Peter Steinberger: Raw commit ff2c044 adds src/agents/tools/pdf-tool.ts:71 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ff2c044942f7; files: src/agents/tools/pdf-tool.ts)
  • Vincent Koc: Raw commit ce7788f adds src/agents/tools/pdf-tool.ts:68 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce7788f5a24e; files: src/agents/tools/pdf-tool.ts)
  • Tyler Yust: Raw commit d0ac1b0 adds src/agents/tools/pdf-tool.ts:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d0ac1b019517; files: src/agents/tools/pdf-tool.ts)

PR surface

Source +226, Tests +672, Docs +13, Generated 0, Other +5. Total +916 across 21 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 10 226 0 +226
Tests 6 679 7 +672
Docs 2 19 6 +13
Config 0 0 0 0
Generated 2 3 3 0
Other 1 5 0 +5
Total 21 932 16 +916

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • merge-risk: 🚨 compatibility: This PR introduces a public provider callback and core configuration key whose supported contracts require owner adoption, although existing configurations remain default-preserving.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the feature owner's decision on the configuration and SDK contracts.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (33 earlier review cycles; latest 8 shown)
  • reviewed 2026-11-16T02:20:16.912Z sha 489d827 :: blocked before merge. :: none
  • reviewed 2026-11-21T13:36:55.131Z sha cefbb1f :: blocked before merge. :: none
  • reviewed 2026-11-23T02:12:06.121Z sha c869b47 :: blocked before merge. :: none
  • reviewed 2026-11-23T03:21:38.380Z sha 9a2928c :: blocked before merge. :: none
  • reviewed 2026-11-24T13:52:38.429Z sha 330814d :: blocked before merge. :: none
  • reviewed 2026-11-26T13:56:01.084Z sha a75fd7c :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-26T14:09:42.416Z sha a75fd7c :: blocked before merge. :: none
  • reviewed 2026-11-28T13:29:25.092Z sha a8e9f62 :: blocked before merge. :: none

Reviewed November 29, 2026, 8:35 AM ET / 13:35 UTC (Revision 34).

@obviyus

obviyus commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

@openclaw-mantis Prove this PR's fix through the real Telegram flow. The claim: the built-in pdf tool can now use OpenAI Responses native PDF input (input_file) when the resolved transport supports it, instead of always taking the extraction/page-image fallback and reporting native: false.

Suggested proof shape:

  1. Send a small PDF document to the SUT over Telegram with a prompt that makes the agent invoke the pdf tool on it; script the mock provider so the tool-call turn is deterministic.
  2. Candidate evidence: the recorded provider request for the PDF analysis contains an input_file part with the inline PDF data (native path taken), and the tool result reports native: true. Baseline evidence: the same scenario on the baseline ref shows the fallback shape (no input_file; native: false).
  3. Report the request-shape diff between candidate and baseline, plus the Telegram-visible outcome of the turn.

If the mock provider transport does not qualify as input_file-capable under the PR's capability detection, configure the media-understanding provider per the PR's extensions/openai changes so the capability resolves, and say what you configured. If the path cannot be exercised end-to-end, report exactly where it dead-ends instead of substituting a weaker probe.

@shannon0430

shannon0430 commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Automated Shannon blocked-handoff checkpoint:

  • Current head: 6544389d47e710e40b9885a3f19f2638e6d57702.
  • Current blocker: CI/check failure: checks-fast-baseline-ratchets, checks-node-compact-small-5, openclaw/ci-gate.
  • Labels seen by the cron: agents, size: M, extensions: openai, P1, rating: 🦪 silver shellfish, merge-risk: 🚨 compatibility, merge-risk: 🚨 security-boundary, status: 📣 needs proof.
  • maintainerCanModify: true.

The Shannon cron's perfect condition is: no author-side item remains merely detected and unhandled. When the next action is low-risk, the cron performs it. When the next action is an unattended branch rewrite, code push, merge, close, autofix, or security-boundary decision, the cron does not perform that mutation silently; it creates this durable handoff instead.

This historical checkpoint did not modify source code or repository state. Follow-up is tracked in this pull request.

obviyus added a commit that referenced this pull request Aug 22, 2026
… head

The Telegram Desktop proof previously built the candidate from the raw PR
head, so a head behind main failed for reasons main already fixed
(observed on #127770: 59 commits behind, hitting the Unknown-model defect
fixed by #127952). GitHub's cached PR test merge cannot be the candidate
either: it was observed 50 commits / 12 hours stale and never refreshed.

The workflow now resolves the live refs/heads/main tip and merge base at
dispatch, requires a main-targeting PR, and builds a deterministic local
merge (merge-tree --merge-base + commit-tree with pinned identity/date) as
the candidate; conflicts fail with a direct rebase message and there is no
fallback to the raw head. Lane labels and docs now say the candidate is
the PR merged onto main.
@openclaw-mantis

openclaw-mantis Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Mantis Telegram Desktop Proof

Summary: Mantis captured native Telegram Desktop before/after GIF evidence for a Telegram PDF attachment followed by a Code Mode pdf(...) tool call. Baseline completed through the extraction fallback; candidate sent a native OpenAI Responses input_file request but the pdf tool failed with a malformed JSON response before returning content.

Main screenshot This PR merged onto main screenshot
Baseline native Telegram Desktop screenshot Candidate native Telegram Desktop screenshot
Main This PR merged onto main
Baseline native Telegram Desktop proof GIF Candidate native Telegram Desktop proof GIF

Motion-trimmed clips:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-desktop/pr-127770/run-32582294668-1/index.json

obviyus added a commit that referenced this pull request Aug 22, 2026
… head (#127961)

The Telegram Desktop proof previously built the candidate from the raw PR
head, so a head behind main failed for reasons main already fixed
(observed on #127770: 59 commits behind, hitting the Unknown-model defect
fixed by #127952). GitHub's cached PR test merge cannot be the candidate
either: it was observed 50 commits / 12 hours stale and never refreshed.

The workflow now resolves the live refs/heads/main tip and merge base at
dispatch, requires a main-targeting PR, and builds a deterministic local
merge (merge-tree --merge-base + commit-tree with pinned identity/date) as
the candidate; conflicts fail with a direct rebase message and there is no
fallback to the raw head. Lane labels and docs now say the candidate is
the PR merged onto main.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 23, 2026
… head (openclaw#127961)

The Telegram Desktop proof previously built the candidate from the raw PR
head, so a head behind main failed for reasons main already fixed
(observed on openclaw#127770: 59 commits behind, hitting the Unknown-model defect
fixed by openclaw#127952). GitHub's cached PR test merge cannot be the candidate
either: it was observed 50 commits / 12 hours stale and never refreshed.

The workflow now resolves the live refs/heads/main tip and merge base at
dispatch, requires a main-targeting PR, and builds a deterministic local
merge (merge-tree --merge-base + commit-tree with pinned identity/date) as
the candidate; conflicts fail with a direct rebase message and there is no
fallback to the raw head. Lane labels and docs now say the candidate is
the PR merged onto main.
@shannon0430
shannon0430 force-pushed the fix/openai-native-pdf-transport branch from 6544389 to d639f62 Compare August 26, 2026 15:20
@shannon0430

Copy link
Copy Markdown
Contributor Author

Addressed the P1 endpoint-boundary finding at d639f62d4b0550585e33e38c13b50dbabd687df0.

  • Native input_file dispatch now requires openai-responses plus the exact HTTPS OpenAI Platform base URL.
  • Custom Responses endpoints and ChatGPT/Codex remain on extraction fallback; the boundary regression fails on the prior implementation by attempting delivery to proxy.example.com, then passes with zero native-provider calls after the fix.
  • Removed the new unchecked response assertion and parse OpenAI output through runtime record checks.
  • Direct sibling Codex source read at 4f39251a010a8bd7d692d25fb33832ff06f1635a: codex-rs/protocol/src/user_input.rs:15-54, codex-rs/protocol/src/models.rs:837-853, and models.rs:1898-1975 expose no document/input_file conversation item.

Local verification:

  • node scripts/run-vitest.mjs src/agents/tools/pdf-tool.openai-native.test.ts src/agents/tools/pdf-tool.helpers.test.ts src/agents/tools/pdf-tool.test.ts src/agents/tools/pdf-native-providers.test.ts — 95 passed.
  • node scripts/check-changed.mjs — passed all selected checks.
  • pnpm build — passed.
  • bundled autoreview — clean, correctness 0.98.

Proof gap: this host has no OpenAI Platform API-key credential, so I did not claim a real-provider success. The previous Mantis result exercised the old head and remains a failed scripted-provider proof, not evidence for this head. Exact-head CI is attached but currently waiting for GitHub runners; several auxiliary workflows were cancelled before their first step by an event/concurrency collision, and the author account cannot rerun repository workflows.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@shannon0430
shannon0430 force-pushed the fix/openai-native-pdf-transport branch from d639f62 to d0deb62 Compare August 26, 2026 15:42
@clawsweeper clawsweeper Bot removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 26, 2026
@shannon0430

Copy link
Copy Markdown
Contributor Author

Integrated pinned official main through a958f1d25c1d77aff39bfcbf86d0d4c7bd8f539a with a normal merge (no force push).

Exact head: 8b861d6974eb48062717f6e79481a9b5fe067057

The only conflict was docs/.generated/config-baseline.sha256, regenerated by its canonical owner. The explicit default-off OpenAI native PDF implementation and tests are unchanged. Focused exact-head proof passed 50 config, prepared-runtime, authority, PDF-tool, and OpenAI-transport assertions; pnpm config:docs:check and git diff --check --cached pass.

The prior hosted review on the immediately preceding head found no actionable findings. This is a behavior-neutral mechanical main integration, so the current contributor rule does not call for a redundant re-review request. No paid provider request or maintainer workflow approval was performed.

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

shannon0430 and others added 2 commits November 22, 2026 23:38
# Conflicts:
#	docs/.generated/config-baseline.counts.json
#	docs/.generated/config-baseline.sha256
@shannon0430

Copy link
Copy Markdown
Contributor Author

Integrated pinned official main through ae1e9ee0fe765e1fcbeda2468f39761537f79f04 with a normal merge (no force push) and regenerated the canonical config documentation metadata.

Exact head: c869b473d522c79dca2a1006217faf4ad2b5d163

Focused exact-head proof:

  • 50 native-PDF config, provider transport, request-boundary, final-authority, and prepared-runtime assertions passed
  • pnpm config:docs:check passed
  • git diff --check passed

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

# Conflicts:
#	docs/.generated/config-baseline.sha256
@shannon0430

Copy link
Copy Markdown
Contributor Author

Refreshed this branch onto current upstream main (49795c31df01d405cf9930ecdf817333e41473d1) with a normal merge; new head is 9a2928c1c771a8eeccce72a8f95dc163c9a1d4d7.

The nine-commit upstream delta only changes release/package/session-share and generated metadata, not the native-PDF transport path. On the new head, pnpm config:docs:check and git diff --check pass; the earlier 50 focused native-PDF tests remain applicable to the unchanged feature boundary.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: openai merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants