Skip to content

refactor: extract media understanding common package - #88297

Merged
steipete merged 2 commits into
mainfrom
codex/media-understanding-core
May 30, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/media-understanding-core

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Extract pure media-understanding helpers into the private @openclaw/media-understanding-common workspace package.
  • Keep existing src/media-understanding import paths as thin re-export shims.
  • Wire the new package into tsconfig, tsdown, build cache inputs, watch paths, lockfile, and generated dist artifacts.

Verification

  • .agents/skills/autoreview/scripts/autoreview --mode local
  • pnpm check:changed
  • pnpm build
  • node scripts/run-vitest.mjs packages/media-understanding-common/src/format.test.ts src/media-understanding/defaults.test.ts src/media-understanding/provider-registry.test.ts src/media-understanding/resolve.test.ts

Real behavior proof

Behavior addressed: media-understanding pure helpers now build from a dedicated workspace package while existing source imports continue resolving through shims.
Real environment tested: local macOS checkout, Node and pnpm repo defaults.
Exact steps or command run after this patch: pnpm check:changed; pnpm build; focused Vitest command above; autoreview local.
Evidence after fix: check:changed passed guards, typecheck, lint, and import cycles; build completed; focused Vitest passed 3 shards.
Observed result after fix: moved formatter/default/provider helper paths still pass adjacent media-understanding tests.
What was not tested: local broad test:changed hit memory pressure in the gateway shard; Testbox CLI was unavailable and direct Crabbox coordinator stalled before command execution, so GitHub CI is the broad remote proof.

@steipete
steipete requested a review from a team as a code owner May 30, 2026 10:33
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XL maintainer Maintainer-authored PR labels May 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • packages/media-understanding-common/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label May 30, 2026
@github-actions

github-actions Bot commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph change authorized

This PR includes dependency graph changes. A member of @openclaw/openclaw-secops authorized this exact head SHA with /allow-dependencies-change.

  • Approved SHA: 62e4bcadfcebee531e24cc42fafb86e4d4e5bff7
  • Approved by: @steipete

A later push changes the PR head SHA and requires a fresh security approval.

@steipete

Copy link
Copy Markdown
Contributor Author

/allow-dependencies-change

@clawsweeper

clawsweeper Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: refactor: extract media understanding common package This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete

Copy link
Copy Markdown
Contributor Author

Verification before merge:

  • .agents/skills/autoreview/scripts/autoreview --mode local
    • First run found the package-name collision with the existing bundled plugin; fixed by renaming the helper package to @openclaw/media-understanding-common.
    • Final run: clean, no accepted/actionable findings.
  • pnpm check:changed
    • Passed guards, full project typecheck, lint shards, and import-cycle check.
  • pnpm build
    • Passed full build-all after the package rename.
  • node scripts/run-vitest.mjs packages/media-understanding-common/src/format.test.ts src/media-understanding/defaults.test.ts src/media-understanding/provider-registry.test.ts src/media-understanding/resolve.test.ts
    • Passed 3 Vitest shards.
  • GitHub CI on head 62e4bca
    • Required checks green; dependency guard approved via /allow-dependencies-change for this workspace package manifest and lockfile change.

Known proof gaps:

  • Local broad test:changed hit macOS memory pressure in the gateway shard. Testbox CLI was unavailable and direct Crabbox coordinator stalled before command execution, so GitHub CI is the broad remote proof.

@steipete
steipete merged commit 8b92aca into main May 30, 2026
131 of 134 checks passed
@steipete
steipete deleted the codex/media-understanding-core branch May 30, 2026 10:40
alex-ht pushed a commit to alex-ht/ClawBackHome that referenced this pull request May 30, 2026
* refactor: extract media understanding common package

* test: move media understanding format test
mcaxtr pushed a commit that referenced this pull request May 30, 2026
* refactor: extract media understanding common package

* test: move media understanding format test
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 31, 2026
* refactor: extract media understanding common package

* test: move media understanding format test
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* refactor: extract media understanding common package

* test: move media understanding format test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files maintainer Maintainer-authored PR scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant