Skip to content

refactor(media): consolidate capability defaults and compression grids - #177665

Merged
steipete merged 1 commit into
mainfrom
deslop/r08-11-media-capability-facts-20261015
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/r08-11-media-capability-facts-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Media defaults repeat the same capability keys across independent byte, character, timeout, prompt and output-kind tables. Compression quality settings repeat the same preference decision in a switch.

What Changed

One private capability descriptor now supplies all five facts. Existing callers consume it directly, including image execution and output selection. A private media-cap map retains the document fallback, and the compression grid retains identical ladders while returning fresh arrays. All security, image dimension, byte, model policy and input validation checks stay.

This media-area recovery removes 16 net production lines across eight files. The workspace common package is private; SDK barrels select runtime operations, not these removed constants. No SDK export/signature, configuration/default value, protocol, schema or dependency changes. Existing tests are unchanged.

Best-effort tradeoffs accepted

None. This consolidates repeated static facts without removing guards. Source provenance: common media extraction #88297, media-cap extraction #88534, compression #157982. Their feature and error handling contracts remain.

Evidence

  • Original focused media resolver/runtime/image-normalization/web-media/attachment selection entered cold worker compilation before assertions. After the conflict-only rebase, six individual resolver cases executed successfully; the remaining defaults/generation selection then hit a confirmed compiled-worker cache miss before assertions. Only the task-owned launcher was stopped and joined. Neither complete selection, the defaults consumers, nor a broad build is claimed passing. The image-tool consumer uses the same uncovered setup and was not repeated locally.
  • Exact-base source evaluation passes all 15 capability facts and eight byte-cap/fallback comparisons. This is narrow static-contract parity, not runtime/Gateway or image-rendering proof.
  • Targeted eight-root native types and focused syntax lint pass, freshly rerun after conflict repair; the same static 15-default/eight-cap parity also passes. Fresh independent complete-owner P0–P2 review is scoped-clean, no actionable findings. Staged changed-check selection was dry-run only; broad proposed commands were not executed locally. The original commit-hook formatting is retained; the repair changes only canonical fallback context. Exact-head PR CI is the broad proof.
  • Original-head suppression audit: 13 pass, 1 inherited failure, unchanged Gateway baseline mismatch (98 received/97 expected). After rebasing onto newer main, the fresh audit is 14/14 pass. This does not rewrite the old result or claim this PR repaired it; no suppression or allowance was added.

Conflict-only integration

GitHub reported the draft conflicting at its original head. The repair onto main 90703b442f6 preserves the newer configured-image-provider owner and validated-config nullish fallback flow. Only the two fallback table references required manual resolution. No old type/scope/config guards were restored. The eight-file cut remains 16 net production lines removed; the range comparison contains only that fallback-context adaptation. Frozen-lockfile installation passed after rebasing. Fresh runtime-value and Madge cycle checks both report zero.

Exact-head CI and inherited-failure exception

CI run 39314620042, attempt 1 completed failed, not green. All 83 jobs are terminal: 54 success, 27 skipped, and the two failures below. No selected product job was cancelled or had zero executed steps.

Failed job Attribution
checks-node-changed-compact-large-17 / 118273496587 Five requester-identity cases require explicit undefined-valued keys at get-reply-run.requester-authority.test-support.ts:127. Main #177652 intentionally removes undefined keys before replay/persistence; the deciding owner, caller, test and normalization inputs are byte-identical between actual tested main and merge.
openclaw/ci-gate / 118277603343 Downstream aggregate of that sole failed leaf; every other selected job succeeds.

The raw checkout identifies merge 43772a8aa60262b1b5091d737bcf2a2110b73e44, ordered parents main 16aee9219d04a2bad2e076a018e2c21f06f802e6 and reviewed head a91b7ddaffda74948e968ecb0c75a0ec75af12d7. The retained actual object and independently reconstructed full tree match. The actual merge contains only the eight reviewed media changes.

A narrow real-owner comparison reproduces the same five missing-property mismatches serially on actual CI main, tested merge, and fresh current main 2f7829d9769f; the pre-#177652 owner has none. This settles owner-boundary causality, not a full runPreparedReply replay or end-to-end pass. An actual focused consumer attempt hit cold compiled-worker setup before assertions and was stopped/joined under the local-build budget; that gap remains explicit. No requester/durability code or test was weakened or changed.

Complete exact-head census: 211 terminal checks, including the same two failures, three superseded metadata cancellations, and one neutral CodeQL result (not a scan-pass claim). The two historical PR-context cancellations have the same-head/same-workflow successful replacement job 118272758911 with nine executed successful steps; dispatch cancellation has replacement 118272755896 with twelve. No missing product suite is excused. The current flake register and latest six completed schedules were checked; these five assertions are not a listed flake and are attributed through the actual main-owner comparison, not shard names. Submission uses the campaign-authorized native inherited-only exception, retaining current security, review, policy and writer checks. No CI rerun or source push was used to chase green.

@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Oct 19, 2026
Keep all byte, character, timeout, prompt, output-kind and compression values while migrating internal consumers to one private capability descriptor. No SDK exports or configuration defaults change.
@steipete
steipete force-pushed the deslop/r08-11-media-capability-facts-20261015 branch from a1a74dd to a91b7dd Compare October 19, 2026 19:52
@steipete
steipete marked this pull request as ready for review October 19, 2026 19:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T20:04:31.215466Z a91b7dd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates media capability defaults and compression grids and migrates their internal consumers.

Example: Describe an image without configured media overrides.

  • Before: Separate tables supply a 10 MiB input limit, 60-second timeout, and 500-character response limit.
  • After: One capability descriptor supplies the same limits.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent; supplied validation establishes static parity and selected unit behavior rather than end-to-end execution.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate and introduces no authority-chain change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: Maintainer-authored direction is established, and consolidating repeated facts reduces maintenance drift without changing user choices or public contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-approved consolidation removes duplicated media facts while preserving existing behavior, and no actionable introduced defect was found.

Priority: P3
Reviewed head: a91b7ddaffda74948e968ecb0c75a0ec75af12d7

Before merge

  • Complete next step - Have the CI owner compare the requester-identity failures with the base and resolve the required gate, assigning author repairs only if this diff causes them.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied resolver cases and static parity comparison do not exercise image description, output selection, or compression through a shipped CLI or Gateway.
Agent review details

How this fits together

Media loaders and understanding runtimes combine attachments, configuration, and model policies to produce bounded image inputs and typed descriptions or transcriptions.

flowchart TD
  A[Attachments and configuration] --> B[Media loaders]
  C[Capability defaults] --> D[Understanding resolver]
  B --> E[Image normalization and compression]
  F[Compression grids and model limits] --> E
  D --> G[Provider execution]
  E --> G
  G --> H[Descriptions and transcriptions]
Loading

Technical review

Best possible solution:

Retain the consolidated descriptors within the existing owners while preserving configured overrides, media limits, output kinds, and compression behavior.

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

This PR addresses duplicated internal representations rather than a reported product failure; source comparison establishes the duplication and matching replacement values.

Is this the best way to solve the issue?

The change uses the existing shared packages and media owners, completes the internal caller migration, and introduces no unnecessary wrapper, state owner, or test machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2cd23b665868.

Provenance checked

  • Shared capability defaults keeps the original intent (8b92aca: Extract pure media-understanding helpers into a private workspace package while retaining core facades.)
  • Media-family byte caps keeps the original intent (e0425ad: Provide audio, video, and document media caps; the later package extraction retained the canonical implementation.)
  • Compression quality grids keeps the original intent (4c210e2: Adapt image compression to the selected quality, model limits, image count, and fallback candidates.)
  • Runtime output-kind selection keeps the original intent (9f2b760: Move media generation runtimes into core while selecting the output corresponding to the requested capability.)
  • Defaults facade exports keeps the original intent (8ccf43d: Remove unused aliases while retaining constants needed by live consumers; this PR migrates the remaining timeout consumer before removing its alias.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

PR surface

Source -16. Total -16 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 68 84 -16
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 8 68 84 -16

Review metrics

Metric Value Why it matters
Production versus test LOC Production +68/-84; tests unchanged The small net reduction replaces repeated static representations without adding test scaffolding or another runtime owner.

Labels

Label changes:

  • add P3: This is internal cleanup with no intended user-visible behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is internal cleanup with no intended user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 19, 2026, 4:08 PM ET / 20:08 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Inherited-only CI evidence for exact head a91b7ddaffda74948e968ecb0c75a0ec75af12d7, run 39314620042 attempt 1. CI remains failed.

Failure Qualification
118273496587 / checks-node-changed-compact-large-17 Five requester-origin assertions require present undefined-valued sender keys. Unchanged main #177652 canonicalizes those keys away for persistence/replay. The actual CI main, tested merge and freshly fetched current main reproduce the identical five missing-property mismatches through the real owner; the pre-#177652 owner control has none. Deciding owner/caller/test/normalization sources are byte-identical across the actual tested pair.
118277603343 / openclaw/ci-gate Aggregate follows that sole failed leaf. All other selected jobs succeed.

Actual checked-out merge 43772a8aa60262b1b5091d737bcf2a2110b73e44 has ordered parents main 16aee9219d04a2bad2e076a018e2c21f06f802e6 and reviewed head a91b7ddaffda74948e968ecb0c75a0ec75af12d7. The retained object and independent reconstruction have the same full tree a9e7e971186c362616d18cad38d108c0030c0d75; only the eight reviewed media files differ from tested main.

This is narrow owner-boundary/source attribution, not a passing full consumer replay. The focused consumer command reached a confirmed cold compiled-worker setup before assertions and was stopped/joined under the no-local-build budget. Its incomplete result remains disclosed. No production/test hunk, requester authority, durability repair, default value, guard or assertion was changed to obtain this exception.

Complete census:83 terminal CI jobs (54 success/27 skipped/2 failures),211 terminal exact-head checks. Three historical metadata cancellations have successful same-head/same-workflow replacements: PR context job118272758911 (nine successful executed steps), dispatch118272755896 (twelve). No selected product job is cancelled or zero-step. CodeQL neutral is not claimed passing. Current flake register and latest six completed scheduled main runs were checked; this is actual main-owner causality, not a listed-flake or shard-name-only assertion.

The CI-attribution review follow-up is now addressed. The campaign authorizes native inherited-only admission; native submission still revalidates exact head/run, complete failure accounting, security, enforced reviews, policy and writer authority. No CI rerun, status injection or security waiver.

@steipete
steipete merged commit 1cb69ee into main Oct 19, 2026
217 of 223 checks passed
@steipete
steipete deleted the deslop/r08-11-media-capability-facts-20261015 branch October 19, 2026 20:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

vincentkoc added a commit that referenced this pull request Oct 19, 2026
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...
vincentkoc added a commit that referenced this pull request Oct 19, 2026
#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
openclaw#177665)

Keep all byte, character, timeout, prompt, output-kind and compression values while migrating internal consumers to one private capability descriptor. No SDK exports or configuration defaults change.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
openclaw#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (openclaw#177614)
  fix(release): tag restart plugin cohorts consistently (openclaw#177725)
  refactor(ui): inline single-caller detail requests (openclaw#177705)
  chore(i18n): refresh native locales (openclaw#177721)
  refactor(codex): drop unread private runtime reports (openclaw#177689)
  refactor(ui): consolidate static artwork registries (openclaw#177692)
  refactor(ui): derive settings schema analysis in the view (openclaw#177624)
  refactor(media): consolidate capability defaults and compression grids (openclaw#177665)
  refactor(auth): bind OAuth managers to native provider operations (openclaw#177676)
  refactor(ui): remove redundant component rendering layers (openclaw#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082)
  fix(agents): report failed secret input prompt delivery (openclaw#177688)
  refactor(ui): share chat message render contracts (openclaw#177668)
  fix(ui): settle model status after overlapping publication (openclaw#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670)
  refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635)
  refactor: fold private operation helpers into their callers (openclaw#177655)
  refactor(ui): remove unused chat leaf element adapters (openclaw#177582)
  perf(talk): use published authority for foreign voice writes (openclaw#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant